@discuss-ds/ui 0.36.0 → 0.38.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
@@ -96,6 +96,7 @@ __export(index_exports, {
96
96
  QuestionEditorCard: () => QuestionEditorCard,
97
97
  QuestionHeader: () => QuestionHeader,
98
98
  QuestionNavItem: () => QuestionNavItem,
99
+ QuestionNumberTag: () => QuestionNumberTag,
99
100
  QuestionOption: () => QuestionOption,
100
101
  QuestionOptionEditor: () => QuestionOptionEditor,
101
102
  QuestionOtherOption: () => QuestionOtherOption,
@@ -115,6 +116,9 @@ __export(index_exports, {
115
116
  Slider: () => Slider,
116
117
  StatCard: () => StatCard,
117
118
  StatusTag: () => StatusTag,
119
+ Step: () => Step,
120
+ StepPath: () => StepPath,
121
+ Stepper: () => Stepper,
118
122
  StimulusCard: () => StimulusCard,
119
123
  Switch: () => Switch,
120
124
  TabItem: () => TabItem,
@@ -2432,24 +2436,90 @@ var Textarea = React32.forwardRef(
2432
2436
  );
2433
2437
  Textarea.displayName = "Textarea";
2434
2438
 
2435
- // src/components/Overlays & Feedback/Dialog.tsx
2439
+ // src/components/Navigation/Stepper.tsx
2436
2440
  var React33 = __toESM(require("react"), 1);
2437
2441
  var import_react16 = require("@phosphor-icons/react");
2438
- var import_radix_ui17 = require("radix-ui");
2439
2442
  var import_jsx_runtime34 = require("react/jsx-runtime");
2443
+ var STATUS_TEXT = { "not-completed": "not completed", completed: "completed", error: "error" };
2444
+ function StepIndicator({ status, selected }) {
2445
+ const props = { size: 24, "aria-hidden": true, className: "shrink-0" };
2446
+ if (status === "completed") return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react16.CheckCircle, { ...props, weight: selected ? "fill" : "regular", className: "shrink-0 text-success-foreground" });
2447
+ if (status === "error") return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react16.WarningCircle, { ...props, weight: selected ? "fill" : "regular", className: "shrink-0 text-destructive-foreground" });
2448
+ if (selected) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react16.RadioButton, { ...props, weight: "fill", className: "shrink-0 text-accent-foreground" });
2449
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react16.Circle, { ...props, className: "shrink-0 text-input-muted" });
2450
+ }
2451
+ var Step = React33.forwardRef(
2452
+ ({ label, status = "not-completed", selected = false, orientation = "horizontal", className, ...props }, ref) => {
2453
+ const vertical = orientation === "vertical";
2454
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2455
+ "div",
2456
+ {
2457
+ ref,
2458
+ className: cn(
2459
+ "flex min-h-16 w-34 shrink-0",
2460
+ // The horizontal indicator sits 6px from the top, so a path beside it lines up whatever the label's length.
2461
+ vertical ? "items-center justify-end gap-4 p-2" : "flex-col items-center gap-2 pt-1.5",
2462
+ className
2463
+ ),
2464
+ ...props,
2465
+ children: [
2466
+ !vertical && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StepIndicator, { status, selected }),
2467
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2468
+ "span",
2469
+ {
2470
+ className: cn(
2471
+ vertical ? "min-w-0 flex-1 text-right" : "w-full text-center",
2472
+ selected ? "text-ui-label text-foreground" : "text-body-small text-secondary-muted-foreground"
2473
+ ),
2474
+ children: [
2475
+ label,
2476
+ status !== "not-completed" && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: `, ${STATUS_TEXT[status]}` })
2477
+ ]
2478
+ }
2479
+ ),
2480
+ vertical && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StepIndicator, { status, selected })
2481
+ ]
2482
+ }
2483
+ );
2484
+ }
2485
+ );
2486
+ Step.displayName = "Step";
2487
+ var StepPath = React33.forwardRef(
2488
+ ({ orientation = "horizontal", completed = false, className, ...props }, ref) => {
2489
+ const vertical = orientation === "vertical";
2490
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { ref, "aria-hidden": true, className: cn("flex items-center justify-center", vertical ? "h-8 w-8 flex-col" : "h-8 flex-1", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn(vertical ? "w-px flex-1" : "h-px flex-1", completed ? "bg-success-foreground" : "bg-border") }) });
2491
+ }
2492
+ );
2493
+ StepPath.displayName = "StepPath";
2494
+ var Stepper = React33.forwardRef(({ steps, current, orientation = "horizontal", className, ...props }, ref) => {
2495
+ const vertical = orientation === "vertical";
2496
+ const statusOf = (i, step) => step.error ? "error" : i < current ? "completed" : "not-completed";
2497
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ol", { ref, className: cn("flex", vertical ? "flex-col items-end" : "w-full items-start", className), ...props, children: steps.map((step, i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(React33.Fragment, { children: [
2498
+ i > 0 && // Horizontal: the path runs from one indicator's edge to the next (it reaches 56px into each 136px step), level with the indicators' centre.
2499
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("li", { "aria-hidden": true, className: cn("flex", vertical ? "pr-1" : "-mx-14 flex-1 pt-1.5"), children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(StepPath, { orientation, completed: i < current, className: vertical ? void 0 : "h-6" }) }),
2500
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("li", { "aria-current": i === current ? "step" : void 0, className: "flex", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Step, { label: step.label, status: statusOf(i, step), selected: i === current, orientation }) })
2501
+ ] }, i)) });
2502
+ });
2503
+ Stepper.displayName = "Stepper";
2504
+
2505
+ // src/components/Overlays & Feedback/Dialog.tsx
2506
+ var React34 = __toESM(require("react"), 1);
2507
+ var import_react17 = require("@phosphor-icons/react");
2508
+ var import_radix_ui17 = require("radix-ui");
2509
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2440
2510
  var Dialog = import_radix_ui17.Dialog.Root;
2441
2511
  var DialogTrigger = import_radix_ui17.Dialog.Trigger;
2442
2512
  var DialogClose = import_radix_ui17.Dialog.Close;
2443
- var DialogContent = React33.forwardRef(
2444
- ({ className, children, closeLabel = "Close", hideClose, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_radix_ui17.Dialog.Portal, { children: [
2445
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2513
+ var DialogContent = React34.forwardRef(
2514
+ ({ className, children, closeLabel = "Close", hideClose, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_radix_ui17.Dialog.Portal, { children: [
2515
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2446
2516
  import_radix_ui17.Dialog.Overlay,
2447
2517
  {
2448
2518
  style: { zIndex: "var(--sys-z-30)" },
2449
2519
  className: "fixed inset-0 bg-primary/30"
2450
2520
  }
2451
2521
  ),
2452
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
2522
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2453
2523
  import_radix_ui17.Dialog.Content,
2454
2524
  {
2455
2525
  ref,
@@ -2461,15 +2531,15 @@ var DialogContent = React33.forwardRef(
2461
2531
  ...props,
2462
2532
  children: [
2463
2533
  children,
2464
- !hideClose && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_radix_ui17.Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Button, { variant: "ghost", size: "icon-sm", "aria-label": closeLabel, className: "absolute top-4 right-6", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react16.X, { size: 16, "aria-hidden": true }) }) })
2534
+ !hideClose && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_radix_ui17.Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { variant: "ghost", size: "icon-sm", "aria-label": closeLabel, className: "absolute top-4 right-6", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react17.X, { size: 16, "aria-hidden": true }) }) })
2465
2535
  ]
2466
2536
  }
2467
2537
  )
2468
2538
  ] })
2469
2539
  );
2470
2540
  DialogContent.displayName = "DialogContent";
2471
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn("flex flex-col gap-1.5 border-b border-border px-6 py-4 pr-16", className), ...props });
2472
- var DialogTitle = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2541
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("flex flex-col gap-1.5 border-b border-border px-6 py-4 pr-16", className), ...props });
2542
+ var DialogTitle = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2473
2543
  import_radix_ui17.Dialog.Title,
2474
2544
  {
2475
2545
  ref,
@@ -2478,7 +2548,7 @@ var DialogTitle = React33.forwardRef(({ className, ...props }, ref) => /* @__PUR
2478
2548
  }
2479
2549
  ));
2480
2550
  DialogTitle.displayName = "DialogTitle";
2481
- var DialogDescription = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2551
+ var DialogDescription = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2482
2552
  import_radix_ui17.Dialog.Description,
2483
2553
  {
2484
2554
  ref,
@@ -2487,15 +2557,15 @@ var DialogDescription = React33.forwardRef(({ className, ...props }, ref) => /*
2487
2557
  }
2488
2558
  ));
2489
2559
  DialogDescription.displayName = "DialogDescription";
2490
- var DialogBody = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn("flex flex-col gap-4 p-6", className), ...props });
2491
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: cn("flex items-center justify-end gap-3 border-t border-border px-6 py-4", className), ...props });
2560
+ var DialogBody = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("flex flex-col gap-4 p-6", className), ...props });
2561
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("flex items-center justify-end gap-3 border-t border-border px-6 py-4", className), ...props });
2492
2562
 
2493
2563
  // src/components/Overlays & Feedback/Toast.tsx
2494
- var React34 = __toESM(require("react"), 1);
2495
- var import_react17 = require("@phosphor-icons/react");
2564
+ var React35 = __toESM(require("react"), 1);
2565
+ var import_react18 = require("@phosphor-icons/react");
2496
2566
  var import_class_variance_authority4 = require("class-variance-authority");
2497
2567
  var import_radix_ui18 = require("radix-ui");
2498
- var import_jsx_runtime35 = require("react/jsx-runtime");
2568
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2499
2569
  var toastVariants = (0, import_class_variance_authority4.cva)("border", {
2500
2570
  variants: {
2501
2571
  variant: {
@@ -2533,13 +2603,13 @@ var titleColour = {
2533
2603
  };
2534
2604
  function VariantIcon({ variant, size }) {
2535
2605
  const props = { size, "aria-hidden": true, className: cn("shrink-0", iconColour[variant]) };
2536
- if (variant === "success") return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react17.CheckCircle, { ...props });
2537
- if (variant === "warning") return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react17.Warning, { ...props });
2538
- if (variant === "destructive") return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react17.WarningCircle, { ...props });
2539
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react17.Info, { ...props });
2606
+ if (variant === "success") return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react18.CheckCircle, { ...props });
2607
+ if (variant === "warning") return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react18.Warning, { ...props });
2608
+ if (variant === "destructive") return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react18.WarningCircle, { ...props });
2609
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react18.Info, { ...props });
2540
2610
  }
2541
2611
  var ToastProvider = import_radix_ui18.Toast.Provider;
2542
- var ToastViewport = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2612
+ var ToastViewport = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2543
2613
  import_radix_ui18.Toast.Viewport,
2544
2614
  {
2545
2615
  ref,
@@ -2549,10 +2619,10 @@ var ToastViewport = React34.forwardRef(({ className, ...props }, ref) => /* @__P
2549
2619
  }
2550
2620
  ));
2551
2621
  ToastViewport.displayName = "ToastViewport";
2552
- var Toast = React34.forwardRef(
2622
+ var Toast = React35.forwardRef(
2553
2623
  ({ className, variant = "info", title, description, action, closeLabel = "Close", children, ...props }, ref) => {
2554
2624
  const v = variant ?? "info";
2555
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2625
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2556
2626
  import_radix_ui18.Toast.Root,
2557
2627
  {
2558
2628
  ref,
@@ -2560,19 +2630,19 @@ var Toast = React34.forwardRef(
2560
2630
  className: cn("flex items-start gap-3 rounded-lg p-4 shadow-lg", toastVariants({ variant: v }), className),
2561
2631
  ...props,
2562
2632
  children: [
2563
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(VariantIcon, { variant: v, size: 20 }),
2564
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1 text-body-small", children: [
2565
- title != null && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_radix_ui18.Toast.Title, { className: cn("font-semibold", titleColour[v]), children: title }),
2566
- description != null && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_radix_ui18.Toast.Description, { className: "text-secondary-muted-foreground", children: description }),
2633
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(VariantIcon, { variant: v, size: 20 }),
2634
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1 text-body-small", children: [
2635
+ title != null && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_radix_ui18.Toast.Title, { className: cn("font-semibold", titleColour[v]), children: title }),
2636
+ description != null && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_radix_ui18.Toast.Description, { className: "text-secondary-muted-foreground", children: description }),
2567
2637
  children,
2568
2638
  action
2569
2639
  ] }),
2570
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2640
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2571
2641
  import_radix_ui18.Toast.Close,
2572
2642
  {
2573
2643
  "aria-label": closeLabel,
2574
2644
  className: "inline-flex size-4 shrink-0 items-center justify-center rounded-xs text-surface-foreground",
2575
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react17.X, { size: 16, "aria-hidden": true })
2645
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react18.X, { size: 16, "aria-hidden": true })
2576
2646
  }
2577
2647
  )
2578
2648
  ]
@@ -2582,11 +2652,11 @@ var Toast = React34.forwardRef(
2582
2652
  );
2583
2653
  Toast.displayName = "Toast";
2584
2654
  var ToastAction = import_radix_ui18.Toast.Action;
2585
- var ToastInline = React34.forwardRef(
2655
+ var ToastInline = React35.forwardRef(
2586
2656
  ({ className, variant = "info", actions, actionsPlacement = "end", onClose, closeLabel = "Close", children, ...props }, ref) => {
2587
2657
  const v = variant ?? "info";
2588
2658
  const below = actionsPlacement === "bottom" && !!actions;
2589
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2659
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2590
2660
  "div",
2591
2661
  {
2592
2662
  ref,
@@ -2594,15 +2664,15 @@ var ToastInline = React34.forwardRef(
2594
2664
  className: cn("flex gap-2 rounded-sm px-2 py-1.5", below ? "items-start" : "items-center", inlineVariants({ variant: v }), className),
2595
2665
  ...props,
2596
2666
  children: [
2597
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: cn("inline-flex shrink-0", below && "mt-0.5"), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(VariantIcon, { variant: v === "neutral" ? "info" : v, size: 16 }) }),
2598
- below ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2599
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-body-small text-secondary-muted-foreground", children }),
2600
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex items-center gap-2", children: actions })
2601
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
2602
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "min-w-0 flex-1 text-body-small text-secondary-muted-foreground", children }),
2603
- actions && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions })
2667
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: cn("inline-flex shrink-0", below && "mt-0.5"), children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(VariantIcon, { variant: v === "neutral" ? "info" : v, size: 16 }) }),
2668
+ below ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2669
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-body-small text-secondary-muted-foreground", children }),
2670
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex items-center gap-2", children: actions })
2671
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
2672
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "min-w-0 flex-1 text-body-small text-secondary-muted-foreground", children }),
2673
+ actions && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "flex shrink-0 items-center gap-2", children: actions })
2604
2674
  ] }),
2605
- onClose && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react17.X, { size: 16, "aria-hidden": true }) })
2675
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react18.X, { size: 16, "aria-hidden": true }) })
2606
2676
  ]
2607
2677
  }
2608
2678
  );
@@ -2611,16 +2681,16 @@ var ToastInline = React34.forwardRef(
2611
2681
  ToastInline.displayName = "ToastInline";
2612
2682
 
2613
2683
  // src/components/Overlays & Feedback/Tooltip.tsx
2614
- var React35 = __toESM(require("react"), 1);
2684
+ var React36 = __toESM(require("react"), 1);
2615
2685
  var import_radix_ui19 = require("radix-ui");
2616
- var import_jsx_runtime36 = require("react/jsx-runtime");
2686
+ var import_jsx_runtime37 = require("react/jsx-runtime");
2617
2687
  var TooltipProvider = import_radix_ui19.Tooltip.Provider;
2618
2688
  var Tooltip = import_radix_ui19.Tooltip.Root;
2619
2689
  var TooltipTrigger = import_radix_ui19.Tooltip.Trigger;
2620
- var TooltipContent = React35.forwardRef(
2690
+ var TooltipContent = React36.forwardRef(
2621
2691
  ({ className, sideOffset = 4, title, description, action, arrow = true, children, ...props }, ref) => {
2622
2692
  const detailed = title != null || description != null;
2623
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_radix_ui19.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2693
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_radix_ui19.Tooltip.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2624
2694
  import_radix_ui19.Tooltip.Content,
2625
2695
  {
2626
2696
  ref,
@@ -2634,12 +2704,12 @@ var TooltipContent = React35.forwardRef(
2634
2704
  ),
2635
2705
  ...props,
2636
2706
  children: [
2637
- detailed ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
2638
- title != null && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-xs leading-4 font-semibold text-label", children: title }),
2639
- description != null && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("p", { className: "text-xs leading-4.5 text-plum-200", children: description }),
2640
- action != null && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mt-1 text-ui-caption text-plum-300 underline *:underline", children: action })
2707
+ detailed ? /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
2708
+ title != null && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-xs leading-4 font-semibold text-label", children: title }),
2709
+ description != null && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-xs leading-4.5 text-plum-200", children: description }),
2710
+ action != null && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "mt-1 text-ui-caption text-plum-300 underline *:underline", children: action })
2641
2711
  ] }) : children,
2642
- arrow && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_radix_ui19.Tooltip.Arrow, { width: 12, height: 8, className: "fill-primary-soft-foreground" })
2712
+ arrow && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_radix_ui19.Tooltip.Arrow, { width: 12, height: 8, className: "fill-primary-soft-foreground" })
2643
2713
  ]
2644
2714
  }
2645
2715
  ) });
@@ -2648,14 +2718,14 @@ var TooltipContent = React35.forwardRef(
2648
2718
  TooltipContent.displayName = "TooltipContent";
2649
2719
 
2650
2720
  // src/components/Question Types/FileUpload.tsx
2651
- var React37 = __toESM(require("react"), 1);
2652
- var import_react18 = require("@phosphor-icons/react");
2721
+ var React38 = __toESM(require("react"), 1);
2722
+ var import_react19 = require("@phosphor-icons/react");
2653
2723
  var import_radix_ui20 = require("radix-ui");
2654
2724
 
2655
2725
  // src/components/Tags & Badges/Tag.tsx
2656
- var React36 = __toESM(require("react"), 1);
2726
+ var React37 = __toESM(require("react"), 1);
2657
2727
  var import_class_variance_authority5 = require("class-variance-authority");
2658
- var import_jsx_runtime37 = require("react/jsx-runtime");
2728
+ var import_jsx_runtime38 = require("react/jsx-runtime");
2659
2729
  var tagVariants = (0, import_class_variance_authority5.cva)(
2660
2730
  "inline-flex items-center gap-1.5 whitespace-nowrap rounded-sm border px-2.5 py-1 text-ui-caption",
2661
2731
  {
@@ -2671,7 +2741,7 @@ var tagVariants = (0, import_class_variance_authority5.cva)(
2671
2741
  defaultVariants: { variant: "neutral" }
2672
2742
  }
2673
2743
  );
2674
- var Tag = React36.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { ref, className: cn(tagVariants({ variant }), className), ...props }));
2744
+ var Tag = React37.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { ref, className: cn(tagVariants({ variant }), className), ...props }));
2675
2745
  Tag.displayName = "Tag";
2676
2746
  var statusDotVariants = (0, import_class_variance_authority5.cva)("size-1.5 shrink-0 rounded-full", {
2677
2747
  variants: {
@@ -2684,20 +2754,20 @@ var statusDotVariants = (0, import_class_variance_authority5.cva)("size-1.5 shri
2684
2754
  },
2685
2755
  defaultVariants: { status: "active" }
2686
2756
  });
2687
- var StatusTag = React36.forwardRef(
2688
- ({ className, status, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { ref, className: cn(tagVariants({ variant: "default" }), className), ...props, children: [
2689
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: statusDotVariants({ status }), "aria-hidden": "true" }),
2757
+ var StatusTag = React37.forwardRef(
2758
+ ({ className, status, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { ref, className: cn(tagVariants({ variant: "default" }), className), ...props, children: [
2759
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: statusDotVariants({ status }), "aria-hidden": "true" }),
2690
2760
  children
2691
2761
  ] })
2692
2762
  );
2693
2763
  StatusTag.displayName = "StatusTag";
2694
2764
 
2695
2765
  // src/components/Question Types/FileUpload.tsx
2696
- var import_jsx_runtime38 = require("react/jsx-runtime");
2697
- var FileUploadZone = React37.forwardRef(
2766
+ var import_jsx_runtime39 = require("react/jsx-runtime");
2767
+ var FileUploadZone = React38.forwardRef(
2698
2768
  ({ className, title = "Upload document", hint, icon, onFiles, ...props }, ref) => {
2699
- const [over, setOver] = React37.useState(false);
2700
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2769
+ const [over, setOver] = React38.useState(false);
2770
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2701
2771
  "label",
2702
2772
  {
2703
2773
  className: cn(
@@ -2717,12 +2787,12 @@ var FileUploadZone = React37.forwardRef(
2717
2787
  onFiles?.(Array.from(event.dataTransfer.files));
2718
2788
  },
2719
2789
  children: [
2720
- /* @__PURE__ */ (0, import_jsx_runtime38.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_runtime38.jsx)(import_react18.FileText, { size: 24, "aria-hidden": true }) }),
2721
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex flex-col gap-1", children: [
2722
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-body-small text-surface-foreground", children: title }),
2723
- hint && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-ui-caption text-secondary-muted-foreground", children: hint })
2790
+ /* @__PURE__ */ (0, import_jsx_runtime39.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_runtime39.jsx)(import_react19.FileText, { size: 24, "aria-hidden": true }) }),
2791
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex flex-col gap-1", children: [
2792
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-body-small text-surface-foreground", children: title }),
2793
+ hint && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-ui-caption text-secondary-muted-foreground", children: hint })
2724
2794
  ] }),
2725
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2795
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2726
2796
  "input",
2727
2797
  {
2728
2798
  ref,
@@ -2738,47 +2808,47 @@ var FileUploadZone = React37.forwardRef(
2738
2808
  }
2739
2809
  );
2740
2810
  FileUploadZone.displayName = "FileUploadZone";
2741
- var FileUploadItem = React37.forwardRef(
2811
+ var FileUploadItem = React38.forwardRef(
2742
2812
  ({ className, name, size, status = "uploading", progress = 0, timeLeft, icon, onRemove, removeLabel, ...props }, ref) => {
2743
2813
  const uploading = status === "uploading";
2744
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
2814
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2745
2815
  "div",
2746
2816
  {
2747
2817
  ref,
2748
2818
  className: cn("flex w-full flex-col justify-center gap-2 overflow-hidden rounded-sm border border-border p-2", className),
2749
2819
  ...props,
2750
2820
  children: [
2751
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2", children: [
2752
- /* @__PURE__ */ (0, import_jsx_runtime38.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_runtime38.jsx)(import_react18.FileText, { size: 24, "aria-hidden": true }) }),
2753
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
2754
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
2755
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "min-w-0 truncate text-ui-label text-surface-foreground", children: name }),
2756
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react18.X, { size: 16, "aria-hidden": true }) })
2821
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2", children: [
2822
+ /* @__PURE__ */ (0, import_jsx_runtime39.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_runtime39.jsx)(import_react19.FileText, { size: 24, "aria-hidden": true }) }),
2823
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
2824
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
2825
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "min-w-0 truncate text-ui-label text-surface-foreground", children: name }),
2826
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.X, { size: 16, "aria-hidden": true }) })
2757
2827
  ] }),
2758
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-between text-ui-caption text-secondary-muted-foreground", children: [
2759
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex items-center gap-2", children: [
2828
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between text-ui-caption text-secondary-muted-foreground", children: [
2829
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex items-center gap-2", children: [
2760
2830
  size,
2761
- status === "complete" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Tag, { variant: "success", children: "Complete" }),
2762
- status === "error" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Tag, { variant: "destructive", children: "Error" }),
2763
- uploading && timeLeft && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_jsx_runtime38.Fragment, { children: [
2764
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2831
+ status === "complete" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Tag, { variant: "success", children: "Complete" }),
2832
+ status === "error" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Tag, { variant: "destructive", children: "Error" }),
2833
+ uploading && timeLeft && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
2834
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2765
2835
  timeLeft
2766
2836
  ] })
2767
2837
  ] }),
2768
- uploading && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "text-body-xxs font-normal", children: [
2838
+ uploading && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "text-body-xxs font-normal", children: [
2769
2839
  Math.round(progress),
2770
2840
  "%"
2771
2841
  ] })
2772
2842
  ] })
2773
2843
  ] })
2774
2844
  ] }),
2775
- uploading && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2845
+ uploading && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2776
2846
  import_radix_ui20.Progress.Root,
2777
2847
  {
2778
2848
  value: progress,
2779
2849
  "aria-label": `Uploading ${name}`,
2780
2850
  className: "h-0.75 w-full overflow-hidden rounded-sm bg-background bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5",
2781
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_radix_ui20.Progress.Indicator, { className: "h-full bg-accent transition-[width]", style: { width: `${progress}%` } })
2851
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_radix_ui20.Progress.Indicator, { className: "h-full bg-accent transition-[width]", style: { width: `${progress}%` } })
2782
2852
  }
2783
2853
  )
2784
2854
  ]
@@ -2789,25 +2859,25 @@ var FileUploadItem = React37.forwardRef(
2789
2859
  FileUploadItem.displayName = "FileUploadItem";
2790
2860
 
2791
2861
  // src/components/Question Types/Media.tsx
2792
- var React38 = __toESM(require("react"), 1);
2793
- var import_react19 = require("@phosphor-icons/react");
2862
+ var React39 = __toESM(require("react"), 1);
2863
+ var import_react20 = require("@phosphor-icons/react");
2794
2864
  var import_radix_ui21 = require("radix-ui");
2795
- var import_jsx_runtime39 = require("react/jsx-runtime");
2865
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2796
2866
  function MediaInfo({ name, details, onRemove, removeLabel, large, className, ...props }) {
2797
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("flex items-center justify-between border-t border-border bg-surface px-6 py-4", className), ...props, children: [
2798
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2799
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: cn("truncate text-surface-foreground", large ? "text-body-section" : "text-ui-label"), children: name }),
2800
- details && /* @__PURE__ */ (0, import_jsx_runtime39.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_runtime39.jsxs)(React38.Fragment, { children: [
2801
- index > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2867
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("flex items-center justify-between border-t border-border bg-surface px-6 py-4", className), ...props, children: [
2868
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2869
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: cn("truncate text-surface-foreground", large ? "text-body-section" : "text-ui-label"), children: name }),
2870
+ details && /* @__PURE__ */ (0, import_jsx_runtime40.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_runtime40.jsxs)(React39.Fragment, { children: [
2871
+ index > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2802
2872
  part
2803
2873
  ] }, part)) })
2804
2874
  ] }),
2805
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button, { type: "button", variant: "destructive", size: "icon", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.Trash, { size: 16, "aria-hidden": true }) })
2875
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Button, { type: "button", variant: "destructive", size: "icon", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react20.Trash, { size: 16, "aria-hidden": true }) })
2806
2876
  ] });
2807
2877
  }
2808
- var ImagePreview = React38.forwardRef(
2809
- ({ className, children, name, details, onRemove, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border", className), ...props, children: [
2810
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2878
+ var ImagePreview = React39.forwardRef(
2879
+ ({ className, children, name, details, onRemove, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border", className), ...props, children: [
2880
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2811
2881
  "div",
2812
2882
  {
2813
2883
  className: cn(
@@ -2818,12 +2888,12 @@ var ImagePreview = React38.forwardRef(
2818
2888
  children
2819
2889
  }
2820
2890
  ),
2821
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MediaInfo, { name, details, onRemove, large: true })
2891
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(MediaInfo, { name, details, onRemove, large: true })
2822
2892
  ] })
2823
2893
  );
2824
2894
  ImagePreview.displayName = "ImagePreview";
2825
- var ImageThumbnails = React38.forwardRef(
2826
- ({ className, max, images, value, onValueChange, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2895
+ var ImageThumbnails = React39.forwardRef(
2896
+ ({ className, max, images, value, onValueChange, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2827
2897
  import_radix_ui21.ToggleGroup.Root,
2828
2898
  {
2829
2899
  ref,
@@ -2835,17 +2905,17 @@ var ImageThumbnails = React38.forwardRef(
2835
2905
  children: Array.from({ length: max }, (_, index) => {
2836
2906
  const image = images[index];
2837
2907
  if (!image) {
2838
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2908
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2839
2909
  "span",
2840
2910
  {
2841
2911
  "aria-hidden": "true",
2842
2912
  className: "flex h-20 min-w-0 flex-1 items-center justify-center rounded-sm border border-dashed border-border text-accent-foreground",
2843
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.Image, { size: 24 })
2913
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react20.Image, { size: 24 })
2844
2914
  },
2845
2915
  `empty-${index}`
2846
2916
  );
2847
2917
  }
2848
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2918
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2849
2919
  import_radix_ui21.ToggleGroup.Item,
2850
2920
  {
2851
2921
  value: image.id,
@@ -2855,7 +2925,7 @@ var ImageThumbnails = React38.forwardRef(
2855
2925
  "hover:bg-accent-soft hover:bg-none",
2856
2926
  "data-[state=on]:border-accent-foreground data-[state=on]:bg-accent-soft data-[state=on]:bg-none data-[state=on]:text-accent-foreground"
2857
2927
  ),
2858
- children: image.src ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("img", { src: image.src, alt: "", className: "size-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.Image, { size: 24, "aria-hidden": true })
2928
+ children: image.src ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("img", { src: image.src, alt: "", className: "size-full object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react20.Image, { size: 24, "aria-hidden": true })
2859
2929
  },
2860
2930
  image.id
2861
2931
  );
@@ -2868,13 +2938,13 @@ var formatTime = (seconds) => {
2868
2938
  const total = Math.max(0, Math.floor(Number.isFinite(seconds) ? seconds : 0));
2869
2939
  return `${Math.floor(total / 60)}:${String(total % 60).padStart(2, "0")}`;
2870
2940
  };
2871
- var VideoPlayer = React38.forwardRef(
2941
+ var VideoPlayer = React39.forwardRef(
2872
2942
  ({ className, src, name, details, onRemove, onMore, initialTime = 0, initialDuration = 0, ...props }, ref) => {
2873
- const video = React38.useRef(null);
2874
- const [playing, setPlaying] = React38.useState(false);
2875
- const [time, setTime] = React38.useState(initialTime);
2876
- const [duration, setDuration] = React38.useState(initialDuration);
2877
- const [volume, setVolume] = React38.useState(1);
2943
+ const video = React39.useRef(null);
2944
+ const [playing, setPlaying] = React39.useState(false);
2945
+ const [time, setTime] = React39.useState(initialTime);
2946
+ const [duration, setDuration] = React39.useState(initialDuration);
2947
+ const [volume, setVolume] = React39.useState(1);
2878
2948
  const muted = volume === 0;
2879
2949
  const toggle2 = () => {
2880
2950
  const el = video.current;
@@ -2882,9 +2952,9 @@ var VideoPlayer = React38.forwardRef(
2882
2952
  if (el.paused) void el.play();
2883
2953
  else el.pause();
2884
2954
  };
2885
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border bg-surface", className), ...props, children: [
2886
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "relative flex h-60.5 w-full items-end bg-accent-soft", children: [
2887
- src && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2955
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border bg-surface", className), ...props, children: [
2956
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "relative flex h-60.5 w-full items-end bg-accent-soft", children: [
2957
+ src && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2888
2958
  "video",
2889
2959
  {
2890
2960
  ref: video,
@@ -2897,8 +2967,8 @@ var VideoPlayer = React38.forwardRef(
2897
2967
  onVolumeChange: (event) => setVolume(event.currentTarget.muted ? 0 : event.currentTarget.volume)
2898
2968
  }
2899
2969
  ),
2900
- /* @__PURE__ */ (0, import_jsx_runtime39.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: [
2901
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
2970
+ /* @__PURE__ */ (0, import_jsx_runtime40.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: [
2971
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
2902
2972
  import_radix_ui21.Slider.Root,
2903
2973
  {
2904
2974
  min: 0,
@@ -2912,31 +2982,31 @@ var VideoPlayer = React38.forwardRef(
2912
2982
  },
2913
2983
  className: "relative flex h-4 w-full touch-none items-center select-none",
2914
2984
  children: [
2915
- /* @__PURE__ */ (0, import_jsx_runtime39.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_runtime39.jsx)(import_radix_ui21.Slider.Range, { className: "absolute h-full bg-accent-foreground" }) }),
2916
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_radix_ui21.Slider.Thumb, { "aria-label": "Seek", className: "block size-3 rounded-full border-2 border-surface bg-surface shadow-sm" })
2985
+ /* @__PURE__ */ (0, import_jsx_runtime40.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_runtime40.jsx)(import_radix_ui21.Slider.Range, { className: "absolute h-full bg-accent-foreground" }) }),
2986
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_radix_ui21.Slider.Thumb, { "aria-label": "Seek", className: "block size-3 rounded-full border-2 border-surface bg-surface shadow-sm" })
2917
2987
  ]
2918
2988
  }
2919
2989
  ),
2920
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between", children: [
2921
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-4", children: [
2922
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
2990
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center justify-between", children: [
2991
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-4", children: [
2992
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2923
2993
  "button",
2924
2994
  {
2925
2995
  type: "button",
2926
2996
  "aria-label": playing ? "Pause" : "Play",
2927
2997
  onClick: toggle2,
2928
2998
  className: "inline-flex size-10 items-center justify-center rounded-full bg-surface/12 text-surface transition-colors hover:bg-surface/20",
2929
- children: playing ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.Pause, { size: 16, weight: "fill", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.Play, { size: 16, weight: "fill", "aria-hidden": true })
2999
+ children: playing ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react20.Pause, { size: 16, weight: "fill", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react20.Play, { size: 16, weight: "fill", "aria-hidden": true })
2930
3000
  }
2931
3001
  ),
2932
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "text-ui-label whitespace-nowrap text-surface/80", children: [
3002
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "text-ui-label whitespace-nowrap text-surface/80", children: [
2933
3003
  formatTime(time),
2934
3004
  " / ",
2935
3005
  formatTime(duration)
2936
3006
  ] })
2937
3007
  ] }),
2938
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2", children: [
2939
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3008
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-2", children: [
3009
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2940
3010
  VolumeControl,
2941
3011
  {
2942
3012
  volume,
@@ -2949,41 +3019,41 @@ var VideoPlayer = React38.forwardRef(
2949
3019
  }
2950
3020
  }
2951
3021
  ),
2952
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3022
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2953
3023
  "button",
2954
3024
  {
2955
3025
  type: "button",
2956
3026
  "aria-label": "Full screen",
2957
3027
  onClick: () => void video.current?.requestFullscreen?.(),
2958
3028
  className: "inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12",
2959
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.CornersOut, { size: 16, "aria-hidden": true })
3029
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react20.CornersOut, { size: 16, "aria-hidden": true })
2960
3030
  }
2961
3031
  ),
2962
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3032
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2963
3033
  "button",
2964
3034
  {
2965
3035
  type: "button",
2966
3036
  "aria-label": "More",
2967
3037
  onClick: onMore,
2968
3038
  className: "inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12",
2969
- children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.DotsThree, { size: 16, "aria-hidden": true })
3039
+ children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react20.DotsThree, { size: 16, "aria-hidden": true })
2970
3040
  }
2971
3041
  )
2972
3042
  ] })
2973
3043
  ] })
2974
3044
  ] })
2975
3045
  ] }),
2976
- name && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(MediaInfo, { name, details, onRemove }),
2977
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "sr-only", "aria-live": "polite", children: muted ? "Muted" : "" })
3046
+ name && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(MediaInfo, { name, details, onRemove }),
3047
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "sr-only", "aria-live": "polite", children: muted ? "Muted" : "" })
2978
3048
  ] });
2979
3049
  }
2980
3050
  );
2981
3051
  VideoPlayer.displayName = "VideoPlayer";
2982
3052
  function VolumeControl({ volume, onVolumeChange, className }) {
2983
- const last = React38.useRef(volume || 1);
3053
+ const last = React39.useRef(volume || 1);
2984
3054
  if (volume > 0) last.current = volume;
2985
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("group/volume flex items-center", className), children: [
2986
- /* @__PURE__ */ (0, import_jsx_runtime39.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_runtime39.jsxs)(
3055
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("group/volume flex items-center", className), children: [
3056
+ /* @__PURE__ */ (0, import_jsx_runtime40.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_runtime40.jsxs)(
2987
3057
  import_radix_ui21.Slider.Root,
2988
3058
  {
2989
3059
  min: 0,
@@ -2993,32 +3063,32 @@ function VolumeControl({ volume, onVolumeChange, className }) {
2993
3063
  onValueChange: ([next]) => next !== void 0 && onVolumeChange(next),
2994
3064
  className: "relative flex h-4 w-14 touch-none items-center select-none",
2995
3065
  children: [
2996
- /* @__PURE__ */ (0, import_jsx_runtime39.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_runtime39.jsx)(import_radix_ui21.Slider.Range, { className: "absolute h-full bg-surface" }) }),
2997
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_radix_ui21.Slider.Thumb, { "aria-label": "Volume", className: "block size-3 rounded-full bg-surface shadow-sm" })
3066
+ /* @__PURE__ */ (0, import_jsx_runtime40.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_runtime40.jsx)(import_radix_ui21.Slider.Range, { className: "absolute h-full bg-surface" }) }),
3067
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_radix_ui21.Slider.Thumb, { "aria-label": "Volume", className: "block size-3 rounded-full bg-surface shadow-sm" })
2998
3068
  ]
2999
3069
  }
3000
3070
  ) }),
3001
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3071
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3002
3072
  "button",
3003
3073
  {
3004
3074
  type: "button",
3005
3075
  "aria-label": volume === 0 ? "Unmute" : "Mute",
3006
3076
  onClick: () => onVolumeChange(volume === 0 ? last.current : 0),
3007
3077
  className: "inline-flex size-10 items-center justify-center rounded-md text-surface transition-colors hover:bg-surface/12",
3008
- children: volume === 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.SpeakerSimpleX, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react19.SpeakerSimpleHigh, { size: 16, "aria-hidden": true })
3078
+ children: volume === 0 ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react20.SpeakerSimpleX, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react20.SpeakerSimpleHigh, { size: 16, "aria-hidden": true })
3009
3079
  }
3010
3080
  )
3011
3081
  ] });
3012
3082
  }
3013
3083
 
3014
3084
  // src/components/Question Types/OpenEndAnswer.tsx
3015
- var React39 = __toESM(require("react"), 1);
3016
- var import_jsx_runtime40 = require("react/jsx-runtime");
3017
- var OpenEndAnswer = React39.forwardRef(
3085
+ var React40 = __toESM(require("react"), 1);
3086
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3087
+ var OpenEndAnswer = React40.forwardRef(
3018
3088
  ({ value, defaultValue, onChange, maxLength = 1e3, placeholder = "Write your answer", ...props }, ref) => {
3019
- const [internal, setInternal] = React39.useState(String(defaultValue ?? ""));
3089
+ const [internal, setInternal] = React40.useState(String(defaultValue ?? ""));
3020
3090
  const text = value !== void 0 ? String(value) : internal;
3021
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3091
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3022
3092
  Textarea,
3023
3093
  {
3024
3094
  ref,
@@ -3038,10 +3108,10 @@ var OpenEndAnswer = React39.forwardRef(
3038
3108
  OpenEndAnswer.displayName = "OpenEndAnswer";
3039
3109
 
3040
3110
  // src/components/Question Types/QuestionCard.tsx
3041
- var React40 = __toESM(require("react"), 1);
3042
- var import_jsx_runtime41 = require("react/jsx-runtime");
3043
- var QuestionCard = React40.forwardRef(
3044
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3111
+ var React41 = __toESM(require("react"), 1);
3112
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3113
+ var QuestionCard = React41.forwardRef(
3114
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3045
3115
  "div",
3046
3116
  {
3047
3117
  ref,
@@ -3053,8 +3123,8 @@ var QuestionCard = React40.forwardRef(
3053
3123
  QuestionCard.displayName = "QuestionCard";
3054
3124
 
3055
3125
  // src/components/Question Types/QuestionEditorCard.tsx
3056
- var React43 = __toESM(require("react"), 1);
3057
- var import_react22 = require("@phosphor-icons/react");
3126
+ var React45 = __toESM(require("react"), 1);
3127
+ var import_react23 = require("@phosphor-icons/react");
3058
3128
 
3059
3129
  // src/lib/keepEditingFocus.ts
3060
3130
  function keepEditingFocus(event) {
@@ -3065,91 +3135,104 @@ function keepEditingFocus(event) {
3065
3135
  }
3066
3136
 
3067
3137
  // src/components/Question Types/QuestionHeader.tsx
3068
- var React42 = __toESM(require("react"), 1);
3069
- var import_react21 = require("@phosphor-icons/react");
3138
+ var React44 = __toESM(require("react"), 1);
3139
+
3140
+ // src/components/Question Types/QuestionNumberTag.tsx
3141
+ var React43 = __toESM(require("react"), 1);
3142
+ var import_react22 = require("@phosphor-icons/react");
3070
3143
 
3071
3144
  // src/components/Question Types/QuestionTypeIcon.tsx
3072
- var React41 = require("react");
3073
- var import_react20 = require("@phosphor-icons/react");
3074
- var import_jsx_runtime42 = require("react/jsx-runtime");
3145
+ var React42 = require("react");
3146
+ var import_react21 = require("@phosphor-icons/react");
3147
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3075
3148
  var icons = {
3076
- "select-one": import_react20.RadioButton,
3077
- "select-multiple": import_react20.CheckSquare,
3078
- ranking: import_react20.ListNumbers,
3079
- upload: import_react20.FileArrowUp,
3080
- "upload-video": import_react20.VideoCamera,
3081
- "upload-photo": import_react20.Image,
3082
- "upload-document": import_react20.FileText,
3083
- rating: import_react20.StarHalf,
3084
- "open-end": import_react20.ChatsCircle,
3085
- "screen-recording": import_react20.VideoCamera
3149
+ "select-one": import_react21.RadioButton,
3150
+ "select-multiple": import_react21.CheckSquare,
3151
+ ranking: import_react21.ListNumbers,
3152
+ upload: import_react21.FileArrowUp,
3153
+ "upload-video": import_react21.VideoCamera,
3154
+ "upload-photo": import_react21.Image,
3155
+ "upload-document": import_react21.FileText,
3156
+ rating: import_react21.StarHalf,
3157
+ "open-end": import_react21.ChatsCircle,
3158
+ "screen-recording": import_react21.VideoCamera
3086
3159
  };
3087
3160
  function QuestionTypeIcon({ type, size = 22.5, className, ...props }) {
3088
3161
  const Icon = icons[type];
3089
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Icon, { size, weight: "duotone", "aria-hidden": true, className: className ?? "text-accent-foreground", ...props });
3162
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Icon, { size, weight: "duotone", "aria-hidden": true, className: className ?? "text-accent-foreground", ...props });
3090
3163
  }
3091
3164
 
3165
+ // src/components/Question Types/QuestionNumberTag.tsx
3166
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3167
+ var QuestionNumberTag = React43.forwardRef(
3168
+ ({ number, active, questionType, showDragHandle = true, dragHandleProps, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3169
+ "span",
3170
+ {
3171
+ ref,
3172
+ "aria-label": dragHandleProps ? `Reorder question ${number}` : void 0,
3173
+ ...props,
3174
+ ...dragHandleProps,
3175
+ className: cn(
3176
+ "group/handle inline-flex h-6 shrink-0 items-center gap-1 rounded-sm px-2.5 text-ui-caption",
3177
+ // The tag makes room for the grip on hover, and inside a QuestionEditorCard whenever the card is hovered. With a type icon the grip
3178
+ // takes the icon's place, so the tag keeps its padding and its width.
3179
+ showDragHandle && !questionType && "hover:pl-1 group-hover/editor:pl-1 group-data-[hovered]/editor:pl-1",
3180
+ active ? "bg-accent-soft text-accent-soft-foreground" : "bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground",
3181
+ dragHandleProps && "cursor-grab touch-none select-none",
3182
+ dragHandleProps && showDragHandle && !questionType && "focus-visible:pl-1",
3183
+ className,
3184
+ dragHandleProps?.className
3185
+ ),
3186
+ children: [
3187
+ questionType && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3188
+ QuestionTypeIcon,
3189
+ {
3190
+ type: questionType,
3191
+ size: 16,
3192
+ className: cn("shrink-0", showDragHandle && "group-hover/editor:hidden group-data-[hovered]/editor:hidden group-hover/handle:hidden group-focus-visible/handle:hidden")
3193
+ }
3194
+ ),
3195
+ showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3196
+ import_react22.DotsSixVertical,
3197
+ {
3198
+ size: 16,
3199
+ "aria-hidden": true,
3200
+ className: "hidden shrink-0 group-hover/editor:block group-data-[hovered]/editor:block group-hover/handle:block group-focus-visible/handle:block"
3201
+ }
3202
+ ),
3203
+ "Question ",
3204
+ number
3205
+ ]
3206
+ }
3207
+ )
3208
+ );
3209
+ QuestionNumberTag.displayName = "QuestionNumberTag";
3210
+
3092
3211
  // src/components/Question Types/QuestionHeader.tsx
3093
- var import_jsx_runtime43 = require("react/jsx-runtime");
3212
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3094
3213
  var eyebrow = "text-ui-caption uppercase text-secondary-muted-foreground";
3095
- var QuestionHeader = React42.forwardRef(
3214
+ var QuestionHeader = React44.forwardRef(
3096
3215
  ({ 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, ...props }, ref) => {
3097
- const [draft, setDraft] = React42.useState(null);
3216
+ const [draft, setDraft] = React44.useState(null);
3098
3217
  const label = String(number).padStart(2, "0");
3099
3218
  const showError = error !== void 0 && error !== false;
3100
3219
  if (editor) {
3101
3220
  const text = typeof title === "string" ? title : "";
3102
3221
  const count = (draft ?? text).length;
3103
3222
  const long = titleRecommendedMax !== void 0 && count > titleRecommendedMax;
3104
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { ref, className: cn("group/header flex w-full flex-col gap-2", className), ...props, children: [
3105
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center justify-between", children: [
3106
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center gap-2", children: [
3107
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
3108
- "span",
3109
- {
3110
- "aria-label": dragHandleProps ? `Reorder question ${number}` : void 0,
3111
- ...dragHandleProps,
3112
- className: cn(
3113
- "group/handle inline-flex h-6 items-center gap-1 rounded-sm px-2.5 text-ui-caption",
3114
- // The tag makes room for the grip on hover, and inside a QuestionEditorCard whenever the card is hovered. With a type icon the grip
3115
- // takes the icon's place, so the tag keeps its padding and its width.
3116
- showDragHandle && !questionType && "hover:pl-1 group-hover/editor:pl-1 group-data-[hovered]/editor:pl-1",
3117
- active ? "bg-accent-soft text-accent-soft-foreground" : "bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5 text-surface-foreground",
3118
- dragHandleProps && "cursor-grab touch-none select-none",
3119
- dragHandleProps && showDragHandle && !questionType && "focus-visible:pl-1",
3120
- dragHandleProps?.className
3121
- ),
3122
- children: [
3123
- questionType && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3124
- QuestionTypeIcon,
3125
- {
3126
- type: questionType,
3127
- size: 16,
3128
- className: cn("shrink-0", showDragHandle && "group-hover/editor:hidden group-data-[hovered]/editor:hidden group-hover/handle:hidden group-focus-visible/handle:hidden")
3129
- }
3130
- ),
3131
- showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3132
- import_react21.DotsSixVertical,
3133
- {
3134
- size: 16,
3135
- "aria-hidden": true,
3136
- className: "hidden shrink-0 group-hover/editor:block group-data-[hovered]/editor:block group-hover/handle:block group-focus-visible/handle:block"
3137
- }
3138
- ),
3139
- "Question ",
3140
- number
3141
- ]
3142
- }
3143
- ),
3223
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { ref, className: cn("group/header flex w-full flex-col gap-2", className), ...props, children: [
3224
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center justify-between", children: [
3225
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-2", children: [
3226
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(QuestionNumberTag, { number, active, questionType, showDragHandle, dragHandleProps }),
3144
3227
  meta
3145
3228
  ] }),
3146
- actions && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: cn(
3229
+ actions && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn(
3147
3230
  "flex items-center gap-2 opacity-0 transition-opacity group-focus-within/header:opacity-100 group-hover/header:opacity-100",
3148
3231
  // Inside a QuestionEditorCard, hovering or focusing anywhere on the card reveals them too.
3149
3232
  "group-focus-within/editor:opacity-100 group-hover/editor:opacity-100 group-data-[hovered]/editor:opacity-100"
3150
3233
  ), children: actions })
3151
3234
  ] }),
3152
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3235
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3153
3236
  InlineEdit,
3154
3237
  {
3155
3238
  variant: "question",
@@ -3174,8 +3257,8 @@ var QuestionHeader = React42.forwardRef(
3174
3257
  textClassName: long ? "text-body-base" : "text-heading-h4"
3175
3258
  }
3176
3259
  ),
3177
- long && titleRecommendedNote != null && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: titleRecommendedNote }),
3178
- showCounter && titleMinLength === void 0 && maxLength !== void 0 && count > maxLength && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
3260
+ long && titleRecommendedNote != null && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: titleRecommendedNote }),
3261
+ showCounter && titleMinLength === void 0 && maxLength !== void 0 && count > maxLength && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
3179
3262
  count,
3180
3263
  "/",
3181
3264
  maxLength,
@@ -3183,16 +3266,16 @@ var QuestionHeader = React42.forwardRef(
3183
3266
  ] })
3184
3267
  ] });
3185
3268
  }
3186
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
3187
- showError && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ToastInline, { variant: "destructive", onClose: onDismissError, className: "min-h-10", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-ui-label text-destructive", children: error === true ? "This question is mandatory." : error }) }),
3188
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: eyebrow, children: [
3269
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
3270
+ showError && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(ToastInline, { variant: "destructive", onClose: onDismissError, className: "min-h-10", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "text-ui-label text-destructive", children: error === true ? "This question is mandatory." : error }) }),
3271
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("p", { className: eyebrow, children: [
3189
3272
  "Question ",
3190
3273
  label
3191
3274
  ] }),
3192
- /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("h3", { className: "text-heading-h4 text-surface-foreground", children: [
3275
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("h3", { className: "text-heading-h4 text-surface-foreground", children: [
3193
3276
  title,
3194
- required && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { "aria-hidden": "true", className: "text-destructive", children: "*" }),
3195
- required && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "sr-only", children: " (required)" })
3277
+ required && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { "aria-hidden": "true", className: "text-destructive", children: "*" }),
3278
+ required && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "sr-only", children: " (required)" })
3196
3279
  ] })
3197
3280
  ] });
3198
3281
  }
@@ -3200,8 +3283,8 @@ var QuestionHeader = React42.forwardRef(
3200
3283
  QuestionHeader.displayName = "QuestionHeader";
3201
3284
 
3202
3285
  // src/components/Question Types/QuestionEditorCard.tsx
3203
- var import_jsx_runtime44 = require("react/jsx-runtime");
3204
- var QuestionEditorCard = React43.forwardRef(
3286
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3287
+ var QuestionEditorCard = React45.forwardRef(
3205
3288
  ({
3206
3289
  className,
3207
3290
  number,
@@ -3236,7 +3319,7 @@ var QuestionEditorCard = React43.forwardRef(
3236
3319
  ...props
3237
3320
  }, ref) => {
3238
3321
  const footer = active && (countLabel != null || onAdd || onPaste);
3239
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3322
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3240
3323
  "div",
3241
3324
  {
3242
3325
  ref,
@@ -3248,7 +3331,7 @@ var QuestionEditorCard = React43.forwardRef(
3248
3331
  props.onMouseDown?.(event);
3249
3332
  },
3250
3333
  children: [
3251
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
3334
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3252
3335
  "div",
3253
3336
  {
3254
3337
  className: cn(
@@ -3256,9 +3339,9 @@ var QuestionEditorCard = React43.forwardRef(
3256
3339
  active ? "border-accent" : "border-border"
3257
3340
  ),
3258
3341
  children: [
3259
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn("flex flex-col p-6", footer ? "gap-5" : "gap-4"), children: [
3260
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex flex-col gap-4", children: [
3261
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3342
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("flex flex-col p-6", footer ? "gap-5" : "gap-4"), children: [
3343
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col gap-4", children: [
3344
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3262
3345
  QuestionHeader,
3263
3346
  {
3264
3347
  editor: true,
@@ -3280,8 +3363,8 @@ var QuestionEditorCard = React43.forwardRef(
3280
3363
  onTitleMarkDismiss,
3281
3364
  meta,
3282
3365
  maxLength,
3283
- actions: actions ?? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_jsx_runtime44.Fragment, { children: [
3284
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3366
+ actions: actions ?? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
3367
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3285
3368
  Button,
3286
3369
  {
3287
3370
  type: "button",
@@ -3289,10 +3372,10 @@ var QuestionEditorCard = React43.forwardRef(
3289
3372
  size: "icon-sm",
3290
3373
  "aria-label": "Duplicate question",
3291
3374
  onClick: onDuplicate,
3292
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.Copy, { size: 16, "aria-hidden": true })
3375
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react23.Copy, { size: 16, "aria-hidden": true })
3293
3376
  }
3294
3377
  ),
3295
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3378
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3296
3379
  Button,
3297
3380
  {
3298
3381
  type: "button",
@@ -3300,10 +3383,10 @@ var QuestionEditorCard = React43.forwardRef(
3300
3383
  size: "icon-sm",
3301
3384
  "aria-label": "Delete question",
3302
3385
  onClick: onDelete,
3303
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.Trash, { size: 16, "aria-hidden": true })
3386
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react23.Trash, { size: 16, "aria-hidden": true })
3304
3387
  }
3305
3388
  ),
3306
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3389
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3307
3390
  Button,
3308
3391
  {
3309
3392
  type: "button",
@@ -3311,7 +3394,7 @@ var QuestionEditorCard = React43.forwardRef(
3311
3394
  size: "icon-sm",
3312
3395
  "aria-label": "Preview question",
3313
3396
  onClick: onPreview,
3314
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.Eye, { size: 16, "aria-hidden": true })
3397
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react23.Eye, { size: 16, "aria-hidden": true })
3315
3398
  }
3316
3399
  )
3317
3400
  ] })
@@ -3319,18 +3402,18 @@ var QuestionEditorCard = React43.forwardRef(
3319
3402
  ),
3320
3403
  children
3321
3404
  ] }),
3322
- error && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("p", { className: "flex items-center gap-1 text-ui-caption text-destructive-foreground", children: [
3323
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.Warning, { size: 16, "aria-hidden": true, className: "shrink-0" }),
3405
+ error && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("p", { className: "flex items-center gap-1 text-ui-caption text-destructive-foreground", children: [
3406
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react23.Warning, { size: 16, "aria-hidden": true, className: "shrink-0" }),
3324
3407
  error
3325
3408
  ] }),
3326
- footer && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center justify-between", children: [
3327
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: countLabel }),
3328
- /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center gap-2", children: [
3329
- onAdd && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Button, { type: "button", variant: "outline", onClick: onAdd, children: [
3330
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.Plus, { size: 16, "aria-hidden": true }),
3409
+ footer && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center justify-between", children: [
3410
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: countLabel }),
3411
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-2", children: [
3412
+ onAdd && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Button, { type: "button", variant: "outline", onClick: onAdd, children: [
3413
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react23.Plus, { size: 16, "aria-hidden": true }),
3331
3414
  "Add choice"
3332
3415
  ] }),
3333
- onPaste && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3416
+ onPaste && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3334
3417
  Button,
3335
3418
  {
3336
3419
  type: "button",
@@ -3338,17 +3421,17 @@ var QuestionEditorCard = React43.forwardRef(
3338
3421
  size: "icon",
3339
3422
  "aria-label": "Paste choices",
3340
3423
  onClick: onPaste,
3341
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.Clipboard, { size: 16, "aria-hidden": true })
3424
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react23.Clipboard, { size: 16, "aria-hidden": true })
3342
3425
  }
3343
3426
  )
3344
3427
  ] })
3345
3428
  ] })
3346
3429
  ] }),
3347
- note && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "border-t border-border px-2 py-2 text-body-small text-surface-foreground", children: note })
3430
+ note && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "border-t border-border px-2 py-2 text-body-small text-surface-foreground", children: note })
3348
3431
  ]
3349
3432
  }
3350
3433
  ),
3351
- onAskAi && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3434
+ onAskAi && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3352
3435
  Button,
3353
3436
  {
3354
3437
  type: "button",
@@ -3357,7 +3440,7 @@ var QuestionEditorCard = React43.forwardRef(
3357
3440
  "aria-label": "Ask AI",
3358
3441
  onClick: onAskAi,
3359
3442
  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",
3360
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react22.Sparkle, { size: 16, "aria-hidden": true })
3443
+ children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react23.Sparkle, { size: 16, "aria-hidden": true })
3361
3444
  }
3362
3445
  )
3363
3446
  ]
@@ -3368,15 +3451,15 @@ var QuestionEditorCard = React43.forwardRef(
3368
3451
  QuestionEditorCard.displayName = "QuestionEditorCard";
3369
3452
 
3370
3453
  // src/components/Question Types/QuestionNavItem.tsx
3371
- var React44 = __toESM(require("react"), 1);
3372
- var import_react23 = require("@phosphor-icons/react");
3454
+ var React46 = __toESM(require("react"), 1);
3455
+ var import_react24 = require("@phosphor-icons/react");
3373
3456
  var import_radix_ui22 = require("radix-ui");
3374
- var import_jsx_runtime45 = require("react/jsx-runtime");
3375
- var QuestionNavItem = React44.forwardRef(
3457
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3458
+ var QuestionNavItem = React46.forwardRef(
3376
3459
  ({ className, questionType = "select-one", selected, error, warning, asChild, showDragHandle = true, hovered, children, ...props }, ref) => {
3377
3460
  const Comp = asChild ? import_radix_ui22.Slot.Root : "button";
3378
3461
  const warn = !error && !!warning;
3379
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3462
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3380
3463
  Comp,
3381
3464
  {
3382
3465
  ref,
@@ -3395,9 +3478,9 @@ var QuestionNavItem = React44.forwardRef(
3395
3478
  ),
3396
3479
  ...props,
3397
3480
  children: [
3398
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { "aria-hidden": "true", className: "relative flex size-4 shrink-0 items-center justify-center", children: [
3399
- showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.DotsSixVertical, { size: 16, className: "hidden group-hover/nav:block group-data-[hovered]/nav:block" }),
3400
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: showDragHandle ? "group-hover/nav:hidden group-data-[hovered]/nav:hidden" : void 0, children: error ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.WarningCircle, { size: 16, className: "text-destructive-foreground" }) : warn ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react23.Warning, { size: 16, className: "text-warning-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3481
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { "aria-hidden": "true", className: "relative flex size-4 shrink-0 items-center justify-center", children: [
3482
+ showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react24.DotsSixVertical, { size: 16, className: "hidden group-hover/nav:block group-data-[hovered]/nav:block" }),
3483
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: showDragHandle ? "group-hover/nav:hidden group-data-[hovered]/nav:hidden" : void 0, children: error ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react24.WarningCircle, { size: 16, className: "text-destructive-foreground" }) : warn ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react24.Warning, { size: 16, className: "text-warning-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3401
3484
  QuestionTypeIcon,
3402
3485
  {
3403
3486
  type: questionType,
@@ -3406,9 +3489,9 @@ var QuestionNavItem = React44.forwardRef(
3406
3489
  }
3407
3490
  ) })
3408
3491
  ] }),
3409
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "min-w-0 flex-1 truncate", children }),
3410
- error && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "sr-only", children: ", has errors" }),
3411
- warn && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "sr-only", children: ", has warnings" })
3492
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "min-w-0 flex-1 truncate", children }),
3493
+ error && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "sr-only", children: ", has errors" }),
3494
+ warn && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "sr-only", children: ", has warnings" })
3412
3495
  ]
3413
3496
  }
3414
3497
  );
@@ -3417,14 +3500,14 @@ var QuestionNavItem = React44.forwardRef(
3417
3500
  QuestionNavItem.displayName = "QuestionNavItem";
3418
3501
 
3419
3502
  // src/components/Question Types/QuestionOption.tsx
3420
- var React45 = __toESM(require("react"), 1);
3421
- var import_react24 = require("@phosphor-icons/react");
3422
- var import_jsx_runtime46 = require("react/jsx-runtime");
3503
+ var React47 = __toESM(require("react"), 1);
3504
+ var import_react25 = require("@phosphor-icons/react");
3505
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3423
3506
  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";
3424
3507
  function QuestionOption(props) {
3425
- const id = React45.useId();
3426
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("label", { htmlFor: id, className: cn(optionClasses, props.className), children: [
3427
- props.kind === "checkbox" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3508
+ const id = React47.useId();
3509
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { htmlFor: id, className: cn(optionClasses, props.className), children: [
3510
+ props.kind === "checkbox" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3428
3511
  Checkbox,
3429
3512
  {
3430
3513
  id,
@@ -3433,16 +3516,16 @@ function QuestionOption(props) {
3433
3516
  onCheckedChange: (next) => props.onCheckedChange?.(next === true),
3434
3517
  disabled: props.disabled
3435
3518
  }
3436
- ) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(RadioGroupItem, { id, value: props.value, disabled: props.disabled }),
3437
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "min-w-0 flex-1", children: props.label })
3519
+ ) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(RadioGroupItem, { id, value: props.value, disabled: props.disabled }),
3520
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "min-w-0 flex-1", children: props.label })
3438
3521
  ] });
3439
3522
  }
3440
- var QuestionOtherOption = React45.forwardRef(
3523
+ var QuestionOtherOption = React47.forwardRef(
3441
3524
  ({ className, onSubmit, confirmLabel = "Confirm answer", placeholder = "Type your answer", ...props }, ref) => {
3442
- const inner = React45.useRef(null);
3443
- React45.useImperativeHandle(ref, () => inner.current);
3525
+ const inner = React47.useRef(null);
3526
+ React47.useImperativeHandle(ref, () => inner.current);
3444
3527
  const submit = () => onSubmit?.(inner.current?.value ?? "");
3445
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3528
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
3446
3529
  "div",
3447
3530
  {
3448
3531
  className: cn(
@@ -3450,7 +3533,7 @@ var QuestionOtherOption = React45.forwardRef(
3450
3533
  className
3451
3534
  ),
3452
3535
  children: [
3453
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3536
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3454
3537
  "input",
3455
3538
  {
3456
3539
  ref: inner,
@@ -3466,7 +3549,7 @@ var QuestionOtherOption = React45.forwardRef(
3466
3549
  ...props
3467
3550
  }
3468
3551
  ),
3469
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Button, { type: "button", variant: "subtle", size: "icon-sm", "aria-label": confirmLabel, onClick: submit, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react24.Check, { size: 16, "aria-hidden": true }) })
3552
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button, { type: "button", variant: "subtle", size: "icon-sm", "aria-label": confirmLabel, onClick: submit, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react25.Check, { size: 16, "aria-hidden": true }) })
3470
3553
  ]
3471
3554
  }
3472
3555
  );
@@ -3481,16 +3564,16 @@ function limitsText2(min, max) {
3481
3564
  function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTone = "muted", minLength, maxLength, onRemove, onAdd, removeDisabled, addDisabled, className, kind, rank, dragHandleProps, lifted, locked, marks, onMarkApply, onMarkDismiss }) {
3482
3565
  const reveal = kind !== void 0;
3483
3566
  const guarded = minLength !== void 0 || maxLength !== void 0;
3484
- const [draft, setDraft] = React45.useState(null);
3485
- const [error, setError] = React45.useState(null);
3486
- const helperId = React45.useId();
3487
- const [focused, setFocused] = React45.useState(false);
3567
+ const [draft, setDraft] = React47.useState(null);
3568
+ const [error, setError] = React47.useState(null);
3569
+ const helperId = React47.useId();
3570
+ const [focused, setFocused] = React47.useState(false);
3488
3571
  const showMarks = !!marks?.length && !focused && draft === null;
3489
- const fieldRef = React45.useRef(null);
3490
- const [editMarks, setEditMarks] = React45.useState([]);
3491
- const [scroll, setScroll] = React45.useState(0);
3572
+ const fieldRef = React47.useRef(null);
3573
+ const [editMarks, setEditMarks] = React47.useState([]);
3574
+ const [scroll, setScroll] = React47.useState(0);
3492
3575
  const typed = guarded ? draft ?? label : label;
3493
- const skipBlur = React45.useRef(false);
3576
+ const skipBlur = React47.useRef(false);
3494
3577
  const problemWith = (text) => minLength !== void 0 && text.trim().length < minLength ? `Enter at least ${minLength} ${minLength === 1 ? "character" : "characters"}.` : null;
3495
3578
  const save = () => {
3496
3579
  if (draft === null) return true;
@@ -3511,9 +3594,9 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3511
3594
  ...dragHandleProps,
3512
3595
  className: cn("cursor-grab touch-none select-none", dragHandleProps.className)
3513
3596
  } : { "aria-hidden": true };
3514
- const grip = dragHandleProps ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { ...gripProps, className: cn("shrink-0", gripProps.className), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react24.DotsSixVertical, { size: 20, "aria-hidden": true, className: "text-surface-foreground" }) }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react24.DotsSixVertical, { size: 20, "aria-hidden": true, className: "shrink-0 text-surface-foreground" });
3515
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
3516
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3597
+ const grip = dragHandleProps ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { ...gripProps, className: cn("shrink-0", gripProps.className), children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react25.DotsSixVertical, { size: 20, "aria-hidden": true, className: "text-surface-foreground" }) }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react25.DotsSixVertical, { size: 20, "aria-hidden": true, className: "shrink-0 text-surface-foreground" });
3598
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
3599
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3517
3600
  "div",
3518
3601
  {
3519
3602
  className: cn(
@@ -3523,10 +3606,10 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3523
3606
  cn("border-border group-hover/option:shadow-md group-focus-within/option:shadow-md", lifted && "shadow-md")
3524
3607
  ) : "border-border hover:border-input-muted hover:shadow-md"
3525
3608
  ),
3526
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex min-w-0 items-start gap-2", children: [
3527
- (kind !== void 0 || !locked) && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex h-7 shrink-0 items-center gap-2", children: kind === "rank" ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
3609
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex min-w-0 items-start gap-2", children: [
3610
+ (kind !== void 0 || !locked) && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex h-7 shrink-0 items-center gap-2", children: kind === "rank" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_jsx_runtime48.Fragment, { children: [
3528
3611
  !locked && grip,
3529
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3612
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3530
3613
  "span",
3531
3614
  {
3532
3615
  "aria-hidden": "true",
@@ -3534,8 +3617,8 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3534
3617
  children: rank
3535
3618
  }
3536
3619
  )
3537
- ] }) : reveal && locked ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime46.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_runtime46.jsxs)("span", { ...gripProps, className: cn("relative flex size-5 shrink-0 items-center justify-center", gripProps.className), children: [
3538
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3620
+ ] }) : reveal && locked ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime48.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_runtime48.jsxs)("span", { ...gripProps, className: cn("relative flex size-5 shrink-0 items-center justify-center", gripProps.className), children: [
3621
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3539
3622
  "span",
3540
3623
  {
3541
3624
  "aria-hidden": "true",
@@ -3546,8 +3629,8 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3546
3629
  )
3547
3630
  }
3548
3631
  ),
3549
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3550
- import_react24.DotsSixVertical,
3632
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3633
+ import_react25.DotsSixVertical,
3551
3634
  {
3552
3635
  size: 20,
3553
3636
  "aria-hidden": true,
@@ -3558,10 +3641,10 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3558
3641
  }
3559
3642
  )
3560
3643
  ] }) : locked ? null : grip }),
3561
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
3562
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "relative min-w-0", children: [
3563
- focused && editMarks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DraftMarks, { layer: "behind", singleLine: true, text: typed, marks: editMarks, scrollLeft: scroll, className: "flex items-center whitespace-pre text-body-base" }),
3564
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3644
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
3645
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "relative min-w-0", children: [
3646
+ focused && editMarks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DraftMarks, { layer: "behind", singleLine: true, text: typed, marks: editMarks, scrollLeft: scroll, className: "flex items-center whitespace-pre text-body-base" }),
3647
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3565
3648
  "input",
3566
3649
  {
3567
3650
  ref: fieldRef,
@@ -3616,24 +3699,24 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3616
3699
  )
3617
3700
  }
3618
3701
  ),
3619
- focused && editMarks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(DraftMarks, { layer: "over", singleLine: true, text: typed, marks: editMarks, scrollLeft: scroll, className: "flex items-center whitespace-pre text-body-base" }),
3620
- showMarks && /* @__PURE__ */ (0, import_jsx_runtime46.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(
3621
- (piece, i) => piece.mark ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(MarkedText, { mark: piece.mark, text: piece.text, onApply: onMarkApply, onDismiss: onMarkDismiss }, `${piece.mark.start}:${piece.text}`) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: piece.text }, i)
3702
+ focused && editMarks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(DraftMarks, { layer: "over", singleLine: true, text: typed, marks: editMarks, scrollLeft: scroll, className: "flex items-center whitespace-pre text-body-base" }),
3703
+ showMarks && /* @__PURE__ */ (0, import_jsx_runtime48.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(
3704
+ (piece, i) => piece.mark ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(MarkedText, { mark: piece.mark, text: piece.text, onApply: onMarkApply, onDismiss: onMarkDismiss }, `${piece.mark.start}:${piece.text}`) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: piece.text }, i)
3622
3705
  ) })
3623
3706
  ] }),
3624
- guarded && draft !== null && (error || lengthOutOfRange(draft, minLength, maxLength)) && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3707
+ guarded && draft !== null && (error || lengthOutOfRange(draft, minLength, maxLength)) && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
3625
3708
  "p",
3626
3709
  {
3627
3710
  id: helperId,
3628
3711
  role: error ? "alert" : void 0,
3629
3712
  className: cn("flex items-start justify-between gap-2 text-ui-caption", error ? "text-destructive" : "text-secondary-muted-foreground"),
3630
3713
  children: [
3631
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "flex items-start gap-2", children: [
3632
- error && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react24.WarningCircle, { size: 16, "aria-hidden": true, className: "shrink-0" }),
3714
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "flex items-start gap-2", children: [
3715
+ error && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react25.WarningCircle, { size: 16, "aria-hidden": true, className: "shrink-0" }),
3633
3716
  limitsText2(minLength, maxLength),
3634
- error && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "sr-only", children: error })
3717
+ error && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "sr-only", children: error })
3635
3718
  ] }),
3636
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { "aria-hidden": true, className: "shrink-0 tabular-nums", children: [
3719
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { "aria-hidden": true, className: "shrink-0 tabular-nums", children: [
3637
3720
  draft.length,
3638
3721
  maxLength !== void 0 && `/${maxLength}`
3639
3722
  ] })
@@ -3644,7 +3727,7 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3644
3727
  ] })
3645
3728
  }
3646
3729
  ),
3647
- !locked && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3730
+ !locked && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
3648
3731
  "div",
3649
3732
  {
3650
3733
  className: cn(
@@ -3652,8 +3735,8 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3652
3735
  reveal && "opacity-0 transition-opacity group-hover/option:opacity-100 group-focus-within/option:opacity-100"
3653
3736
  ),
3654
3737
  children: [
3655
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": "Remove option", disabled: removeDisabled, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react24.Trash, { size: 16, "aria-hidden": true }) }),
3656
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "Add option", disabled: addDisabled, onClick: onAdd, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react24.Plus, { size: 16, "aria-hidden": true }) })
3738
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": "Remove option", disabled: removeDisabled, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react25.Trash, { size: 16, "aria-hidden": true }) }),
3739
+ /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": "Add option", disabled: addDisabled, onClick: onAdd, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_react25.Plus, { size: 16, "aria-hidden": true }) })
3657
3740
  ]
3658
3741
  }
3659
3742
  )
@@ -3661,9 +3744,9 @@ function QuestionOptionEditor({ label, onLabelChange, placeholder, placeholderTo
3661
3744
  }
3662
3745
 
3663
3746
  // src/components/Question Types/RankList.tsx
3664
- var React46 = __toESM(require("react"), 1);
3665
- var import_react25 = require("@phosphor-icons/react");
3666
- var import_jsx_runtime47 = require("react/jsx-runtime");
3747
+ var React48 = __toESM(require("react"), 1);
3748
+ var import_react26 = require("@phosphor-icons/react");
3749
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3667
3750
  function move(list, from, to) {
3668
3751
  if (from === to || to < 0 || to >= list.length) return list;
3669
3752
  const next = list.slice();
@@ -3671,13 +3754,13 @@ function move(list, from, to) {
3671
3754
  next.splice(to, 0, item);
3672
3755
  return next;
3673
3756
  }
3674
- var RankList = React46.forwardRef(
3757
+ var RankList = React48.forwardRef(
3675
3758
  ({ className, items, onItemsChange, ...props }, ref) => {
3676
- const [dragIndex, setDragIndex] = React46.useState(null);
3677
- const [announcement, setAnnouncement] = React46.useState("");
3678
- const handles = React46.useRef(/* @__PURE__ */ new Map());
3679
- const refocus = React46.useRef(null);
3680
- React46.useEffect(() => {
3759
+ const [dragIndex, setDragIndex] = React48.useState(null);
3760
+ const [announcement, setAnnouncement] = React48.useState("");
3761
+ const handles = React48.useRef(/* @__PURE__ */ new Map());
3762
+ const refocus = React48.useRef(null);
3763
+ React48.useEffect(() => {
3681
3764
  if (refocus.current) {
3682
3765
  handles.current.get(refocus.current)?.focus();
3683
3766
  refocus.current = null;
@@ -3690,8 +3773,8 @@ var RankList = React46.forwardRef(
3690
3773
  setAnnouncement(`Moved to position ${to + 1} of ${items.length}`);
3691
3774
  onItemsChange(next);
3692
3775
  };
3693
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
3694
- /* @__PURE__ */ (0, import_jsx_runtime47.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_runtime47.jsxs)(
3776
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
3777
+ /* @__PURE__ */ (0, import_jsx_runtime49.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_runtime49.jsxs)(
3695
3778
  "li",
3696
3779
  {
3697
3780
  draggable: true,
@@ -3708,7 +3791,7 @@ var RankList = React46.forwardRef(
3708
3791
  dragIndex === index && "opacity-50"
3709
3792
  ),
3710
3793
  children: [
3711
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3794
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3712
3795
  "button",
3713
3796
  {
3714
3797
  type: "button",
@@ -3727,10 +3810,10 @@ var RankList = React46.forwardRef(
3727
3810
  }
3728
3811
  },
3729
3812
  className: "inline-flex shrink-0 cursor-grab rounded-xs text-surface-foreground",
3730
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react25.DotsSixVertical, { size: 16, "aria-hidden": true })
3813
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react26.DotsSixVertical, { size: 16, "aria-hidden": true })
3731
3814
  }
3732
3815
  ),
3733
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3816
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3734
3817
  "span",
3735
3818
  {
3736
3819
  "aria-hidden": "true",
@@ -3738,27 +3821,27 @@ var RankList = React46.forwardRef(
3738
3821
  children: index + 1
3739
3822
  }
3740
3823
  ),
3741
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "min-w-0 flex-1", children: item.label })
3824
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "min-w-0 flex-1", children: item.label })
3742
3825
  ]
3743
3826
  },
3744
3827
  item.id
3745
3828
  )) }),
3746
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { role: "status", "aria-live": "polite", className: "sr-only", children: announcement })
3829
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { role: "status", "aria-live": "polite", className: "sr-only", children: announcement })
3747
3830
  ] });
3748
3831
  }
3749
3832
  );
3750
3833
  RankList.displayName = "RankList";
3751
3834
 
3752
3835
  // src/components/Question Types/RatingScale.tsx
3753
- var React47 = __toESM(require("react"), 1);
3836
+ var React49 = __toESM(require("react"), 1);
3754
3837
  var import_radix_ui23 = require("radix-ui");
3755
- var import_jsx_runtime48 = require("react/jsx-runtime");
3756
- var RatingScale = React47.forwardRef(
3838
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3839
+ var RatingScale = React49.forwardRef(
3757
3840
  ({ className, max = 5, value, defaultValue, onValueChange, lowLabel, highLabel, ...props }, ref) => {
3758
- const [internal, setInternal] = React47.useState(defaultValue);
3841
+ const [internal, setInternal] = React49.useState(defaultValue);
3759
3842
  const current = value !== void 0 ? value : internal;
3760
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("flex w-full max-w-150 flex-col gap-2", className), children: [
3761
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3843
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("flex w-full max-w-150 flex-col gap-2", className), children: [
3844
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3762
3845
  import_radix_ui23.ToggleGroup.Root,
3763
3846
  {
3764
3847
  ref,
@@ -3771,7 +3854,7 @@ var RatingScale = React47.forwardRef(
3771
3854
  },
3772
3855
  className: "flex gap-2",
3773
3856
  ...props,
3774
- children: Array.from({ length: max }, (_, i) => i + 1).map((n) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3857
+ children: Array.from({ length: max }, (_, i) => i + 1).map((n) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3775
3858
  import_radix_ui23.ToggleGroup.Item,
3776
3859
  {
3777
3860
  value: String(n),
@@ -3787,9 +3870,9 @@ var RatingScale = React47.forwardRef(
3787
3870
  ))
3788
3871
  }
3789
3872
  ),
3790
- (lowLabel != null || highLabel != null) && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex justify-between text-ui-caption text-secondary-muted-foreground", "aria-hidden": "true", children: [
3791
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: lowLabel }),
3792
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { children: highLabel })
3873
+ (lowLabel != null || highLabel != null) && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex justify-between text-ui-caption text-secondary-muted-foreground", "aria-hidden": "true", children: [
3874
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: lowLabel }),
3875
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: highLabel })
3793
3876
  ] })
3794
3877
  ] });
3795
3878
  }
@@ -3797,15 +3880,15 @@ var RatingScale = React47.forwardRef(
3797
3880
  RatingScale.displayName = "RatingScale";
3798
3881
 
3799
3882
  // src/components/Question Types/StimulusCard.tsx
3800
- var React48 = __toESM(require("react"), 1);
3801
- var import_react26 = require("@phosphor-icons/react");
3802
- var import_jsx_runtime49 = (
3883
+ var React50 = __toESM(require("react"), 1);
3884
+ var import_react27 = require("@phosphor-icons/react");
3885
+ var import_jsx_runtime51 = (
3803
3886
  // Out of flow, so the image's own size never sets the thumbnail's size.
3804
3887
  require("react/jsx-runtime")
3805
3888
  );
3806
3889
  var MIN_THUMBNAIL = 92;
3807
3890
  var MAX_THUMBNAIL = 240;
3808
- var StimulusCard = React48.forwardRef(
3891
+ var StimulusCard = React50.forwardRef(
3809
3892
  ({
3810
3893
  className,
3811
3894
  thumbnail,
@@ -3822,14 +3905,14 @@ var StimulusCard = React48.forwardRef(
3822
3905
  removeLabel = "Remove stimulus",
3823
3906
  ...props
3824
3907
  }, ref) => {
3825
- const [failedSrc, setFailedSrc] = React48.useState();
3908
+ const [failedSrc, setFailedSrc] = React50.useState();
3826
3909
  const error = status === "error" || thumbnail !== void 0 && failedSrc === thumbnail;
3827
3910
  const showImage = thumbnail !== void 0 && !error;
3828
- const [draft, setDraft] = React48.useState(null);
3911
+ const [draft, setDraft] = React50.useState(null);
3829
3912
  const count = (draft ?? caption ?? "").length;
3830
- const textRef = React48.useRef(null);
3831
- const [thumbnailSize, setThumbnailSize] = React48.useState(MIN_THUMBNAIL);
3832
- React48.useEffect(() => {
3913
+ const textRef = React50.useRef(null);
3914
+ const [thumbnailSize, setThumbnailSize] = React50.useState(MIN_THUMBNAIL);
3915
+ React50.useEffect(() => {
3833
3916
  const el = textRef.current;
3834
3917
  if (!el || typeof ResizeObserver === "undefined") return;
3835
3918
  const observer = new ResizeObserver(() => {
@@ -3838,7 +3921,7 @@ var StimulusCard = React48.forwardRef(
3838
3921
  observer.observe(el);
3839
3922
  return () => observer.disconnect();
3840
3923
  }, []);
3841
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
3924
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
3842
3925
  "div",
3843
3926
  {
3844
3927
  ref,
@@ -3846,8 +3929,8 @@ var StimulusCard = React48.forwardRef(
3846
3929
  className: cn("flex min-h-24.5 w-full items-center gap-4 rounded-md border border-border p-0.5 pr-4", className),
3847
3930
  ...props,
3848
3931
  children: [
3849
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
3850
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3932
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
3933
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3851
3934
  "span",
3852
3935
  {
3853
3936
  style: { width: thumbnailSize, height: thumbnailSize },
@@ -3856,12 +3939,12 @@ var StimulusCard = React48.forwardRef(
3856
3939
  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",
3857
3940
  showImage && "bg-none"
3858
3941
  ),
3859
- children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("img", { src: thumbnail, alt: thumbnailAlt, className: "absolute inset-0 size-full object-cover", onError: () => setFailedSrc(thumbnail) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react26.ImageBroken, { size: 24, "aria-hidden": true }) : icon ?? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react26.Image, { size: 24, "aria-hidden": true })
3942
+ children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("img", { src: thumbnail, alt: thumbnailAlt, className: "absolute inset-0 size-full object-cover", onError: () => setFailedSrc(thumbnail) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react27.ImageBroken, { size: 24, "aria-hidden": true }) : icon ?? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react27.Image, { size: 24, "aria-hidden": true })
3860
3943
  }
3861
3944
  ),
3862
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { ref: textRef, className: "flex min-w-0 flex-1 flex-col justify-center gap-2 py-2 text-surface-foreground", children: [
3863
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "w-full text-ui-label", children: label }),
3864
- onCaptionChange ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3945
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { ref: textRef, className: "flex min-w-0 flex-1 flex-col justify-center gap-2 py-2 text-surface-foreground", children: [
3946
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "w-full text-ui-label", children: label }),
3947
+ onCaptionChange ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
3865
3948
  InlineEdit,
3866
3949
  {
3867
3950
  variant: "question",
@@ -3878,8 +3961,8 @@ var StimulusCard = React48.forwardRef(
3878
3961
  },
3879
3962
  textClassName: "text-body-base"
3880
3963
  }
3881
- ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "w-full text-body-base [word-break:break-word]", children: caption }),
3882
- onCaptionChange && showCounter && maxLength !== void 0 && count > maxLength && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
3964
+ ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "w-full text-body-base [word-break:break-word]", children: caption }),
3965
+ onCaptionChange && showCounter && maxLength !== void 0 && count > maxLength && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
3883
3966
  count,
3884
3967
  "/",
3885
3968
  maxLength,
@@ -3887,7 +3970,7 @@ var StimulusCard = React48.forwardRef(
3887
3970
  ] })
3888
3971
  ] })
3889
3972
  ] }),
3890
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": removeLabel, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react26.Trash, { size: 16, "aria-hidden": true }) })
3973
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, { type: "button", variant: "destructive", size: "icon-sm", "aria-label": removeLabel, onClick: onRemove, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react27.Trash, { size: 16, "aria-hidden": true }) })
3891
3974
  ]
3892
3975
  }
3893
3976
  );
@@ -3896,27 +3979,27 @@ var StimulusCard = React48.forwardRef(
3896
3979
  StimulusCard.displayName = "StimulusCard";
3897
3980
 
3898
3981
  // src/components/Data Display/Progress.tsx
3899
- var React49 = __toESM(require("react"), 1);
3982
+ var React51 = __toESM(require("react"), 1);
3900
3983
  var import_radix_ui24 = require("radix-ui");
3901
- var import_jsx_runtime50 = require("react/jsx-runtime");
3902
- var Progress = React49.forwardRef(
3984
+ var import_jsx_runtime52 = require("react/jsx-runtime");
3985
+ var Progress = React51.forwardRef(
3903
3986
  ({ className, value = 0, label, valueLabel, detailsStart, detailsEnd, ...props }, ref) => {
3904
3987
  const hasHeader = label != null || valueLabel != null;
3905
3988
  const hasDetails = detailsStart != null || detailsEnd != null;
3906
3989
  const clamped = Math.min(100, Math.max(0, value ?? 0));
3907
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: cn("flex w-full flex-col gap-2", className), children: [
3908
- hasHeader && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center justify-between text-ui-label text-surface-foreground", children: [
3909
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: label }),
3910
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: valueLabel === true ? `${Math.round(clamped)}%` : valueLabel })
3990
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: cn("flex w-full flex-col gap-2", className), children: [
3991
+ hasHeader && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-center justify-between text-ui-label text-surface-foreground", children: [
3992
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: label }),
3993
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: valueLabel === true ? `${Math.round(clamped)}%` : valueLabel })
3911
3994
  ] }),
3912
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3995
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3913
3996
  import_radix_ui24.Progress.Root,
3914
3997
  {
3915
3998
  ref,
3916
3999
  value: clamped,
3917
4000
  className: "relative h-2 w-full overflow-hidden rounded-full bg-secondary",
3918
4001
  ...props,
3919
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4002
+ children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
3920
4003
  import_radix_ui24.Progress.Indicator,
3921
4004
  {
3922
4005
  className: "h-full rounded-full bg-accent transition-[width]",
@@ -3925,9 +4008,9 @@ var Progress = React49.forwardRef(
3925
4008
  )
3926
4009
  }
3927
4010
  ),
3928
- hasDetails && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-start justify-between text-ui-label leading-5 text-secondary-muted-foreground", children: [
3929
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: detailsStart }),
3930
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: detailsEnd })
4011
+ hasDetails && /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex items-start justify-between text-ui-label leading-5 text-secondary-muted-foreground", children: [
4012
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: detailsStart }),
4013
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { children: detailsEnd })
3931
4014
  ] })
3932
4015
  ] });
3933
4016
  }
@@ -3935,11 +4018,11 @@ var Progress = React49.forwardRef(
3935
4018
  Progress.displayName = "Progress";
3936
4019
 
3937
4020
  // src/components/Data Display/Table.tsx
3938
- var React50 = __toESM(require("react"), 1);
3939
- var import_react27 = require("@phosphor-icons/react");
3940
- var import_jsx_runtime51 = require("react/jsx-runtime");
3941
- var Table = React50.forwardRef(
3942
- ({ className, containerClassName, containerRef, striped, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { ref: containerRef, className: cn("relative w-full overflow-auto rounded-lg border border-border bg-surface", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4021
+ var React52 = __toESM(require("react"), 1);
4022
+ var import_react28 = require("@phosphor-icons/react");
4023
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4024
+ var Table = React52.forwardRef(
4025
+ ({ className, containerClassName, containerRef, striped, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { ref: containerRef, className: cn("relative w-full overflow-auto rounded-lg border border-border bg-surface", containerClassName), children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3943
4026
  "table",
3944
4027
  {
3945
4028
  ref,
@@ -3950,20 +4033,20 @@ var Table = React50.forwardRef(
3950
4033
  ) })
3951
4034
  );
3952
4035
  Table.displayName = "Table";
3953
- var TableHeader = React50.forwardRef(
3954
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("thead", { ref, className, ...props })
4036
+ var TableHeader = React52.forwardRef(
4037
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("thead", { ref, className, ...props })
3955
4038
  );
3956
4039
  TableHeader.displayName = "TableHeader";
3957
- var TableFooter = React50.forwardRef(
3958
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tfoot", { ref, className: cn("border-t border-border bg-background text-ui-label", className), ...props })
4040
+ var TableFooter = React52.forwardRef(
4041
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tfoot", { ref, className: cn("border-t border-border bg-background text-ui-label", className), ...props })
3959
4042
  );
3960
4043
  TableFooter.displayName = "TableFooter";
3961
- var TableBody = React50.forwardRef(
3962
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tbody", { ref, className, ...props })
4044
+ var TableBody = React52.forwardRef(
4045
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tbody", { ref, className, ...props })
3963
4046
  );
3964
4047
  TableBody.displayName = "TableBody";
3965
- var TableRow = React50.forwardRef(
3966
- ({ className, selected, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4048
+ var TableRow = React52.forwardRef(
4049
+ ({ className, selected, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
3967
4050
  "tr",
3968
4051
  {
3969
4052
  ref,
@@ -3980,10 +4063,10 @@ var TableRow = React50.forwardRef(
3980
4063
  );
3981
4064
  TableRow.displayName = "TableRow";
3982
4065
  var ariaSort = { none: "none", asc: "ascending", desc: "descending" };
3983
- var TableHead = React50.forwardRef(
4066
+ var TableHead = React52.forwardRef(
3984
4067
  ({ className, align = "left", sortable, sort = "none", onSort, checkbox, resizer, children, ...props }, ref) => {
3985
- const caret = sort === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react27.CaretUp, { size: 16, "aria-hidden": true, className: "shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react27.CaretDown, { size: 16, "aria-hidden": true, className: "shrink-0" });
3986
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
4068
+ const caret = sort === "asc" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react28.CaretUp, { size: 16, "aria-hidden": true, className: "shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react28.CaretDown, { size: 16, "aria-hidden": true, className: "shrink-0" });
4069
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
3987
4070
  "th",
3988
4071
  {
3989
4072
  ref,
@@ -3998,7 +4081,7 @@ var TableHead = React50.forwardRef(
3998
4081
  ),
3999
4082
  ...props,
4000
4083
  children: [
4001
- sortable ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
4084
+ sortable ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
4002
4085
  "button",
4003
4086
  {
4004
4087
  type: "button",
@@ -4009,7 +4092,7 @@ var TableHead = React50.forwardRef(
4009
4092
  caret
4010
4093
  ]
4011
4094
  }
4012
- ) : checkbox ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex items-center justify-center", children }) : children,
4095
+ ) : checkbox ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center justify-center", children }) : children,
4013
4096
  resizer
4014
4097
  ]
4015
4098
  }
@@ -4017,8 +4100,8 @@ var TableHead = React50.forwardRef(
4017
4100
  }
4018
4101
  );
4019
4102
  TableHead.displayName = "TableHead";
4020
- var TableCell = React50.forwardRef(
4021
- ({ className, align = "left", muted, checkbox, actions, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4103
+ var TableCell = React52.forwardRef(
4104
+ ({ className, align = "left", muted, checkbox, actions, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4022
4105
  "td",
4023
4106
  {
4024
4107
  ref,
@@ -4031,31 +4114,31 @@ var TableCell = React50.forwardRef(
4031
4114
  className
4032
4115
  ),
4033
4116
  ...props,
4034
- children: checkbox ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex items-center justify-center", children }) : actions ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex items-start justify-end gap-1", children }) : children
4117
+ children: checkbox ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-center justify-center", children }) : actions ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex items-start justify-end gap-1", children }) : children
4035
4118
  }
4036
4119
  )
4037
4120
  );
4038
4121
  TableCell.displayName = "TableCell";
4039
4122
  function TableCellTwoLines({ primary, secondary, avatar, className, ...props }) {
4040
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: cn("flex items-center gap-2", className), ...props, children: [
4123
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex items-center gap-2", className), ...props, children: [
4041
4124
  avatar,
4042
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex flex-col gap-0.5 whitespace-nowrap", children: [
4043
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-ui-label text-surface-foreground", children: primary }),
4044
- secondary && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-ui-caption text-secondary-muted-foreground", children: secondary })
4125
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-0.5 whitespace-nowrap", children: [
4126
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-ui-label text-surface-foreground", children: primary }),
4127
+ secondary && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-ui-caption text-secondary-muted-foreground", children: secondary })
4045
4128
  ] })
4046
4129
  ] });
4047
4130
  }
4048
4131
 
4049
4132
  // src/components/Data Display/DataTable.tsx
4050
- var React52 = __toESM(require("react"), 1);
4051
- var import_react29 = require("@phosphor-icons/react");
4133
+ var React54 = __toESM(require("react"), 1);
4134
+ var import_react30 = require("@phosphor-icons/react");
4052
4135
  var import_react_table = require("@tanstack/react-table");
4053
4136
  var import_react_virtual = require("@tanstack/react-virtual");
4054
4137
 
4055
4138
  // src/components/Utility/Pagination.tsx
4056
- var React51 = __toESM(require("react"), 1);
4057
- var import_react28 = require("@phosphor-icons/react");
4058
- var import_jsx_runtime52 = require("react/jsx-runtime");
4139
+ var React53 = __toESM(require("react"), 1);
4140
+ var import_react29 = require("@phosphor-icons/react");
4141
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4059
4142
  function getPaginationItems(page, pageCount, siblings = 1) {
4060
4143
  const keep = /* @__PURE__ */ new Set([1, pageCount]);
4061
4144
  for (let p = page - siblings; p <= page + siblings; p++) if (p >= 1 && p <= pageCount) keep.add(p);
@@ -4069,10 +4152,10 @@ function getPaginationItems(page, pageCount, siblings = 1) {
4069
4152
  });
4070
4153
  return items;
4071
4154
  }
4072
- var Pagination = React51.forwardRef(
4155
+ var Pagination = React53.forwardRef(
4073
4156
  ({ className, page, pageCount, onPageChange, variant = "full", siblings = 1, ...props }, ref) => {
4074
4157
  const go = (next2) => onPageChange(Math.min(pageCount, Math.max(1, next2)));
4075
- const previous = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4158
+ const previous = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4076
4159
  Button,
4077
4160
  {
4078
4161
  type: "button",
@@ -4081,10 +4164,10 @@ var Pagination = React51.forwardRef(
4081
4164
  "aria-label": "Previous page",
4082
4165
  disabled: page <= 1,
4083
4166
  onClick: () => go(page - 1),
4084
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react28.ArrowLeft, { size: 16, "aria-hidden": true })
4167
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react29.ArrowLeft, { size: 16, "aria-hidden": true })
4085
4168
  }
4086
4169
  );
4087
- const next = /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4170
+ const next = /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4088
4171
  Button,
4089
4172
  {
4090
4173
  type: "button",
@@ -4093,10 +4176,10 @@ var Pagination = React51.forwardRef(
4093
4176
  "aria-label": "Next page",
4094
4177
  disabled: page >= pageCount,
4095
4178
  onClick: () => go(page + 1),
4096
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react28.ArrowRight, { size: 16, "aria-hidden": true })
4179
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react29.ArrowRight, { size: 16, "aria-hidden": true })
4097
4180
  }
4098
4181
  );
4099
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
4182
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4100
4183
  "nav",
4101
4184
  {
4102
4185
  ref,
@@ -4105,14 +4188,14 @@ var Pagination = React51.forwardRef(
4105
4188
  ...props,
4106
4189
  children: [
4107
4190
  previous,
4108
- variant === "compact" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "text-body-small text-surface-foreground", "aria-live": "polite", children: [
4191
+ variant === "compact" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: "text-body-small text-surface-foreground", "aria-live": "polite", children: [
4109
4192
  page,
4110
4193
  "/",
4111
4194
  pageCount
4112
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { className: "flex items-center gap-2", children: getPaginationItems(page, pageCount, siblings).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("li", { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "inline-flex size-8 items-center justify-center rounded-sm border border-border bg-surface text-surface-foreground", children: [
4113
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react28.DotsThree, { size: 16, "aria-hidden": true }),
4114
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "sr-only", children: "More pages" })
4115
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4195
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("ul", { className: "flex items-center gap-2", children: getPaginationItems(page, pageCount, siblings).map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("li", { children: item === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("span", { className: "inline-flex size-8 items-center justify-center rounded-sm border border-border bg-surface text-surface-foreground", children: [
4196
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_react29.DotsThree, { size: 16, "aria-hidden": true }),
4197
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "sr-only", children: "More pages" })
4198
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4116
4199
  Button,
4117
4200
  {
4118
4201
  type: "button",
@@ -4133,7 +4216,7 @@ var Pagination = React51.forwardRef(
4133
4216
  Pagination.displayName = "Pagination";
4134
4217
 
4135
4218
  // src/components/Data Display/DataTable.tsx
4136
- var import_jsx_runtime53 = require("react/jsx-runtime");
4219
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4137
4220
  var features = (0, import_react_table.tableFeatures)({
4138
4221
  rowSortingFeature: import_react_table.rowSortingFeature,
4139
4222
  rowPaginationFeature: import_react_table.rowPaginationFeature,
@@ -4188,9 +4271,9 @@ var features = (0, import_react_table.tableFeatures)({
4188
4271
  });
4189
4272
  var getMeta = (meta) => meta ?? {};
4190
4273
  function useControllable(value, initial, onChange) {
4191
- const [internal, setInternal] = React52.useState(initial);
4274
+ const [internal, setInternal] = React54.useState(initial);
4192
4275
  const current = value ?? internal;
4193
- const update = React52.useCallback(
4276
+ const update = React54.useCallback(
4194
4277
  (updater) => {
4195
4278
  const next = typeof updater === "function" ? updater(current) : updater;
4196
4279
  if (value === void 0) setInternal(next);
@@ -4229,16 +4312,16 @@ function ColumnFilter({ column }) {
4229
4312
  const value = column.getFilterValue();
4230
4313
  if (variant === "select") {
4231
4314
  const options = [...column.getFacetedUniqueValues().entries()].sort((a, b) => String(a[0]).localeCompare(String(b[0])));
4232
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
4315
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4233
4316
  Select,
4234
4317
  {
4235
4318
  value: typeof value === "string" ? value : ALL,
4236
4319
  onValueChange: (next) => column.setFilterValue(next === ALL ? void 0 : next),
4237
4320
  children: [
4238
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectTrigger, { "aria-label": `Filter ${label}`, className: "h-8 text-body-small", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectValue, {}) }),
4239
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(SelectContent, { children: [
4240
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(SelectItem, { value: ALL, children: "All" }),
4241
- options.map(([option, count]) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(SelectItem, { value: String(option), children: [
4321
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectTrigger, { "aria-label": `Filter ${label}`, className: "h-8 text-body-small", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectValue, {}) }),
4322
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(SelectContent, { children: [
4323
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectItem, { value: ALL, children: "All" }),
4324
+ options.map(([option, count]) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(SelectItem, { value: String(option), children: [
4242
4325
  String(option),
4243
4326
  " (",
4244
4327
  count,
@@ -4257,8 +4340,8 @@ function ColumnFilter({ column }) {
4257
4340
  next[index] = raw === "" ? void 0 : Number(raw);
4258
4341
  column.setFilterValue(next[0] === void 0 && next[1] === void 0 ? void 0 : next);
4259
4342
  };
4260
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex gap-1", children: [
4261
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4343
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex gap-1", children: [
4344
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4262
4345
  Input,
4263
4346
  {
4264
4347
  type: "number",
@@ -4269,7 +4352,7 @@ function ColumnFilter({ column }) {
4269
4352
  className: "h-8 text-body-small"
4270
4353
  }
4271
4354
  ),
4272
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4355
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4273
4356
  Input,
4274
4357
  {
4275
4358
  type: "number",
@@ -4282,7 +4365,7 @@ function ColumnFilter({ column }) {
4282
4365
  )
4283
4366
  ] });
4284
4367
  }
4285
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4368
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4286
4369
  Input,
4287
4370
  {
4288
4371
  "aria-label": `Filter ${label}`,
@@ -4295,9 +4378,9 @@ function ColumnFilter({ column }) {
4295
4378
  }
4296
4379
  function EditableCell({ value, label, type, onCommit }) {
4297
4380
  const initial = value == null ? "" : String(value);
4298
- const [draft, setDraft] = React52.useState(null);
4299
- const cancelled = React52.useRef(false);
4300
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4381
+ const [draft, setDraft] = React54.useState(null);
4382
+ const cancelled = React54.useRef(false);
4383
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4301
4384
  Input,
4302
4385
  {
4303
4386
  type,
@@ -4435,7 +4518,7 @@ function DataTableInner({
4435
4518
  onPaginationChange
4436
4519
  );
4437
4520
  const [density, setDensity] = useControllable(densityProp, "default", onDensityChange);
4438
- const [cellSelection, setCellSelection] = React52.useState([]);
4521
+ const [cellSelection, setCellSelection] = React54.useState([]);
4439
4522
  const infinite = Boolean(onLoadMore);
4440
4523
  const paginate = !virtualized && !infinite;
4441
4524
  const compact = density === "compact";
@@ -4508,12 +4591,12 @@ function DataTableInner({
4508
4591
  const cellDensity = compact ? "h-8 py-1.5" : void 0;
4509
4592
  const allSelected = table.getIsAllPageRowsSelected();
4510
4593
  const someSelected = table.getIsSomePageRowsSelected();
4511
- const dragged = React52.useRef(null);
4594
+ const dragged = React54.useRef(null);
4512
4595
  const topRows = enableRowPinning ? table.getTopRows() : [];
4513
4596
  const bottomRows = enableRowPinning ? table.getBottomRows() : [];
4514
4597
  const bodyRows = enableRowPinning ? table.getCenterRows() : table.getRowModel().rows;
4515
- const scrollRef = React52.useRef(null);
4516
- const setScrollRef = React52.useCallback(
4598
+ const scrollRef = React54.useRef(null);
4599
+ const setScrollRef = React54.useCallback(
4517
4600
  (node) => {
4518
4601
  scrollRef.current = node;
4519
4602
  if (typeof containerRef === "function") containerRef(node);
@@ -4532,8 +4615,8 @@ function DataTableInner({
4532
4615
  const virtualItems = virtualized ? virtualizer.getVirtualItems() : [];
4533
4616
  const paddingTop = virtualItems.length > 0 ? virtualItems[0]?.start ?? 0 : 0;
4534
4617
  const paddingBottom = virtualItems.length > 0 ? virtualizer.getTotalSize() - (virtualItems.at(-1)?.end ?? 0) : 0;
4535
- const sentinelRef = React52.useRef(null);
4536
- React52.useEffect(() => {
4618
+ const sentinelRef = React54.useRef(null);
4619
+ React54.useEffect(() => {
4537
4620
  const node = sentinelRef.current;
4538
4621
  if (!node || !onLoadMore || !hasMore || loadingMore || typeof IntersectionObserver === "undefined") return;
4539
4622
  const container = scrollRef.current;
@@ -4574,15 +4657,15 @@ function DataTableInner({
4574
4657
  table.resetCellSelection(true);
4575
4658
  }
4576
4659
  };
4577
- const skeletonRow = (rowKey) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnSpan }, (_, cell) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableCell, { checkbox: enableRowSelection && cell === 0, className: cellDensity, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { "aria-hidden": true, className: "block h-4 w-3/4 animate-pulse rounded-xs bg-border" }) }, cell)) }, rowKey);
4660
+ const skeletonRow = (rowKey) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableRow, { className: "hover:bg-transparent", children: Array.from({ length: columnSpan }, (_, cell) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableCell, { checkbox: enableRowSelection && cell === 0, className: cellDensity, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { "aria-hidden": true, className: "block h-4 w-3/4 animate-pulse rounded-xs bg-border" }) }, cell)) }, rowKey);
4578
4661
  const renderRow = (row, options = {}) => {
4579
4662
  const { pinned, pinnedIndex = 0, pinnedCount = 1, virtualIndex } = options;
4580
4663
  const grouped = row.getIsGrouped();
4581
4664
  const rowUnits = compact ? 8 : 10;
4582
4665
  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;
4583
4666
  const cells = row.getVisibleCells();
4584
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(React52.Fragment, { children: [
4585
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
4667
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(React54.Fragment, { children: [
4668
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4586
4669
  TableRow,
4587
4670
  {
4588
4671
  ref: virtualized && virtualIndex !== void 0 ? virtualizer.measureElement : void 0,
@@ -4592,7 +4675,7 @@ function DataTableInner({
4592
4675
  onClick: onRowClick && !grouped ? () => onRowClick(row.original) : void 0,
4593
4676
  className: cn(pinned && "z-20 bg-surface", grouped && "bg-background", onRowClick && !grouped && "cursor-pointer"),
4594
4677
  children: [
4595
- enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4678
+ enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4596
4679
  Checkbox,
4597
4680
  {
4598
4681
  "aria-label": "Select row",
@@ -4601,7 +4684,7 @@ function DataTableInner({
4601
4684
  onCheckedChange: (checked) => row.toggleSelected(Boolean(checked))
4602
4685
  }
4603
4686
  ) }),
4604
- hasExpander && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && row.getCanExpand() && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4687
+ hasExpander && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && row.getCanExpand() && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4605
4688
  Button,
4606
4689
  {
4607
4690
  type: "button",
@@ -4610,10 +4693,10 @@ function DataTableInner({
4610
4693
  "aria-label": row.getIsExpanded() ? "Collapse row" : "Expand row",
4611
4694
  "aria-expanded": row.getIsExpanded(),
4612
4695
  onClick: () => row.toggleExpanded(),
4613
- children: row.getIsExpanded() ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react29.CaretDown, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react29.CaretRight, { size: 16, "aria-hidden": true })
4696
+ children: row.getIsExpanded() ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.CaretDown, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.CaretRight, { size: 16, "aria-hidden": true })
4614
4697
  }
4615
4698
  ) }),
4616
- enableRowPinning && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4699
+ enableRowPinning && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableCell, { checkbox: true, className: cellDensity, onClick: (event) => event.stopPropagation(), children: !grouped && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4617
4700
  Button,
4618
4701
  {
4619
4702
  type: "button",
@@ -4622,7 +4705,7 @@ function DataTableInner({
4622
4705
  "aria-label": row.getIsPinned() ? "Unpin row" : "Pin row to top",
4623
4706
  "aria-pressed": Boolean(row.getIsPinned()),
4624
4707
  onClick: () => row.pin(row.getIsPinned() ? false : "top"),
4625
- children: row.getIsPinned() ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react29.PushPinSlash, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react29.PushPin, { size: 16, "aria-hidden": true })
4708
+ children: row.getIsPinned() ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.PushPinSlash, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.PushPin, { size: 16, "aria-hidden": true })
4626
4709
  }
4627
4710
  ) }),
4628
4711
  cells.map((cell, index) => {
@@ -4635,7 +4718,7 @@ function DataTableInner({
4635
4718
  const indent = index === 0 && hasExpander && row.depth > 0 ? row.depth * 4 : 0;
4636
4719
  let content;
4637
4720
  if (cell.getIsGrouped()) {
4638
- content = /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
4721
+ content = /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4639
4722
  "button",
4640
4723
  {
4641
4724
  type: "button",
@@ -4643,9 +4726,9 @@ function DataTableInner({
4643
4726
  "aria-expanded": row.getIsExpanded(),
4644
4727
  onClick: row.getToggleExpandedHandler(),
4645
4728
  children: [
4646
- row.getIsExpanded() ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react29.CaretDown, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react29.CaretRight, { size: 16, "aria-hidden": true }),
4729
+ row.getIsExpanded() ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.CaretDown, { size: 16, "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.CaretRight, { size: 16, "aria-hidden": true }),
4647
4730
  (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext()),
4648
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: "text-secondary-muted-foreground", children: [
4731
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "text-secondary-muted-foreground", children: [
4649
4732
  "(",
4650
4733
  row.subRows.length,
4651
4734
  ")"
@@ -4658,7 +4741,7 @@ function DataTableInner({
4658
4741
  } else if (cell.getIsPlaceholder()) {
4659
4742
  content = null;
4660
4743
  } else if (meta.editable) {
4661
- content = /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4744
+ content = /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4662
4745
  EditableCell,
4663
4746
  {
4664
4747
  value: cell.getValue(),
@@ -4670,7 +4753,7 @@ function DataTableInner({
4670
4753
  } else {
4671
4754
  content = (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext());
4672
4755
  }
4673
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4756
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4674
4757
  TableCell,
4675
4758
  {
4676
4759
  align: meta.align,
@@ -4703,7 +4786,7 @@ function DataTableInner({
4703
4786
  ]
4704
4787
  }
4705
4788
  ),
4706
- renderSubComponent && !grouped && row.getIsExpanded() && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableRow, { className: "bg-background hover:bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableCell, { colSpan: columnSpan, children: renderSubComponent(row.original) }) })
4789
+ renderSubComponent && !grouped && row.getIsExpanded() && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableRow, { className: "bg-background hover:bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableCell, { colSpan: columnSpan, children: renderSubComponent(row.original) }) })
4707
4790
  ] }, row.id);
4708
4791
  };
4709
4792
  const renderHeaderCell = (header) => {
@@ -4714,7 +4797,7 @@ function DataTableInner({
4714
4797
  const pin = pinning(column, sized, true);
4715
4798
  const reorderable = enableColumnOrdering && leaf && !column.getIsPinned();
4716
4799
  const label = labelOf(column);
4717
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4800
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4718
4801
  TableHead,
4719
4802
  {
4720
4803
  colSpan: header.colSpan > 1 ? header.colSpan : void 0,
@@ -4750,7 +4833,7 @@ function DataTableInner({
4750
4833
  reorderable && "cursor-grab",
4751
4834
  !leaf && "text-center"
4752
4835
  ),
4753
- resizer: enableColumnResizing && column.getCanResize() ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4836
+ resizer: enableColumnResizing && column.getCanResize() ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4754
4837
  "div",
4755
4838
  {
4756
4839
  role: "separator",
@@ -4765,14 +4848,14 @@ function DataTableInner({
4765
4848
  )
4766
4849
  }
4767
4850
  ) : void 0,
4768
- children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(table.FlexRender, { header })
4851
+ children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(table.FlexRender, { header })
4769
4852
  },
4770
4853
  header.id
4771
4854
  );
4772
4855
  };
4773
4856
  const stickyLeading = cn(cellDensity, sticky && "sticky top-0 z-20 bg-surface");
4774
- const leadingHeaderCells = (rowSpan) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
4775
- enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4857
+ const leadingHeaderCells = (rowSpan) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
4858
+ enableRowSelection && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4776
4859
  Checkbox,
4777
4860
  {
4778
4861
  "aria-label": "Select all rows",
@@ -4781,15 +4864,15 @@ function DataTableInner({
4781
4864
  onCheckedChange: (checked) => table.toggleAllPageRowsSelected(Boolean(checked))
4782
4865
  }
4783
4866
  ) }),
4784
- hasExpander && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "sr-only", children: "Expand" }) }),
4785
- enableRowPinning && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "sr-only", children: "Pin" }) })
4867
+ hasExpander && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "sr-only", children: "Expand" }) }),
4868
+ enableRowPinning && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableHead, { checkbox: true, rowSpan, className: stickyLeading, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "sr-only", children: "Pin" }) })
4786
4869
  ] });
4787
4870
  const rowsToRender = virtualized ? virtualItems.map((item) => ({ row: bodyRows[item.index], index: item.index })) : null;
4788
4871
  const totalRows = topRows.length + bodyRows.length + bottomRows.length;
4789
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: cn("flex w-full flex-col gap-2", wrapperClassName), children: [
4790
- showToolbar && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
4791
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-2", children: [
4792
- enableGlobalFilter && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4872
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: cn("flex w-full flex-col gap-2", wrapperClassName), children: [
4873
+ showToolbar && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
4874
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center gap-2", children: [
4875
+ enableGlobalFilter && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4793
4876
  SearchBar,
4794
4877
  {
4795
4878
  "aria-label": "Search table",
@@ -4802,8 +4885,8 @@ function DataTableInner({
4802
4885
  ),
4803
4886
  toolbar
4804
4887
  ] }),
4805
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-2", children: [
4806
- enableDensityToggle && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
4888
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center gap-2", children: [
4889
+ enableDensityToggle && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4807
4890
  Button,
4808
4891
  {
4809
4892
  type: "button",
@@ -4812,20 +4895,20 @@ function DataTableInner({
4812
4895
  "aria-pressed": compact,
4813
4896
  onClick: () => setDensity(compact ? "default" : "compact"),
4814
4897
  children: [
4815
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react29.Rows, { size: 16, "aria-hidden": true }),
4898
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.Rows, { size: 16, "aria-hidden": true }),
4816
4899
  "Compact"
4817
4900
  ]
4818
4901
  }
4819
4902
  ),
4820
- enableGrouping && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DropdownMenu, { children: [
4821
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Button, { type: "button", variant: "outline", size: "sm", children: [
4822
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react29.Stack, { size: 16, "aria-hidden": true }),
4903
+ enableGrouping && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(DropdownMenu, { children: [
4904
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Button, { type: "button", variant: "outline", size: "sm", children: [
4905
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.Stack, { size: 16, "aria-hidden": true }),
4823
4906
  "Group by"
4824
4907
  ] }) }),
4825
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DropdownMenuContent, { align: "end", children: [
4826
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuLabel, { children: "Group rows by" }),
4827
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuSeparator, {}),
4828
- groupableColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4908
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(DropdownMenuContent, { align: "end", children: [
4909
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DropdownMenuLabel, { children: "Group rows by" }),
4910
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DropdownMenuSeparator, {}),
4911
+ groupableColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4829
4912
  DropdownMenuCheckboxItem,
4830
4913
  {
4831
4914
  checked: column.getIsGrouped(),
@@ -4836,15 +4919,15 @@ function DataTableInner({
4836
4919
  ))
4837
4920
  ] })
4838
4921
  ] }),
4839
- enableColumnVisibility && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DropdownMenu, { children: [
4840
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Button, { type: "button", variant: "outline", size: "sm", children: [
4841
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react29.Sliders, { size: 16, "aria-hidden": true }),
4922
+ enableColumnVisibility && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(DropdownMenu, { children: [
4923
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Button, { type: "button", variant: "outline", size: "sm", children: [
4924
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.Sliders, { size: 16, "aria-hidden": true }),
4842
4925
  "Columns"
4843
4926
  ] }) }),
4844
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(DropdownMenuContent, { align: "end", children: [
4845
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuLabel, { children: "Toggle columns" }),
4846
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(DropdownMenuSeparator, {}),
4847
- hideableColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4927
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(DropdownMenuContent, { align: "end", children: [
4928
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DropdownMenuLabel, { children: "Toggle columns" }),
4929
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DropdownMenuSeparator, {}),
4930
+ hideableColumns.map((column) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4848
4931
  DropdownMenuCheckboxItem,
4849
4932
  {
4850
4933
  checked: column.getIsVisible(),
@@ -4857,7 +4940,7 @@ function DataTableInner({
4857
4940
  ] })
4858
4941
  ] })
4859
4942
  ] }),
4860
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
4943
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4861
4944
  Table,
4862
4945
  {
4863
4946
  ref,
@@ -4870,52 +4953,52 @@ function DataTableInner({
4870
4953
  tabIndex: enableCellSelection ? 0 : void 0,
4871
4954
  ...tableProps,
4872
4955
  children: [
4873
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(TableHeader, { children: [
4874
- headerGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(TableRow, { className: "hover:bg-transparent", children: [
4956
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(TableHeader, { children: [
4957
+ headerGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(TableRow, { className: "hover:bg-transparent", children: [
4875
4958
  groupIndex === 0 && leadingHeaderCells(headerGroups.length + (enableColumnFilters ? 1 : 0)),
4876
4959
  group.headers.map(renderHeaderCell)
4877
4960
  ] }, group.id)),
4878
- enableColumnFilters && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableRow, { className: "hover:bg-transparent", children: leafColumns.map((column) => {
4961
+ enableColumnFilters && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableRow, { className: "hover:bg-transparent", children: leafColumns.map((column) => {
4879
4962
  const pin = pinning(column, sized, true);
4880
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4963
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4881
4964
  TableHead,
4882
4965
  {
4883
4966
  style: pin.style,
4884
4967
  className: cn("h-auto py-2 font-normal", pin.className, sticky && !column.getIsPinned() && "bg-surface"),
4885
- children: column.getCanFilter() ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ColumnFilter, { column }) : null
4968
+ children: column.getCanFilter() ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(ColumnFilter, { column }) : null
4886
4969
  },
4887
4970
  column.id
4888
4971
  );
4889
4972
  }) })
4890
4973
  ] }),
4891
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(TableBody, { children: [
4892
- loading ? Array.from({ length: pageSize }, (_, index) => skeletonRow(`loading-${index}`)) : totalRows === 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableCell, { colSpan: columnSpan, muted: true, className: "h-24 text-center", children: emptyState ?? "No results." }) }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
4974
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(TableBody, { children: [
4975
+ loading ? Array.from({ length: pageSize }, (_, index) => skeletonRow(`loading-${index}`)) : totalRows === 0 ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableCell, { colSpan: columnSpan, muted: true, className: "h-24 text-center", children: emptyState ?? "No results." }) }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
4893
4976
  topRows.map((row, index) => renderRow(row, { pinned: "top", pinnedIndex: index, pinnedCount: topRows.length })),
4894
- virtualized && paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tr", { "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("td", { colSpan: columnSpan, style: { height: paddingTop } }) }),
4977
+ virtualized && paddingTop > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tr", { "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("td", { colSpan: columnSpan, style: { height: paddingTop } }) }),
4895
4978
  rowsToRender ? rowsToRender.map(({ row, index }) => renderRow(row, { virtualIndex: index })) : bodyRows.map((row) => renderRow(row)),
4896
- virtualized && paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tr", { "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("td", { colSpan: columnSpan, style: { height: paddingBottom } }) }),
4979
+ virtualized && paddingBottom > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tr", { "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("td", { colSpan: columnSpan, style: { height: paddingBottom } }) }),
4897
4980
  bottomRows.map(
4898
4981
  (row, index) => renderRow(row, { pinned: "bottom", pinnedIndex: index, pinnedCount: bottomRows.length })
4899
4982
  )
4900
4983
  ] }),
4901
- infinite && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(import_jsx_runtime53.Fragment, { children: [
4984
+ infinite && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
4902
4985
  loadingMore && Array.from({ length: 3 }, (_, index) => skeletonRow(`more-${index}`)),
4903
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("tr", { ref: sentinelRef, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("td", { colSpan: columnSpan, className: "h-px p-0" }) })
4986
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("tr", { ref: sentinelRef, "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("td", { colSpan: columnSpan, className: "h-px p-0" }) })
4904
4987
  ] })
4905
4988
  ] }),
4906
- showFooter && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableFooter, { children: table.getFooterGroups().map((group) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(TableRow, { className: "hover:bg-transparent", children: [
4907
- leadingCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableCell, { colSpan: leadingCount, className: cellDensity }),
4989
+ showFooter && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableFooter, { children: table.getFooterGroups().map((group) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(TableRow, { className: "hover:bg-transparent", children: [
4990
+ leadingCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableCell, { colSpan: leadingCount, className: cellDensity }),
4908
4991
  group.headers.map((header) => {
4909
4992
  const { align } = getMeta(header.column.columnDef.meta);
4910
4993
  const pin = pinning(header.column, sized);
4911
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4994
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4912
4995
  TableCell,
4913
4996
  {
4914
4997
  align,
4915
4998
  colSpan: header.colSpan > 1 ? header.colSpan : void 0,
4916
4999
  style: pin.style,
4917
5000
  className: cn("text-ui-label", pin.className, cellDensity),
4918
- children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(table.FlexRender, { footer: header })
5001
+ children: header.isPlaceholder ? null : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(table.FlexRender, { footer: header })
4919
5002
  },
4920
5003
  header.id
4921
5004
  );
@@ -4924,9 +5007,9 @@ function DataTableInner({
4924
5007
  ]
4925
5008
  }
4926
5009
  ),
4927
- (enableRowSelection || paginate && pageCount > 1) && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
4928
- /* @__PURE__ */ (0, import_jsx_runtime53.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 }),
4929
- paginate && pageCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5010
+ (enableRowSelection || paginate && pageCount > 1) && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
5011
+ /* @__PURE__ */ (0, import_jsx_runtime55.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 }),
5012
+ paginate && pageCount > 1 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4930
5013
  Pagination,
4931
5014
  {
4932
5015
  page: pagination.pageIndex + 1,
@@ -4937,13 +5020,13 @@ function DataTableInner({
4937
5020
  ] })
4938
5021
  ] });
4939
5022
  }
4940
- var DataTable = React52.forwardRef(DataTableInner);
5023
+ var DataTable = React54.forwardRef(DataTableInner);
4941
5024
  DataTable.displayName = "DataTable";
4942
5025
 
4943
5026
  // src/components/Data Display/StatCard.tsx
4944
- var React53 = __toESM(require("react"), 1);
5027
+ var React55 = __toESM(require("react"), 1);
4945
5028
  var import_class_variance_authority6 = require("class-variance-authority");
4946
- var import_jsx_runtime54 = require("react/jsx-runtime");
5029
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4947
5030
  var statCardVariants = (0, import_class_variance_authority6.cva)("flex min-w-0 flex-col gap-2 rounded-md border p-3", {
4948
5031
  variants: {
4949
5032
  variant: {
@@ -4957,26 +5040,26 @@ var statCardVariants = (0, import_class_variance_authority6.cva)("flex min-w-0 f
4957
5040
  },
4958
5041
  defaultVariants: { variant: "default" }
4959
5042
  });
4960
- var StatCard = React53.forwardRef(
4961
- ({ className, variant, label, value, icon, caption, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { ref, className: cn(statCardVariants({ variant }), className), ...props, children: [
4962
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "truncate text-ui-caption text-secondary-muted-foreground", children: label }),
4963
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("p", { className: "flex items-center gap-2 text-body-base text-surface-foreground", children: [
4964
- icon && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { "aria-hidden": "true", className: "inline-flex size-6 shrink-0 items-center justify-center", children: icon }),
5043
+ var StatCard = React55.forwardRef(
5044
+ ({ className, variant, label, value, icon, caption, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { ref, className: cn(statCardVariants({ variant }), className), ...props, children: [
5045
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "truncate text-ui-caption text-secondary-muted-foreground", children: label }),
5046
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("p", { className: "flex items-center gap-2 text-body-base text-surface-foreground", children: [
5047
+ icon && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { "aria-hidden": "true", className: "inline-flex size-6 shrink-0 items-center justify-center", children: icon }),
4965
5048
  value
4966
5049
  ] }),
4967
- caption && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: caption })
5050
+ caption && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-ui-caption text-secondary-muted-foreground", children: caption })
4968
5051
  ] })
4969
5052
  );
4970
5053
  StatCard.displayName = "StatCard";
4971
5054
 
4972
5055
  // src/components/Research-Specific/ActivityStructure.tsx
4973
- var React55 = __toESM(require("react"), 1);
5056
+ var React57 = __toESM(require("react"), 1);
4974
5057
 
4975
5058
  // src/components/Tags & Badges/EditableTag.tsx
4976
- var React54 = __toESM(require("react"), 1);
4977
- var import_react30 = require("@phosphor-icons/react");
5059
+ var React56 = __toESM(require("react"), 1);
5060
+ var import_react31 = require("@phosphor-icons/react");
4978
5061
  var import_class_variance_authority7 = require("class-variance-authority");
4979
- var import_jsx_runtime55 = require("react/jsx-runtime");
5062
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4980
5063
  var editableTagVariants = (0, import_class_variance_authority7.cva)(
4981
5064
  "inline-flex h-6.5 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors",
4982
5065
  {
@@ -4991,27 +5074,27 @@ var editableTagVariants = (0, import_class_variance_authority7.cva)(
4991
5074
  defaultVariants: { type: "default" }
4992
5075
  }
4993
5076
  );
4994
- var EditableTag = React54.forwardRef(
5077
+ var EditableTag = React56.forwardRef(
4995
5078
  ({ className, type = "default", icon, onRemove, onClick, children, ...props }, ref) => {
4996
5079
  const classes = cn(editableTagVariants({ type }), className);
4997
- const leading = type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.Plus, { size: 12, "aria-hidden": true }) : icon !== void 0 ? icon : type === "default" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.Crown, { size: 12, weight: "fill", "aria-hidden": true }) : null;
5080
+ const leading = type === "add" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react31.Plus, { size: 12, "aria-hidden": true }) : icon !== void 0 ? icon : type === "default" ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react31.Crown, { size: 12, weight: "fill", "aria-hidden": true }) : null;
4998
5081
  if (type === "add" || type === "multiple" && onClick) {
4999
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("button", { ref, type: "button", className: classes, onClick, ...props, children: [
5082
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("button", { ref, type: "button", className: classes, onClick, ...props, children: [
5000
5083
  leading,
5001
5084
  children
5002
5085
  ] });
5003
5086
  }
5004
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { ref, className: classes, ...props, children: [
5087
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { ref, className: classes, ...props, children: [
5005
5088
  leading,
5006
5089
  children,
5007
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
5090
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5008
5091
  "button",
5009
5092
  {
5010
5093
  type: "button",
5011
5094
  "aria-label": typeof children === "string" ? `Remove ${children}` : "Remove",
5012
5095
  onClick: onRemove,
5013
5096
  className: "inline-flex size-3 items-center justify-center rounded-xs",
5014
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react30.X, { size: 12, "aria-hidden": true })
5097
+ children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react31.X, { size: 12, "aria-hidden": true })
5015
5098
  }
5016
5099
  )
5017
5100
  ] });
@@ -5020,26 +5103,26 @@ var EditableTag = React54.forwardRef(
5020
5103
  EditableTag.displayName = "EditableTag";
5021
5104
 
5022
5105
  // src/components/Research-Specific/ActivityStructure.tsx
5023
- var import_jsx_runtime56 = require("react/jsx-runtime");
5024
- var ActivityStructure = React55.forwardRef(
5025
- ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", action, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
5106
+ var import_jsx_runtime58 = require("react/jsx-runtime");
5107
+ var ActivityStructure = React57.forwardRef(
5108
+ ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", action, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
5026
5109
  "section",
5027
5110
  {
5028
5111
  ref,
5029
5112
  className: cn("flex w-full max-w-96.5 flex-col gap-4 rounded-xl bg-surface p-4", className),
5030
5113
  ...props,
5031
5114
  children: [
5032
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
5033
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h3", { className: "text-body-section text-surface-foreground", children: title }),
5115
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex items-center justify-between gap-2", children: [
5116
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h3", { className: "text-body-section text-surface-foreground", children: title }),
5034
5117
  action
5035
5118
  ] }),
5036
- stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(StatCard, { ...stat }, id)) }),
5037
- sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col gap-2", children: [
5038
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
5039
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "text-body-base text-surface-foreground", children: body }),
5040
- (tags?.length || onAddTag) && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
5041
- tags?.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
5042
- onAddTag && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
5119
+ stats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(StatCard, { ...stat }, id)) }),
5120
+ sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-col gap-2", children: [
5121
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
5122
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "text-body-base text-surface-foreground", children: body }),
5123
+ (tags?.length || onAddTag) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
5124
+ tags?.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
5125
+ onAddTag && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
5043
5126
  ] })
5044
5127
  ] }, id)),
5045
5128
  children
@@ -5050,10 +5133,10 @@ var ActivityStructure = React55.forwardRef(
5050
5133
  ActivityStructure.displayName = "ActivityStructure";
5051
5134
 
5052
5135
  // src/components/Tags & Badges/Badge.tsx
5053
- var React56 = __toESM(require("react"), 1);
5054
- var import_react31 = require("@phosphor-icons/react");
5136
+ var React58 = __toESM(require("react"), 1);
5137
+ var import_react32 = require("@phosphor-icons/react");
5055
5138
  var import_class_variance_authority8 = require("class-variance-authority");
5056
- var import_jsx_runtime57 = require("react/jsx-runtime");
5139
+ var import_jsx_runtime59 = require("react/jsx-runtime");
5057
5140
  var roleTagVariants = (0, import_class_variance_authority8.cva)(
5058
5141
  "group inline-flex h-6 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors",
5059
5142
  {
@@ -5079,11 +5162,11 @@ var roleTagVariants = (0, import_class_variance_authority8.cva)(
5079
5162
  defaultVariants: { type: "primary", selected: false }
5080
5163
  }
5081
5164
  );
5082
- var Badge = React56.forwardRef(
5165
+ var Badge = React58.forwardRef(
5083
5166
  ({ className, type = "primary", selected = false, onClick, children, ...props }, ref) => {
5084
5167
  const classes = cn(roleTagVariants({ type, selected: type === "interactable" ? selected : false }), className);
5085
5168
  if (type === "interactable") {
5086
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
5169
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
5087
5170
  "button",
5088
5171
  {
5089
5172
  ref,
@@ -5093,15 +5176,15 @@ var Badge = React56.forwardRef(
5093
5176
  onClick,
5094
5177
  ...props,
5095
5178
  children: [
5096
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react31.DotsSixVertical, { size: 16, "aria-hidden": true, className: "hidden shrink-0 group-hover:block" }),
5179
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react32.DotsSixVertical, { size: 16, "aria-hidden": true, className: "hidden shrink-0 group-hover:block" }),
5097
5180
  children
5098
5181
  ]
5099
5182
  }
5100
5183
  );
5101
5184
  }
5102
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { ref, className: classes, ...props, children: [
5103
- type === "question" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react31.RadioButton, { size: 16, weight: "fill", "aria-hidden": true }),
5104
- type === "id" && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-secondary-muted-foreground", children: "ID" }),
5185
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { ref, className: classes, ...props, children: [
5186
+ type === "question" && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react32.RadioButton, { size: 16, weight: "fill", "aria-hidden": true }),
5187
+ type === "id" && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "text-secondary-muted-foreground", children: "ID" }),
5105
5188
  children
5106
5189
  ] });
5107
5190
  }
@@ -5175,6 +5258,7 @@ Badge.displayName = "Badge";
5175
5258
  QuestionEditorCard,
5176
5259
  QuestionHeader,
5177
5260
  QuestionNavItem,
5261
+ QuestionNumberTag,
5178
5262
  QuestionOption,
5179
5263
  QuestionOptionEditor,
5180
5264
  QuestionOtherOption,
@@ -5194,6 +5278,9 @@ Badge.displayName = "Badge";
5194
5278
  Slider,
5195
5279
  StatCard,
5196
5280
  StatusTag,
5281
+ Step,
5282
+ StepPath,
5283
+ Stepper,
5197
5284
  StimulusCard,
5198
5285
  Switch,
5199
5286
  TabItem,