@discuss-ds/ui 0.24.0 → 0.25.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.js CHANGED
@@ -1046,13 +1046,14 @@ import { Tabs as TabsPrimitive2 } from "radix-ui";
1046
1046
  import * as React19 from "react";
1047
1047
  import { Tabs as TabsPrimitive } from "radix-ui";
1048
1048
  import { cva as cva3 } from "class-variance-authority";
1049
- import { jsx as jsx20 } from "react/jsx-runtime";
1049
+ import { jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
1050
1050
  var TabNavigationContext = React19.createContext("filter");
1051
1051
  var tabNavigationVariants = cva3("inline-flex items-start gap-1 p-0.5", {
1052
1052
  variants: {
1053
1053
  variant: {
1054
- filter: "rounded-full border border-border bg-surface",
1055
- toggle: "rounded-md bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5",
1054
+ // `relative`: the sliding indicator is positioned against the list.
1055
+ filter: "relative rounded-full border border-border bg-surface",
1056
+ toggle: "relative rounded-md bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5",
1056
1057
  underline: "items-stretch p-0"
1057
1058
  }
1058
1059
  },
@@ -1060,16 +1061,70 @@ var tabNavigationVariants = cva3("inline-flex items-start gap-1 p-0.5", {
1060
1061
  });
1061
1062
  var Tabs = TabsPrimitive.Root;
1062
1063
  var TabsContent = TabsPrimitive.Content;
1064
+ var indicatorClasses = {
1065
+ filter: "rounded-full bg-secondary bg-linear-to-r from-overlay-dark-5 to-overlay-dark-5",
1066
+ toggle: "rounded-sm bg-surface"
1067
+ };
1063
1068
  var TabNavigation = React19.forwardRef(
1064
- ({ className, variant = "filter", ...props }, ref) => /* @__PURE__ */ jsx20(TabNavigationContext.Provider, { value: variant ?? "filter", children: /* @__PURE__ */ jsx20(TabsPrimitive.List, { ref, className: cn(tabNavigationVariants({ variant }), className), ...props }) })
1069
+ ({ className, variant = "filter", children, ...props }, forwardedRef) => {
1070
+ const kind = variant ?? "filter";
1071
+ const slides = kind !== "underline";
1072
+ const listRef = React19.useRef(null);
1073
+ const [box, setBox] = React19.useState(null);
1074
+ const [animate, setAnimate] = React19.useState(false);
1075
+ const setRefs = React19.useCallback(
1076
+ (node) => {
1077
+ listRef.current = node;
1078
+ if (typeof forwardedRef === "function") forwardedRef(node);
1079
+ else if (forwardedRef) forwardedRef.current = node;
1080
+ },
1081
+ [forwardedRef]
1082
+ );
1083
+ React19.useLayoutEffect(() => {
1084
+ const list = listRef.current;
1085
+ if (!slides || !list) return;
1086
+ const measure = () => {
1087
+ const active = list.querySelector('[role="tab"][data-state="active"]');
1088
+ const next = active ? { left: active.offsetLeft, top: active.offsetTop, width: active.offsetWidth, height: active.offsetHeight } : null;
1089
+ setBox((prev) => prev && next && prev.left === next.left && prev.top === next.top && prev.width === next.width && prev.height === next.height ? prev : next);
1090
+ };
1091
+ measure();
1092
+ const mutations = new MutationObserver(measure);
1093
+ mutations.observe(list, { attributes: true, attributeFilter: ["data-state"], subtree: true, childList: true });
1094
+ const resizes = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
1095
+ resizes?.observe(list);
1096
+ const frame = requestAnimationFrame(() => setAnimate(true));
1097
+ return () => {
1098
+ mutations.disconnect();
1099
+ resizes?.disconnect();
1100
+ cancelAnimationFrame(frame);
1101
+ };
1102
+ }, [slides]);
1103
+ return /* @__PURE__ */ jsx20(TabNavigationContext.Provider, { value: kind, children: /* @__PURE__ */ jsxs14(TabsPrimitive.List, { ref: setRefs, className: cn(tabNavigationVariants({ variant }), className), ...props, children: [
1104
+ slides && box && /* @__PURE__ */ jsx20(
1105
+ "span",
1106
+ {
1107
+ "aria-hidden": true,
1108
+ "data-slot": "tab-indicator",
1109
+ className: cn(
1110
+ "pointer-events-none absolute",
1111
+ indicatorClasses[kind],
1112
+ animate && "transition-[left,top,width,height] duration-200 ease-out motion-reduce:transition-none"
1113
+ ),
1114
+ style: { left: box.left, top: box.top, width: box.width, height: box.height }
1115
+ }
1116
+ ),
1117
+ children
1118
+ ] }) });
1119
+ }
1065
1120
  );
1066
1121
  TabNavigation.displayName = "TabNavigation";
1067
1122
 
1068
1123
  // src/components/Navigation/TabItem.tsx
1069
1124
  import { jsx as jsx21 } from "react/jsx-runtime";
1070
1125
  var base = "inline-flex h-7 items-center justify-center gap-1 whitespace-nowrap px-2.5 py-1 text-ui-label transition-colors disabled:pointer-events-none disabled:opacity-50";
1071
- var filter = "rounded-full text-surface-foreground hover:text-accent data-[state=active]:bg-secondary data-[state=active]:bg-linear-to-r data-[state=active]:from-overlay-dark-5 data-[state=active]:to-overlay-dark-5 data-[state=active]:hover:bg-accent-soft data-[state=active]:hover:bg-none data-[state=active]:hover:text-accent-soft-foreground disabled:text-muted-foreground";
1072
- var toggle = "rounded-sm text-secondary-muted-foreground hover:text-surface-foreground data-[state=active]:bg-surface data-[state=active]:text-surface-foreground";
1126
+ var filter = "relative rounded-full text-surface-foreground hover:text-accent data-[state=active]:hover:bg-accent-soft data-[state=active]:hover:text-accent-soft-foreground disabled:text-muted-foreground";
1127
+ var toggle = "relative rounded-sm text-secondary-muted-foreground hover:text-surface-foreground data-[state=active]:text-surface-foreground";
1073
1128
  var underline = "relative h-full rounded-none px-4 py-3 font-medium text-secondary-muted-foreground hover:text-surface-foreground data-[state=active]:font-semibold data-[state=active]:text-surface-foreground after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 data-[state=active]:after:bg-accent";
1074
1129
  var TabItem = React20.forwardRef(
1075
1130
  ({ className, ...props }, ref) => {
@@ -1087,7 +1142,7 @@ var TabItem = React20.forwardRef(
1087
1142
  TabItem.displayName = "TabItem";
1088
1143
 
1089
1144
  // src/components/Forms & Data Entry/TimePicker.tsx
1090
- import { jsx as jsx22, jsxs as jsxs14 } from "react/jsx-runtime";
1145
+ import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1091
1146
  var TimeItem = React21.forwardRef(
1092
1147
  ({ className, recommended, ...props }, ref) => /* @__PURE__ */ jsx22(
1093
1148
  ToggleGroupPrimitive.Item,
@@ -1128,7 +1183,7 @@ function TimePicker({
1128
1183
  }, []);
1129
1184
  const hours = Array.from({ length: 12 }, (_, i) => i + 1);
1130
1185
  const minutes = Array.from({ length: Math.ceil(60 / minuteStep) }, (_, i) => i * minuteStep);
1131
- return /* @__PURE__ */ jsxs14("div", { ref: root, className: cn("flex w-45 flex-col gap-4 pt-2", className), children: [
1186
+ return /* @__PURE__ */ jsxs15("div", { ref: root, className: cn("flex w-45 flex-col gap-4 pt-2", className), children: [
1132
1187
  /* @__PURE__ */ jsx22("p", { className: "text-ui-label text-surface-foreground", children: "Select Time" }),
1133
1188
  /* @__PURE__ */ jsx22(
1134
1189
  Tabs,
@@ -1138,7 +1193,7 @@ function TimePicker({
1138
1193
  children: /* @__PURE__ */ jsx22(TabNavigation, { variant: "toggle", "aria-label": "AM or PM", className: "self-start", children: ["AM", "PM"].map((period) => /* @__PURE__ */ jsx22(TabItem, { value: period, children: period }, period)) })
1139
1194
  }
1140
1195
  ),
1141
- /* @__PURE__ */ jsxs14("div", { className: "flex h-47.5 w-full items-start gap-3", children: [
1196
+ /* @__PURE__ */ jsxs15("div", { className: "flex h-47.5 w-full items-start gap-3", children: [
1142
1197
  /* @__PURE__ */ jsx22(
1143
1198
  ToggleGroupPrimitive.Root,
1144
1199
  {
@@ -1185,7 +1240,7 @@ function TimePicker({
1185
1240
  }
1186
1241
 
1187
1242
  // src/components/Forms & Data Entry/DateTimePicker.tsx
1188
- import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs15 } from "react/jsx-runtime";
1243
+ import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
1189
1244
  function toTimeValue(date) {
1190
1245
  if (!date) return void 0;
1191
1246
  const hours = date.getHours();
@@ -1212,7 +1267,7 @@ function DateTimePicker({
1212
1267
  if (!date) return onApply?.(void 0);
1213
1268
  onApply?.(showTime ? combine(date, time ?? { hour: 12, minute: 0, period: "AM" }) : date);
1214
1269
  };
1215
- return /* @__PURE__ */ jsxs15(
1270
+ return /* @__PURE__ */ jsxs16(
1216
1271
  "div",
1217
1272
  {
1218
1273
  className: cn(
@@ -1220,14 +1275,14 @@ function DateTimePicker({
1220
1275
  className
1221
1276
  ),
1222
1277
  children: [
1223
- /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-6", children: [
1278
+ /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-6", children: [
1224
1279
  /* @__PURE__ */ jsx23(Calendar, { mode: "single", selected: date, onSelect: setDate, defaultMonth: date, ...calendarProps }),
1225
- showTime && /* @__PURE__ */ jsxs15(Fragment3, { children: [
1280
+ showTime && /* @__PURE__ */ jsxs16(Fragment3, { children: [
1226
1281
  /* @__PURE__ */ jsx23("div", { className: "h-70 w-px self-center bg-border", "aria-hidden": "true" }),
1227
1282
  /* @__PURE__ */ jsx23(TimePicker, { value: time, onValueChange: setTime, ...timePickerProps })
1228
1283
  ] })
1229
1284
  ] }),
1230
- /* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-end gap-2", children: [
1285
+ /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-end gap-2", children: [
1231
1286
  /* @__PURE__ */ jsx23(
1232
1287
  Button,
1233
1288
  {
@@ -1253,8 +1308,8 @@ var DatePicker = React22.forwardRef(
1253
1308
  const [open, setOpen] = React22.useState(false);
1254
1309
  const [internal, setInternal] = React22.useState(defaultValue);
1255
1310
  const current = value ?? internal;
1256
- return /* @__PURE__ */ jsx23(Field, { label, className: cn("w-75", className), children: (control) => /* @__PURE__ */ jsxs15(PopoverPrimitive.Root, { open, onOpenChange: setOpen, children: [
1257
- /* @__PURE__ */ jsx23(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs15(
1311
+ return /* @__PURE__ */ jsx23(Field, { label, className: cn("w-75", className), children: (control) => /* @__PURE__ */ jsxs16(PopoverPrimitive.Root, { open, onOpenChange: setOpen, children: [
1312
+ /* @__PURE__ */ jsx23(PopoverPrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs16(
1258
1313
  "button",
1259
1314
  {
1260
1315
  ref,
@@ -1387,7 +1442,7 @@ FormMessage.displayName = "FormMessage";
1387
1442
  // src/components/Forms & Data Entry/InlineEdit.tsx
1388
1443
  import * as React24 from "react";
1389
1444
  import { PencilSimple, WarningCircle as WarningCircle2 } from "@phosphor-icons/react";
1390
- import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
1445
+ import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
1391
1446
  function limitsText(min, max) {
1392
1447
  if (min !== void 0 && max !== void 0) return `${min}\u2013${max} characters`;
1393
1448
  if (min !== void 0) return `At least ${min} characters`;
@@ -1476,7 +1531,7 @@ var InlineEdit = React24.forwardRef(
1476
1531
  ref,
1477
1532
  className: cn(fill ? "flex w-full min-w-0" : "inline-flex min-w-0 max-w-full", editing && (error || showLimits) && "flex-col gap-1.5", className),
1478
1533
  ...props,
1479
- children: editing ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
1534
+ children: editing ? /* @__PURE__ */ jsxs17(Fragment4, { children: [
1480
1535
  React24.createElement(multiline ? "textarea" : "input", {
1481
1536
  ref: fieldRef,
1482
1537
  value: draft,
@@ -1510,26 +1565,26 @@ var InlineEdit = React24.forwardRef(
1510
1565
  if (!cancelled.current) finish(true, false);
1511
1566
  }
1512
1567
  }),
1513
- (error || showLimits) && /* @__PURE__ */ jsxs16(
1568
+ (error || showLimits) && /* @__PURE__ */ jsxs17(
1514
1569
  "p",
1515
1570
  {
1516
1571
  id: errorId,
1517
1572
  role: error ? "alert" : void 0,
1518
1573
  className: cn("flex items-start justify-between gap-2 px-3 text-ui-caption", error ? "text-destructive" : "text-secondary-muted-foreground"),
1519
1574
  children: [
1520
- /* @__PURE__ */ jsxs16("span", { className: "flex items-start gap-2", children: [
1575
+ /* @__PURE__ */ jsxs17("span", { className: "flex items-start gap-2", children: [
1521
1576
  error && /* @__PURE__ */ jsx25(WarningCircle2, { size: 16, "aria-hidden": true, className: "shrink-0" }),
1522
1577
  showLimits ? limitsText(minLength, maxLength) : error,
1523
1578
  showLimits && error && /* @__PURE__ */ jsx25("span", { className: "sr-only", children: error })
1524
1579
  ] }),
1525
- showLimits && /* @__PURE__ */ jsxs16("span", { "aria-hidden": true, className: "shrink-0 tabular-nums", children: [
1580
+ showLimits && /* @__PURE__ */ jsxs17("span", { "aria-hidden": true, className: "shrink-0 tabular-nums", children: [
1526
1581
  draft.length,
1527
1582
  maxLength !== void 0 && `/${maxLength}`
1528
1583
  ] })
1529
1584
  ]
1530
1585
  }
1531
1586
  )
1532
- ] }) : /* @__PURE__ */ jsxs16(
1587
+ ] }) : /* @__PURE__ */ jsxs17(
1533
1588
  "button",
1534
1589
  {
1535
1590
  ref: readRef,
@@ -1545,7 +1600,8 @@ var InlineEdit = React24.forwardRef(
1545
1600
  // one. The extra 1px of bottom padding keeps the height identical so the text never jumps.
1546
1601
  selected ? "rounded-none border-b-2 border-accent-foreground py-1" : "rounded-none border-b border-transparent pb-1.25 pt-1 enabled:hover:border-input-muted enabled:focus-visible:border-input-muted"
1547
1602
  ) : "rounded-md border border-transparent py-1 enabled:focus-visible:border-input-accent",
1548
- "enabled:hover:bg-secondary disabled:cursor-not-allowed disabled:opacity-50",
1603
+ // The text is editable in place, so hovering it shows the text cursor.
1604
+ "enabled:cursor-text enabled:hover:bg-secondary disabled:cursor-not-allowed disabled:opacity-50",
1549
1605
  textClasses
1550
1606
  ),
1551
1607
  children: [
@@ -1596,9 +1652,9 @@ Input.displayName = "Input";
1596
1652
 
1597
1653
  // src/components/Forms & Data Entry/InputWithAction.tsx
1598
1654
  import * as React26 from "react";
1599
- import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
1655
+ import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
1600
1656
  var InputWithAction = React26.forwardRef(
1601
- ({ className, actionLabel, onAction, tags, status = "default", label, description, message, id, disabled, placeholder, ...props }, ref) => /* @__PURE__ */ jsx27(Field, { label, description, message, status, id, children: (control) => /* @__PURE__ */ jsxs17(
1657
+ ({ className, actionLabel, onAction, tags, status = "default", label, description, message, id, disabled, placeholder, ...props }, ref) => /* @__PURE__ */ jsx27(Field, { label, description, message, status, id, children: (control) => /* @__PURE__ */ jsxs18(
1602
1658
  "div",
1603
1659
  {
1604
1660
  className: cn(
@@ -1632,7 +1688,7 @@ InputWithAction.displayName = "InputWithAction";
1632
1688
  // src/components/Forms & Data Entry/NumberInput.tsx
1633
1689
  import * as React27 from "react";
1634
1690
  import { Minus as Minus2, Plus as Plus2 } from "@phosphor-icons/react";
1635
- import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
1691
+ import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
1636
1692
  var NumberInput = React27.forwardRef(
1637
1693
  ({
1638
1694
  className,
@@ -1659,7 +1715,7 @@ var NumberInput = React27.forwardRef(
1659
1715
  setInternal(clamped);
1660
1716
  onValueChange?.(clamped);
1661
1717
  };
1662
- return /* @__PURE__ */ jsx28(Field, { label, description, message, status, id, className: "w-50", children: (control) => /* @__PURE__ */ jsxs18(
1718
+ return /* @__PURE__ */ jsx28(Field, { label, description, message, status, id, className: "w-50", children: (control) => /* @__PURE__ */ jsxs19(
1663
1719
  "div",
1664
1720
  {
1665
1721
  className: cn(
@@ -1682,7 +1738,7 @@ var NumberInput = React27.forwardRef(
1682
1738
  children: /* @__PURE__ */ jsx28(Minus2, { size: 16, "aria-hidden": true })
1683
1739
  }
1684
1740
  ),
1685
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-center gap-1 text-center", children: [
1741
+ /* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-center gap-1 text-center", children: [
1686
1742
  /* @__PURE__ */ jsx28(
1687
1743
  "input",
1688
1744
  {
@@ -1737,7 +1793,7 @@ NumberInput.displayName = "NumberInput";
1737
1793
  // src/components/Forms & Data Entry/SearchBar.tsx
1738
1794
  import * as React28 from "react";
1739
1795
  import { MagnifyingGlass, X as X2 } from "@phosphor-icons/react";
1740
- import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
1796
+ import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
1741
1797
  var SearchBar = React28.forwardRef(
1742
1798
  ({ className, value, defaultValue, onChange, onClear, clearLabel = "Clear search", disabled, ...props }, ref) => {
1743
1799
  const innerRef = React28.useRef(null);
@@ -1754,7 +1810,7 @@ var SearchBar = React28.forwardRef(
1754
1810
  }
1755
1811
  onClear?.();
1756
1812
  };
1757
- return /* @__PURE__ */ jsxs19(
1813
+ return /* @__PURE__ */ jsxs20(
1758
1814
  "div",
1759
1815
  {
1760
1816
  className: cn(
@@ -1804,13 +1860,13 @@ SearchBar.displayName = "SearchBar";
1804
1860
  import * as React29 from "react";
1805
1861
  import { CaretDown as CaretDown3 } from "@phosphor-icons/react";
1806
1862
  import { Select as SelectPrimitive } from "radix-ui";
1807
- import { jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
1863
+ import { jsx as jsx30, jsxs as jsxs21 } from "react/jsx-runtime";
1808
1864
  var Select = SelectPrimitive.Root;
1809
1865
  var SelectValue = SelectPrimitive.Value;
1810
1866
  var SelectGroup = SelectPrimitive.Group;
1811
1867
  var CheckIcon = () => /* @__PURE__ */ jsx30("svg", { width: "10", height: "8", viewBox: "0 0 10 8", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx30("path", { d: "M1 4L3.5 6.5L9 1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
1812
1868
  var SelectTrigger = React29.forwardRef(
1813
- ({ className, children, icon, ...props }, ref) => /* @__PURE__ */ jsxs20(
1869
+ ({ className, children, icon, ...props }, ref) => /* @__PURE__ */ jsxs21(
1814
1870
  SelectPrimitive.Trigger,
1815
1871
  {
1816
1872
  ref,
@@ -1852,7 +1908,7 @@ var SelectContent = React29.forwardRef(
1852
1908
  );
1853
1909
  SelectContent.displayName = "SelectContent";
1854
1910
  var SelectItem = React29.forwardRef(
1855
- ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs20(
1911
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs21(
1856
1912
  SelectPrimitive.Item,
1857
1913
  {
1858
1914
  ref,
@@ -1874,7 +1930,7 @@ SelectItem.displayName = "SelectItem";
1874
1930
  // src/components/Forms & Data Entry/Slider.tsx
1875
1931
  import * as React30 from "react";
1876
1932
  import { Slider as SliderPrimitive } from "radix-ui";
1877
- import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
1933
+ import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
1878
1934
  var Slider = React30.forwardRef(
1879
1935
  ({
1880
1936
  className,
@@ -1893,12 +1949,12 @@ var Slider = React30.forwardRef(
1893
1949
  const [internal, setInternal] = React30.useState(defaultValue ?? [min]);
1894
1950
  const thumbValues = value ?? internal;
1895
1951
  const hasHeader = label != null || showRange;
1896
- return /* @__PURE__ */ jsxs21("div", { className: cn("flex w-full flex-col gap-2", className), children: [
1897
- hasHeader && /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between text-secondary-muted-foreground", children: [
1952
+ return /* @__PURE__ */ jsxs22("div", { className: cn("flex w-full flex-col gap-2", className), children: [
1953
+ hasHeader && /* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between text-secondary-muted-foreground", children: [
1898
1954
  label != null ? /* @__PURE__ */ jsx31("span", { className: "text-ui-label text-surface-foreground", children: label }) : /* @__PURE__ */ jsx31("span", { className: "text-ui-caption", children: min }),
1899
1955
  /* @__PURE__ */ jsx31("span", { className: "text-body-small", children: max })
1900
1956
  ] }),
1901
- /* @__PURE__ */ jsxs21(
1957
+ /* @__PURE__ */ jsxs22(
1902
1958
  SliderPrimitive.Root,
1903
1959
  {
1904
1960
  ref,
@@ -1979,12 +2035,12 @@ Textarea.displayName = "Textarea";
1979
2035
  import * as React32 from "react";
1980
2036
  import { X as X3 } from "@phosphor-icons/react";
1981
2037
  import { Dialog as DialogPrimitive } from "radix-ui";
1982
- import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
2038
+ import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
1983
2039
  var Dialog = DialogPrimitive.Root;
1984
2040
  var DialogTrigger = DialogPrimitive.Trigger;
1985
2041
  var DialogClose = DialogPrimitive.Close;
1986
2042
  var DialogContent = React32.forwardRef(
1987
- ({ className, children, closeLabel = "Close", hideClose, ...props }, ref) => /* @__PURE__ */ jsxs22(DialogPrimitive.Portal, { children: [
2043
+ ({ className, children, closeLabel = "Close", hideClose, ...props }, ref) => /* @__PURE__ */ jsxs23(DialogPrimitive.Portal, { children: [
1988
2044
  /* @__PURE__ */ jsx33(
1989
2045
  DialogPrimitive.Overlay,
1990
2046
  {
@@ -1992,7 +2048,7 @@ var DialogContent = React32.forwardRef(
1992
2048
  className: "fixed inset-0 bg-primary/30"
1993
2049
  }
1994
2050
  ),
1995
- /* @__PURE__ */ jsxs22(
2051
+ /* @__PURE__ */ jsxs23(
1996
2052
  DialogPrimitive.Content,
1997
2053
  {
1998
2054
  ref,
@@ -2038,7 +2094,7 @@ import * as React33 from "react";
2038
2094
  import { CheckCircle as CheckCircle2, Info, Warning, WarningCircle as WarningCircle3, X as X4 } from "@phosphor-icons/react";
2039
2095
  import { cva as cva4 } from "class-variance-authority";
2040
2096
  import { Toast as ToastPrimitive } from "radix-ui";
2041
- import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
2097
+ import { jsx as jsx34, jsxs as jsxs24 } from "react/jsx-runtime";
2042
2098
  var toastVariants = cva4("border", {
2043
2099
  variants: {
2044
2100
  variant: {
@@ -2083,7 +2139,7 @@ ToastViewport.displayName = "ToastViewport";
2083
2139
  var Toast = React33.forwardRef(
2084
2140
  ({ className, variant = "info", title, description, action, closeLabel = "Close", children, ...props }, ref) => {
2085
2141
  const v = variant ?? "info";
2086
- return /* @__PURE__ */ jsxs23(
2142
+ return /* @__PURE__ */ jsxs24(
2087
2143
  ToastPrimitive.Root,
2088
2144
  {
2089
2145
  ref,
@@ -2092,7 +2148,7 @@ var Toast = React33.forwardRef(
2092
2148
  ...props,
2093
2149
  children: [
2094
2150
  /* @__PURE__ */ jsx34(VariantIcon, { variant: v, size: 20 }),
2095
- /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 flex-1 flex-col gap-1 text-body-small", children: [
2151
+ /* @__PURE__ */ jsxs24("div", { className: "flex min-w-0 flex-1 flex-col gap-1 text-body-small", children: [
2096
2152
  title != null && /* @__PURE__ */ jsx34(ToastPrimitive.Title, { className: cn("font-semibold", titleColour[v]), children: title }),
2097
2153
  description != null && /* @__PURE__ */ jsx34(ToastPrimitive.Description, { className: "text-secondary-muted-foreground", children: description }),
2098
2154
  children,
@@ -2116,7 +2172,7 @@ var ToastAction = ToastPrimitive.Action;
2116
2172
  var ToastInline = React33.forwardRef(
2117
2173
  ({ className, variant = "info", onClose, closeLabel = "Close", children, ...props }, ref) => {
2118
2174
  const v = variant ?? "info";
2119
- return /* @__PURE__ */ jsxs23(
2175
+ return /* @__PURE__ */ jsxs24(
2120
2176
  "div",
2121
2177
  {
2122
2178
  ref,
@@ -2137,14 +2193,14 @@ ToastInline.displayName = "ToastInline";
2137
2193
  // src/components/Overlays & Feedback/Tooltip.tsx
2138
2194
  import * as React34 from "react";
2139
2195
  import { Tooltip as TooltipPrimitive } from "radix-ui";
2140
- import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
2196
+ import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs25 } from "react/jsx-runtime";
2141
2197
  var TooltipProvider = TooltipPrimitive.Provider;
2142
2198
  var Tooltip = TooltipPrimitive.Root;
2143
2199
  var TooltipTrigger = TooltipPrimitive.Trigger;
2144
2200
  var TooltipContent = React34.forwardRef(
2145
2201
  ({ className, sideOffset = 4, title, description, action, arrow = true, children, ...props }, ref) => {
2146
2202
  const detailed = title != null || description != null;
2147
- return /* @__PURE__ */ jsx35(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs24(
2203
+ return /* @__PURE__ */ jsx35(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs25(
2148
2204
  TooltipPrimitive.Content,
2149
2205
  {
2150
2206
  ref,
@@ -2158,7 +2214,7 @@ var TooltipContent = React34.forwardRef(
2158
2214
  ),
2159
2215
  ...props,
2160
2216
  children: [
2161
- detailed ? /* @__PURE__ */ jsxs24(Fragment5, { children: [
2217
+ detailed ? /* @__PURE__ */ jsxs25(Fragment5, { children: [
2162
2218
  title != null && /* @__PURE__ */ jsx35("p", { className: "text-xs leading-4 font-semibold text-label", children: title }),
2163
2219
  description != null && /* @__PURE__ */ jsx35("p", { className: "text-xs leading-4.5 text-plum-200", children: description }),
2164
2220
  action != null && /* @__PURE__ */ jsx35("div", { className: "mt-1 text-ui-caption text-plum-300 underline *:underline", children: action })
@@ -2179,7 +2235,7 @@ import { Progress as ProgressPrimitive } from "radix-ui";
2179
2235
  // src/components/Tags & Badges/Tag.tsx
2180
2236
  import * as React35 from "react";
2181
2237
  import { cva as cva5 } from "class-variance-authority";
2182
- import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
2238
+ import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
2183
2239
  var tagVariants = cva5(
2184
2240
  "inline-flex items-center gap-1.5 whitespace-nowrap rounded-sm border px-2.5 py-1 text-ui-caption",
2185
2241
  {
@@ -2209,7 +2265,7 @@ var statusDotVariants = cva5("size-1.5 shrink-0 rounded-full", {
2209
2265
  defaultVariants: { status: "active" }
2210
2266
  });
2211
2267
  var StatusTag = React35.forwardRef(
2212
- ({ className, status, children, ...props }, ref) => /* @__PURE__ */ jsxs25("span", { ref, className: cn(tagVariants({ variant: "default" }), className), ...props, children: [
2268
+ ({ className, status, children, ...props }, ref) => /* @__PURE__ */ jsxs26("span", { ref, className: cn(tagVariants({ variant: "default" }), className), ...props, children: [
2213
2269
  /* @__PURE__ */ jsx36("span", { className: statusDotVariants({ status }), "aria-hidden": "true" }),
2214
2270
  children
2215
2271
  ] })
@@ -2217,11 +2273,11 @@ var StatusTag = React35.forwardRef(
2217
2273
  StatusTag.displayName = "StatusTag";
2218
2274
 
2219
2275
  // src/components/Question Types/FileUpload.tsx
2220
- import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
2276
+ import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
2221
2277
  var FileUploadZone = React36.forwardRef(
2222
2278
  ({ className, title = "Upload document", hint, icon, onFiles, ...props }, ref) => {
2223
2279
  const [over, setOver] = React36.useState(false);
2224
- return /* @__PURE__ */ jsxs26(
2280
+ return /* @__PURE__ */ jsxs27(
2225
2281
  "label",
2226
2282
  {
2227
2283
  className: cn(
@@ -2242,7 +2298,7 @@ var FileUploadZone = React36.forwardRef(
2242
2298
  },
2243
2299
  children: [
2244
2300
  /* @__PURE__ */ jsx37("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__ */ jsx37(FileText, { size: 24, "aria-hidden": true }) }),
2245
- /* @__PURE__ */ jsxs26("span", { className: "flex flex-col gap-1", children: [
2301
+ /* @__PURE__ */ jsxs27("span", { className: "flex flex-col gap-1", children: [
2246
2302
  /* @__PURE__ */ jsx37("span", { className: "text-body-small text-surface-foreground", children: title }),
2247
2303
  hint && /* @__PURE__ */ jsx37("span", { className: "text-ui-caption text-secondary-muted-foreground", children: hint })
2248
2304
  ] }),
@@ -2265,31 +2321,31 @@ FileUploadZone.displayName = "FileUploadZone";
2265
2321
  var FileUploadItem = React36.forwardRef(
2266
2322
  ({ className, name, size, status = "uploading", progress = 0, timeLeft, icon, onRemove, removeLabel, ...props }, ref) => {
2267
2323
  const uploading = status === "uploading";
2268
- return /* @__PURE__ */ jsxs26(
2324
+ return /* @__PURE__ */ jsxs27(
2269
2325
  "div",
2270
2326
  {
2271
2327
  ref,
2272
2328
  className: cn("flex w-full flex-col justify-center gap-2 overflow-hidden rounded-sm border border-border p-2", className),
2273
2329
  ...props,
2274
2330
  children: [
2275
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
2331
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", children: [
2276
2332
  /* @__PURE__ */ jsx37("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__ */ jsx37(FileText, { size: 24, "aria-hidden": true }) }),
2277
- /* @__PURE__ */ jsxs26("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
2278
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between gap-2", children: [
2333
+ /* @__PURE__ */ jsxs27("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
2334
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between gap-2", children: [
2279
2335
  /* @__PURE__ */ jsx37("p", { className: "min-w-0 truncate text-ui-label text-surface-foreground", children: name }),
2280
2336
  onRemove && /* @__PURE__ */ jsx37(Button, { type: "button", variant: "ghost", size: "icon-sm", "aria-label": removeLabel ?? `Remove ${name}`, onClick: onRemove, children: /* @__PURE__ */ jsx37(X5, { size: 16, "aria-hidden": true }) })
2281
2337
  ] }),
2282
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between text-ui-caption text-secondary-muted-foreground", children: [
2283
- /* @__PURE__ */ jsxs26("span", { className: "flex items-center gap-2", children: [
2338
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between text-ui-caption text-secondary-muted-foreground", children: [
2339
+ /* @__PURE__ */ jsxs27("span", { className: "flex items-center gap-2", children: [
2284
2340
  size,
2285
2341
  status === "complete" && /* @__PURE__ */ jsx37(Tag, { variant: "success", children: "Complete" }),
2286
2342
  status === "error" && /* @__PURE__ */ jsx37(Tag, { variant: "destructive", children: "Error" }),
2287
- uploading && timeLeft && /* @__PURE__ */ jsxs26(Fragment6, { children: [
2343
+ uploading && timeLeft && /* @__PURE__ */ jsxs27(Fragment6, { children: [
2288
2344
  /* @__PURE__ */ jsx37("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2289
2345
  timeLeft
2290
2346
  ] })
2291
2347
  ] }),
2292
- uploading && /* @__PURE__ */ jsxs26("span", { className: "text-body-xxs font-normal", children: [
2348
+ uploading && /* @__PURE__ */ jsxs27("span", { className: "text-body-xxs font-normal", children: [
2293
2349
  Math.round(progress),
2294
2350
  "%"
2295
2351
  ] })
@@ -2316,12 +2372,12 @@ FileUploadItem.displayName = "FileUploadItem";
2316
2372
  import * as React37 from "react";
2317
2373
  import { CornersOut, DotsThree, Image as ImageIcon, Pause, Play, SpeakerSimpleHigh, SpeakerSimpleX, Trash as Trash2 } from "@phosphor-icons/react";
2318
2374
  import { Slider as SliderPrimitive2, ToggleGroup as ToggleGroupPrimitive2 } from "radix-ui";
2319
- import { jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
2375
+ import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
2320
2376
  function MediaInfo({ name, details, onRemove, removeLabel, large, className, ...props }) {
2321
- return /* @__PURE__ */ jsxs27("div", { className: cn("flex items-center justify-between border-t border-border bg-surface px-6 py-4", className), ...props, children: [
2322
- /* @__PURE__ */ jsxs27("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2377
+ return /* @__PURE__ */ jsxs28("div", { className: cn("flex items-center justify-between border-t border-border bg-surface px-6 py-4", className), ...props, children: [
2378
+ /* @__PURE__ */ jsxs28("div", { className: "flex min-w-0 flex-1 flex-col gap-2", children: [
2323
2379
  /* @__PURE__ */ jsx38("p", { className: cn("truncate text-surface-foreground", large ? "text-body-section" : "text-ui-label"), children: name }),
2324
- details && /* @__PURE__ */ jsx38("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__ */ jsxs27(React37.Fragment, { children: [
2380
+ details && /* @__PURE__ */ jsx38("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__ */ jsxs28(React37.Fragment, { children: [
2325
2381
  index > 0 && /* @__PURE__ */ jsx38("span", { "aria-hidden": "true", className: "size-0.5 rounded-full bg-secondary-muted-foreground" }),
2326
2382
  part
2327
2383
  ] }, part)) })
@@ -2330,7 +2386,7 @@ function MediaInfo({ name, details, onRemove, removeLabel, large, className, ...
2330
2386
  ] });
2331
2387
  }
2332
2388
  var ImagePreview = React37.forwardRef(
2333
- ({ className, children, name, details, onRemove, ...props }, ref) => /* @__PURE__ */ jsxs27("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border", className), ...props, children: [
2389
+ ({ className, children, name, details, onRemove, ...props }, ref) => /* @__PURE__ */ jsxs28("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border", className), ...props, children: [
2334
2390
  /* @__PURE__ */ jsx38(
2335
2391
  "div",
2336
2392
  {
@@ -2406,8 +2462,8 @@ var VideoPlayer = React37.forwardRef(
2406
2462
  if (el.paused) void el.play();
2407
2463
  else el.pause();
2408
2464
  };
2409
- return /* @__PURE__ */ jsxs27("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border bg-surface", className), ...props, children: [
2410
- /* @__PURE__ */ jsxs27("div", { className: "relative flex h-60.5 w-full items-end bg-accent-soft", children: [
2465
+ return /* @__PURE__ */ jsxs28("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border bg-surface", className), ...props, children: [
2466
+ /* @__PURE__ */ jsxs28("div", { className: "relative flex h-60.5 w-full items-end bg-accent-soft", children: [
2411
2467
  src && /* @__PURE__ */ jsx38(
2412
2468
  "video",
2413
2469
  {
@@ -2421,8 +2477,8 @@ var VideoPlayer = React37.forwardRef(
2421
2477
  onVolumeChange: (event) => setVolume(event.currentTarget.muted ? 0 : event.currentTarget.volume)
2422
2478
  }
2423
2479
  ),
2424
- /* @__PURE__ */ jsxs27("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: [
2425
- /* @__PURE__ */ jsxs27(
2480
+ /* @__PURE__ */ jsxs28("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: [
2481
+ /* @__PURE__ */ jsxs28(
2426
2482
  SliderPrimitive2.Root,
2427
2483
  {
2428
2484
  min: 0,
@@ -2441,8 +2497,8 @@ var VideoPlayer = React37.forwardRef(
2441
2497
  ]
2442
2498
  }
2443
2499
  ),
2444
- /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between", children: [
2445
- /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-4", children: [
2500
+ /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
2501
+ /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-4", children: [
2446
2502
  /* @__PURE__ */ jsx38(
2447
2503
  "button",
2448
2504
  {
@@ -2453,13 +2509,13 @@ var VideoPlayer = React37.forwardRef(
2453
2509
  children: playing ? /* @__PURE__ */ jsx38(Pause, { size: 16, weight: "fill", "aria-hidden": true }) : /* @__PURE__ */ jsx38(Play, { size: 16, weight: "fill", "aria-hidden": true })
2454
2510
  }
2455
2511
  ),
2456
- /* @__PURE__ */ jsxs27("span", { className: "text-ui-label whitespace-nowrap text-surface/80", children: [
2512
+ /* @__PURE__ */ jsxs28("span", { className: "text-ui-label whitespace-nowrap text-surface/80", children: [
2457
2513
  formatTime(time),
2458
2514
  " / ",
2459
2515
  formatTime(duration)
2460
2516
  ] })
2461
2517
  ] }),
2462
- /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", children: [
2518
+ /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
2463
2519
  /* @__PURE__ */ jsx38(
2464
2520
  VolumeControl,
2465
2521
  {
@@ -2506,8 +2562,8 @@ VideoPlayer.displayName = "VideoPlayer";
2506
2562
  function VolumeControl({ volume, onVolumeChange, className }) {
2507
2563
  const last = React37.useRef(volume || 1);
2508
2564
  if (volume > 0) last.current = volume;
2509
- return /* @__PURE__ */ jsxs27("div", { className: cn("group/volume flex items-center", className), children: [
2510
- /* @__PURE__ */ jsx38("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__ */ jsxs27(
2565
+ return /* @__PURE__ */ jsxs28("div", { className: cn("group/volume flex items-center", className), children: [
2566
+ /* @__PURE__ */ jsx38("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__ */ jsxs28(
2511
2567
  SliderPrimitive2.Root,
2512
2568
  {
2513
2569
  min: 0,
@@ -2591,7 +2647,7 @@ import {
2591
2647
  // src/components/Question Types/QuestionHeader.tsx
2592
2648
  import * as React40 from "react";
2593
2649
  import { DotsSixVertical } from "@phosphor-icons/react";
2594
- import { jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
2650
+ import { jsx as jsx41, jsxs as jsxs29 } from "react/jsx-runtime";
2595
2651
  var eyebrow = "text-ui-caption uppercase text-secondary-muted-foreground";
2596
2652
  var QuestionHeader = React40.forwardRef(
2597
2653
  ({ className, number, title, required, error, onDismissError, editor, onTitleChange, actions, meta, maxLength = 2e3, active, showCounter = true, dragHandleProps, showDragHandle = true, ...props }, ref) => {
@@ -2601,10 +2657,10 @@ var QuestionHeader = React40.forwardRef(
2601
2657
  if (editor) {
2602
2658
  const text = typeof title === "string" ? title : "";
2603
2659
  const count = (draft ?? text).length;
2604
- return /* @__PURE__ */ jsxs28("div", { ref, className: cn("group/header flex w-full flex-col gap-2", className), ...props, children: [
2605
- /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
2606
- /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
2607
- /* @__PURE__ */ jsxs28(
2660
+ return /* @__PURE__ */ jsxs29("div", { ref, className: cn("group/header flex w-full flex-col gap-2", className), ...props, children: [
2661
+ /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
2662
+ /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
2663
+ /* @__PURE__ */ jsxs29(
2608
2664
  "span",
2609
2665
  {
2610
2666
  "aria-label": dragHandleProps ? `Reorder question ${number}` : void 0,
@@ -2659,7 +2715,7 @@ var QuestionHeader = React40.forwardRef(
2659
2715
  textClassName: "text-heading-h4"
2660
2716
  }
2661
2717
  ),
2662
- showCounter && /* @__PURE__ */ jsxs28("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
2718
+ showCounter && /* @__PURE__ */ jsxs29("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
2663
2719
  count,
2664
2720
  "/",
2665
2721
  maxLength,
@@ -2667,13 +2723,13 @@ var QuestionHeader = React40.forwardRef(
2667
2723
  ] })
2668
2724
  ] });
2669
2725
  }
2670
- return /* @__PURE__ */ jsxs28("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
2726
+ return /* @__PURE__ */ jsxs29("div", { ref, className: cn("flex w-full flex-col gap-2", className), ...props, children: [
2671
2727
  showError && /* @__PURE__ */ jsx41(ToastInline, { variant: "destructive", onClose: onDismissError, className: "min-h-10", children: /* @__PURE__ */ jsx41("span", { className: "text-ui-label text-destructive", children: error === true ? "This question is mandatory." : error }) }),
2672
- /* @__PURE__ */ jsxs28("p", { className: eyebrow, children: [
2728
+ /* @__PURE__ */ jsxs29("p", { className: eyebrow, children: [
2673
2729
  "Question ",
2674
2730
  label
2675
2731
  ] }),
2676
- /* @__PURE__ */ jsxs28("h3", { className: "text-heading-h4 text-surface-foreground", children: [
2732
+ /* @__PURE__ */ jsxs29("h3", { className: "text-heading-h4 text-surface-foreground", children: [
2677
2733
  title,
2678
2734
  required && /* @__PURE__ */ jsx41("span", { "aria-hidden": "true", className: "text-destructive", children: "*" }),
2679
2735
  required && /* @__PURE__ */ jsx41("span", { className: "sr-only", children: " (required)" })
@@ -2684,7 +2740,7 @@ var QuestionHeader = React40.forwardRef(
2684
2740
  QuestionHeader.displayName = "QuestionHeader";
2685
2741
 
2686
2742
  // src/components/Question Types/QuestionEditorCard.tsx
2687
- import { Fragment as Fragment8, jsx as jsx42, jsxs as jsxs29 } from "react/jsx-runtime";
2743
+ import { Fragment as Fragment8, jsx as jsx42, jsxs as jsxs30 } from "react/jsx-runtime";
2688
2744
  var QuestionEditorCard = React41.forwardRef(
2689
2745
  ({
2690
2746
  className,
@@ -2711,7 +2767,7 @@ var QuestionEditorCard = React41.forwardRef(
2711
2767
  ...props
2712
2768
  }, ref) => {
2713
2769
  const footer = active && (countLabel != null || onAdd || onPaste);
2714
- return /* @__PURE__ */ jsxs29(
2770
+ return /* @__PURE__ */ jsxs30(
2715
2771
  "div",
2716
2772
  {
2717
2773
  ref,
@@ -2719,7 +2775,7 @@ var QuestionEditorCard = React41.forwardRef(
2719
2775
  "data-hovered": hovered ? "" : void 0,
2720
2776
  ...props,
2721
2777
  children: [
2722
- /* @__PURE__ */ jsxs29(
2778
+ /* @__PURE__ */ jsxs30(
2723
2779
  "div",
2724
2780
  {
2725
2781
  className: cn(
@@ -2727,8 +2783,8 @@ var QuestionEditorCard = React41.forwardRef(
2727
2783
  active ? "border-accent" : "border-border"
2728
2784
  ),
2729
2785
  children: [
2730
- /* @__PURE__ */ jsxs29("div", { className: cn("flex flex-col p-6", footer ? "gap-5" : "gap-4"), children: [
2731
- /* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-4", children: [
2786
+ /* @__PURE__ */ jsxs30("div", { className: cn("flex flex-col p-6", footer ? "gap-5" : "gap-4"), children: [
2787
+ /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-4", children: [
2732
2788
  /* @__PURE__ */ jsx42(
2733
2789
  QuestionHeader,
2734
2790
  {
@@ -2742,7 +2798,7 @@ var QuestionEditorCard = React41.forwardRef(
2742
2798
  showDragHandle,
2743
2799
  meta,
2744
2800
  maxLength,
2745
- actions: actions ?? /* @__PURE__ */ jsxs29(Fragment8, { children: [
2801
+ actions: actions ?? /* @__PURE__ */ jsxs30(Fragment8, { children: [
2746
2802
  /* @__PURE__ */ jsx42(
2747
2803
  Button,
2748
2804
  {
@@ -2781,14 +2837,14 @@ var QuestionEditorCard = React41.forwardRef(
2781
2837
  ),
2782
2838
  children
2783
2839
  ] }),
2784
- error && /* @__PURE__ */ jsxs29("p", { className: "flex items-center gap-1 text-ui-caption text-destructive-foreground", children: [
2840
+ error && /* @__PURE__ */ jsxs30("p", { className: "flex items-center gap-1 text-ui-caption text-destructive-foreground", children: [
2785
2841
  /* @__PURE__ */ jsx42(Warning2, { size: 16, "aria-hidden": true, className: "shrink-0" }),
2786
2842
  error
2787
2843
  ] }),
2788
- footer && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between", children: [
2844
+ footer && /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between", children: [
2789
2845
  /* @__PURE__ */ jsx42("p", { className: "text-ui-caption text-secondary-muted-foreground", children: countLabel }),
2790
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2", children: [
2791
- onAdd && /* @__PURE__ */ jsxs29(Button, { type: "button", variant: "outline", onClick: onAdd, children: [
2846
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2", children: [
2847
+ onAdd && /* @__PURE__ */ jsxs30(Button, { type: "button", variant: "outline", onClick: onAdd, children: [
2792
2848
  /* @__PURE__ */ jsx42(Plus3, { size: 16, "aria-hidden": true }),
2793
2849
  "Add choice"
2794
2850
  ] }),
@@ -2853,11 +2909,11 @@ function QuestionTypeIcon({ type, size = 22.5, className, ...props }) {
2853
2909
  }
2854
2910
 
2855
2911
  // src/components/Question Types/QuestionNavItem.tsx
2856
- import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
2912
+ import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
2857
2913
  var QuestionNavItem = React43.forwardRef(
2858
2914
  ({ className, questionType = "select-one", selected, error, asChild, showDragHandle = true, hovered, children, ...props }, ref) => {
2859
2915
  const Comp = asChild ? Slot3.Root : "button";
2860
- return /* @__PURE__ */ jsxs30(
2916
+ return /* @__PURE__ */ jsxs31(
2861
2917
  Comp,
2862
2918
  {
2863
2919
  ref,
@@ -2876,7 +2932,7 @@ var QuestionNavItem = React43.forwardRef(
2876
2932
  ),
2877
2933
  ...props,
2878
2934
  children: [
2879
- /* @__PURE__ */ jsxs30("span", { "aria-hidden": "true", className: "relative flex size-4 shrink-0 items-center justify-center", children: [
2935
+ /* @__PURE__ */ jsxs31("span", { "aria-hidden": "true", className: "relative flex size-4 shrink-0 items-center justify-center", children: [
2880
2936
  showDragHandle && /* @__PURE__ */ jsx44(DotsSixVertical2, { size: 16, className: "hidden group-hover/nav:block group-data-[hovered]/nav:block" }),
2881
2937
  /* @__PURE__ */ jsx44("span", { className: showDragHandle ? "group-hover/nav:hidden group-data-[hovered]/nav:hidden" : void 0, children: error ? /* @__PURE__ */ jsx44(Warning3, { size: 16, className: "text-destructive-foreground" }) : /* @__PURE__ */ jsx44(
2882
2938
  QuestionTypeIcon,
@@ -2899,11 +2955,11 @@ QuestionNavItem.displayName = "QuestionNavItem";
2899
2955
  // src/components/Question Types/QuestionOption.tsx
2900
2956
  import * as React44 from "react";
2901
2957
  import { Check as Check4, DotsSixVertical as DotsSixVertical3, Plus as Plus4, Trash as Trash4 } from "@phosphor-icons/react";
2902
- import { Fragment as Fragment9, jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
2958
+ import { Fragment as Fragment9, jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
2903
2959
  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";
2904
2960
  function QuestionOption(props) {
2905
2961
  const id = React44.useId();
2906
- return /* @__PURE__ */ jsxs31("label", { htmlFor: id, className: cn(optionClasses, props.className), children: [
2962
+ return /* @__PURE__ */ jsxs32("label", { htmlFor: id, className: cn(optionClasses, props.className), children: [
2907
2963
  props.kind === "checkbox" ? /* @__PURE__ */ jsx45(
2908
2964
  Checkbox,
2909
2965
  {
@@ -2922,7 +2978,7 @@ var QuestionOtherOption = React44.forwardRef(
2922
2978
  const inner = React44.useRef(null);
2923
2979
  React44.useImperativeHandle(ref, () => inner.current);
2924
2980
  const submit = () => onSubmit?.(inner.current?.value ?? "");
2925
- return /* @__PURE__ */ jsxs31(
2981
+ return /* @__PURE__ */ jsxs32(
2926
2982
  "div",
2927
2983
  {
2928
2984
  className: cn(
@@ -2961,8 +3017,8 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
2961
3017
  className: cn("cursor-grab touch-none select-none", dragHandleProps.className)
2962
3018
  } : { "aria-hidden": true };
2963
3019
  const grip = dragHandleProps ? /* @__PURE__ */ jsx45("span", { ...gripProps, className: cn("shrink-0", gripProps.className), children: /* @__PURE__ */ jsx45(DotsSixVertical3, { size: 20, "aria-hidden": true, className: "text-surface-foreground" }) }) : /* @__PURE__ */ jsx45(DotsSixVertical3, { size: 20, "aria-hidden": true, className: "shrink-0 text-surface-foreground" });
2964
- return /* @__PURE__ */ jsxs31("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
2965
- /* @__PURE__ */ jsxs31(
3020
+ return /* @__PURE__ */ jsxs32("div", { className: cn("group/option flex w-full items-center gap-2", className), children: [
3021
+ /* @__PURE__ */ jsxs32(
2966
3022
  "div",
2967
3023
  {
2968
3024
  className: cn(
@@ -2973,7 +3029,7 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
2973
3029
  ) : "border-border hover:border-input-muted hover:shadow-md"
2974
3030
  ),
2975
3031
  children: [
2976
- kind === "rank" ? /* @__PURE__ */ jsxs31(Fragment9, { children: [
3032
+ kind === "rank" ? /* @__PURE__ */ jsxs32(Fragment9, { children: [
2977
3033
  !locked && grip,
2978
3034
  /* @__PURE__ */ jsx45(
2979
3035
  "span",
@@ -2983,7 +3039,7 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
2983
3039
  children: rank
2984
3040
  }
2985
3041
  )
2986
- ] }) : reveal && locked ? /* @__PURE__ */ jsx45("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx45("span", { className: cn("inline-flex size-4 border-2 border-input bg-surface", kind === "radio" ? "rounded-full" : "rounded-xxs") }) }) : reveal ? /* @__PURE__ */ jsxs31("span", { ...gripProps, className: cn("relative flex size-5 shrink-0 items-center justify-center", gripProps.className), children: [
3042
+ ] }) : reveal && locked ? /* @__PURE__ */ jsx45("span", { "aria-hidden": "true", className: "relative flex size-5 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx45("span", { className: cn("inline-flex size-4 border-2 border-input bg-surface", kind === "radio" ? "rounded-full" : "rounded-xxs") }) }) : reveal ? /* @__PURE__ */ jsxs32("span", { ...gripProps, className: cn("relative flex size-5 shrink-0 items-center justify-center", gripProps.className), children: [
2987
3043
  /* @__PURE__ */ jsx45(
2988
3044
  "span",
2989
3045
  {
@@ -3019,7 +3075,7 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
3019
3075
  ]
3020
3076
  }
3021
3077
  ),
3022
- !locked && /* @__PURE__ */ jsxs31(
3078
+ !locked && /* @__PURE__ */ jsxs32(
3023
3079
  "div",
3024
3080
  {
3025
3081
  className: cn(
@@ -3038,7 +3094,7 @@ function QuestionOptionEditor({ label, onLabelChange, onRemove, onAdd, className
3038
3094
  // src/components/Question Types/RankList.tsx
3039
3095
  import * as React45 from "react";
3040
3096
  import { DotsSixVertical as DotsSixVertical4 } from "@phosphor-icons/react";
3041
- import { Fragment as Fragment10, jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
3097
+ import { Fragment as Fragment10, jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
3042
3098
  function move(list, from, to) {
3043
3099
  if (from === to || to < 0 || to >= list.length) return list;
3044
3100
  const next = list.slice();
@@ -3065,8 +3121,8 @@ var RankList = React45.forwardRef(
3065
3121
  setAnnouncement(`Moved to position ${to + 1} of ${items.length}`);
3066
3122
  onItemsChange(next);
3067
3123
  };
3068
- return /* @__PURE__ */ jsxs32(Fragment10, { children: [
3069
- /* @__PURE__ */ jsx46("ol", { ref, className: cn("flex w-full max-w-150 flex-col gap-4", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs32(
3124
+ return /* @__PURE__ */ jsxs33(Fragment10, { children: [
3125
+ /* @__PURE__ */ jsx46("ol", { ref, className: cn("flex w-full max-w-150 flex-col gap-4", className), ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs33(
3070
3126
  "li",
3071
3127
  {
3072
3128
  draggable: true,
@@ -3127,12 +3183,12 @@ RankList.displayName = "RankList";
3127
3183
  // src/components/Question Types/RatingScale.tsx
3128
3184
  import * as React46 from "react";
3129
3185
  import { ToggleGroup as ToggleGroupPrimitive3 } from "radix-ui";
3130
- import { jsx as jsx47, jsxs as jsxs33 } from "react/jsx-runtime";
3186
+ import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
3131
3187
  var RatingScale = React46.forwardRef(
3132
3188
  ({ className, max = 5, value, defaultValue, onValueChange, lowLabel, highLabel, ...props }, ref) => {
3133
3189
  const [internal, setInternal] = React46.useState(defaultValue);
3134
3190
  const current = value !== void 0 ? value : internal;
3135
- return /* @__PURE__ */ jsxs33("div", { className: cn("flex w-full max-w-150 flex-col gap-2", className), children: [
3191
+ return /* @__PURE__ */ jsxs34("div", { className: cn("flex w-full max-w-150 flex-col gap-2", className), children: [
3136
3192
  /* @__PURE__ */ jsx47(
3137
3193
  ToggleGroupPrimitive3.Root,
3138
3194
  {
@@ -3162,7 +3218,7 @@ var RatingScale = React46.forwardRef(
3162
3218
  ))
3163
3219
  }
3164
3220
  ),
3165
- (lowLabel != null || highLabel != null) && /* @__PURE__ */ jsxs33("div", { className: "flex justify-between text-ui-caption text-secondary-muted-foreground", "aria-hidden": "true", children: [
3221
+ (lowLabel != null || highLabel != null) && /* @__PURE__ */ jsxs34("div", { className: "flex justify-between text-ui-caption text-secondary-muted-foreground", "aria-hidden": "true", children: [
3166
3222
  /* @__PURE__ */ jsx47("span", { children: lowLabel }),
3167
3223
  /* @__PURE__ */ jsx47("span", { children: highLabel })
3168
3224
  ] })
@@ -3174,7 +3230,7 @@ RatingScale.displayName = "RatingScale";
3174
3230
  // src/components/Question Types/StimulusCard.tsx
3175
3231
  import * as React47 from "react";
3176
3232
  import { Image as ImageIcon2, ImageBroken, Trash as Trash5 } from "@phosphor-icons/react";
3177
- import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
3233
+ import { jsx as jsx48, jsxs as jsxs35 } from "react/jsx-runtime";
3178
3234
  var MIN_THUMBNAIL = 92;
3179
3235
  var MAX_THUMBNAIL = 240;
3180
3236
  var StimulusCard = React47.forwardRef(
@@ -3210,7 +3266,7 @@ var StimulusCard = React47.forwardRef(
3210
3266
  observer.observe(el);
3211
3267
  return () => observer.disconnect();
3212
3268
  }, []);
3213
- return /* @__PURE__ */ jsxs34(
3269
+ return /* @__PURE__ */ jsxs35(
3214
3270
  "div",
3215
3271
  {
3216
3272
  ref,
@@ -3218,7 +3274,7 @@ var StimulusCard = React47.forwardRef(
3218
3274
  className: cn("flex min-h-24.5 w-full items-center gap-4 rounded-md border border-border p-0.5 pr-4", className),
3219
3275
  ...props,
3220
3276
  children: [
3221
- /* @__PURE__ */ jsxs34("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
3277
+ /* @__PURE__ */ jsxs35("div", { className: "flex min-w-0 flex-1 items-center gap-4", children: [
3222
3278
  /* @__PURE__ */ jsx48(
3223
3279
  "span",
3224
3280
  {
@@ -3234,7 +3290,7 @@ var StimulusCard = React47.forwardRef(
3234
3290
  ) : error ? /* @__PURE__ */ jsx48(ImageBroken, { size: 24, "aria-hidden": true }) : icon ?? /* @__PURE__ */ jsx48(ImageIcon2, { size: 24, "aria-hidden": true })
3235
3291
  }
3236
3292
  ),
3237
- /* @__PURE__ */ jsxs34("div", { ref: textRef, className: "flex min-w-0 flex-1 flex-col justify-center gap-2 py-2 text-surface-foreground", children: [
3293
+ /* @__PURE__ */ jsxs35("div", { ref: textRef, className: "flex min-w-0 flex-1 flex-col justify-center gap-2 py-2 text-surface-foreground", children: [
3238
3294
  /* @__PURE__ */ jsx48("p", { className: "w-full text-ui-label", children: label }),
3239
3295
  onCaptionChange ? /* @__PURE__ */ jsx48(
3240
3296
  InlineEdit,
@@ -3254,7 +3310,7 @@ var StimulusCard = React47.forwardRef(
3254
3310
  textClassName: "text-body-base"
3255
3311
  }
3256
3312
  ) : /* @__PURE__ */ jsx48("p", { className: "w-full text-body-base [word-break:break-word]", children: caption }),
3257
- onCaptionChange && showCounter && maxLength !== void 0 && /* @__PURE__ */ jsxs34("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
3313
+ onCaptionChange && showCounter && maxLength !== void 0 && /* @__PURE__ */ jsxs35("p", { className: "text-ui-caption text-secondary-muted-foreground", children: [
3258
3314
  count,
3259
3315
  "/",
3260
3316
  maxLength,
@@ -3273,14 +3329,14 @@ StimulusCard.displayName = "StimulusCard";
3273
3329
  // src/components/Data Display/Progress.tsx
3274
3330
  import * as React48 from "react";
3275
3331
  import { Progress as ProgressPrimitive2 } from "radix-ui";
3276
- import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
3332
+ import { jsx as jsx49, jsxs as jsxs36 } from "react/jsx-runtime";
3277
3333
  var Progress = React48.forwardRef(
3278
3334
  ({ className, value = 0, label, valueLabel, detailsStart, detailsEnd, ...props }, ref) => {
3279
3335
  const hasHeader = label != null || valueLabel != null;
3280
3336
  const hasDetails = detailsStart != null || detailsEnd != null;
3281
3337
  const clamped = Math.min(100, Math.max(0, value ?? 0));
3282
- return /* @__PURE__ */ jsxs35("div", { className: cn("flex w-full flex-col gap-2", className), children: [
3283
- hasHeader && /* @__PURE__ */ jsxs35("div", { className: "flex items-center justify-between text-ui-label text-surface-foreground", children: [
3338
+ return /* @__PURE__ */ jsxs36("div", { className: cn("flex w-full flex-col gap-2", className), children: [
3339
+ hasHeader && /* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between text-ui-label text-surface-foreground", children: [
3284
3340
  /* @__PURE__ */ jsx49("span", { children: label }),
3285
3341
  /* @__PURE__ */ jsx49("span", { children: valueLabel === true ? `${Math.round(clamped)}%` : valueLabel })
3286
3342
  ] }),
@@ -3300,7 +3356,7 @@ var Progress = React48.forwardRef(
3300
3356
  )
3301
3357
  }
3302
3358
  ),
3303
- hasDetails && /* @__PURE__ */ jsxs35("div", { className: "flex items-start justify-between text-ui-label leading-5 text-secondary-muted-foreground", children: [
3359
+ hasDetails && /* @__PURE__ */ jsxs36("div", { className: "flex items-start justify-between text-ui-label leading-5 text-secondary-muted-foreground", children: [
3304
3360
  /* @__PURE__ */ jsx49("span", { children: detailsStart }),
3305
3361
  /* @__PURE__ */ jsx49("span", { children: detailsEnd })
3306
3362
  ] })
@@ -3312,7 +3368,7 @@ Progress.displayName = "Progress";
3312
3368
  // src/components/Data Display/Table.tsx
3313
3369
  import * as React49 from "react";
3314
3370
  import { CaretDown as CaretDown4, CaretUp } from "@phosphor-icons/react";
3315
- import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
3371
+ import { jsx as jsx50, jsxs as jsxs37 } from "react/jsx-runtime";
3316
3372
  var Table = React49.forwardRef(
3317
3373
  ({ className, containerClassName, striped, ...props }, ref) => /* @__PURE__ */ jsx50("div", { className: cn("relative w-full overflow-auto rounded-lg border border-border bg-surface", containerClassName), children: /* @__PURE__ */ jsx50(
3318
3374
  "table",
@@ -3367,7 +3423,7 @@ var TableHead = React49.forwardRef(
3367
3423
  className
3368
3424
  ),
3369
3425
  ...props,
3370
- children: sortable ? /* @__PURE__ */ jsxs36(
3426
+ children: sortable ? /* @__PURE__ */ jsxs37(
3371
3427
  "button",
3372
3428
  {
3373
3429
  type: "button",
@@ -3404,9 +3460,9 @@ var TableCell = React49.forwardRef(
3404
3460
  );
3405
3461
  TableCell.displayName = "TableCell";
3406
3462
  function TableCellTwoLines({ primary, secondary, avatar, className, ...props }) {
3407
- return /* @__PURE__ */ jsxs36("div", { className: cn("flex items-center gap-2", className), ...props, children: [
3463
+ return /* @__PURE__ */ jsxs37("div", { className: cn("flex items-center gap-2", className), ...props, children: [
3408
3464
  avatar,
3409
- /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-0.5 whitespace-nowrap", children: [
3465
+ /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-0.5 whitespace-nowrap", children: [
3410
3466
  /* @__PURE__ */ jsx50("span", { className: "text-ui-label text-surface-foreground", children: primary }),
3411
3467
  secondary && /* @__PURE__ */ jsx50("span", { className: "text-ui-caption text-secondary-muted-foreground", children: secondary })
3412
3468
  ] })
@@ -3416,7 +3472,7 @@ function TableCellTwoLines({ primary, secondary, avatar, className, ...props })
3416
3472
  // src/components/Data Display/StatCard.tsx
3417
3473
  import * as React50 from "react";
3418
3474
  import { cva as cva6 } from "class-variance-authority";
3419
- import { jsx as jsx51, jsxs as jsxs37 } from "react/jsx-runtime";
3475
+ import { jsx as jsx51, jsxs as jsxs38 } from "react/jsx-runtime";
3420
3476
  var statCardVariants = cva6("flex min-w-0 flex-col gap-2 rounded-md border p-3", {
3421
3477
  variants: {
3422
3478
  variant: {
@@ -3431,9 +3487,9 @@ var statCardVariants = cva6("flex min-w-0 flex-col gap-2 rounded-md border p-3",
3431
3487
  defaultVariants: { variant: "default" }
3432
3488
  });
3433
3489
  var StatCard = React50.forwardRef(
3434
- ({ className, variant, label, value, icon, ...props }, ref) => /* @__PURE__ */ jsxs37("div", { ref, className: cn(statCardVariants({ variant }), className), ...props, children: [
3490
+ ({ className, variant, label, value, icon, ...props }, ref) => /* @__PURE__ */ jsxs38("div", { ref, className: cn(statCardVariants({ variant }), className), ...props, children: [
3435
3491
  /* @__PURE__ */ jsx51("p", { className: "truncate text-ui-caption text-secondary-muted-foreground", children: label }),
3436
- /* @__PURE__ */ jsxs37("p", { className: "flex items-center gap-2 text-body-base text-surface-foreground", children: [
3492
+ /* @__PURE__ */ jsxs38("p", { className: "flex items-center gap-2 text-body-base text-surface-foreground", children: [
3437
3493
  icon && /* @__PURE__ */ jsx51("span", { "aria-hidden": "true", className: "inline-flex size-6 shrink-0 items-center justify-center", children: icon }),
3438
3494
  value
3439
3495
  ] })
@@ -3448,7 +3504,7 @@ import * as React52 from "react";
3448
3504
  import * as React51 from "react";
3449
3505
  import { Crown, Plus as Plus5, X as X6 } from "@phosphor-icons/react";
3450
3506
  import { cva as cva7 } from "class-variance-authority";
3451
- import { jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
3507
+ import { jsx as jsx52, jsxs as jsxs39 } from "react/jsx-runtime";
3452
3508
  var editableTagVariants = cva7(
3453
3509
  "inline-flex h-6.5 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors",
3454
3510
  {
@@ -3468,12 +3524,12 @@ var EditableTag = React51.forwardRef(
3468
3524
  const classes = cn(editableTagVariants({ type }), className);
3469
3525
  const leading = type === "add" ? /* @__PURE__ */ jsx52(Plus5, { size: 12, "aria-hidden": true }) : icon !== void 0 ? icon : type === "default" ? /* @__PURE__ */ jsx52(Crown, { size: 12, weight: "fill", "aria-hidden": true }) : null;
3470
3526
  if (type === "add" || type === "multiple" && onClick) {
3471
- return /* @__PURE__ */ jsxs38("button", { ref, type: "button", className: classes, onClick, ...props, children: [
3527
+ return /* @__PURE__ */ jsxs39("button", { ref, type: "button", className: classes, onClick, ...props, children: [
3472
3528
  leading,
3473
3529
  children
3474
3530
  ] });
3475
3531
  }
3476
- return /* @__PURE__ */ jsxs38("span", { ref, className: classes, ...props, children: [
3532
+ return /* @__PURE__ */ jsxs39("span", { ref, className: classes, ...props, children: [
3477
3533
  leading,
3478
3534
  children,
3479
3535
  onRemove && /* @__PURE__ */ jsx52(
@@ -3492,24 +3548,24 @@ var EditableTag = React51.forwardRef(
3492
3548
  EditableTag.displayName = "EditableTag";
3493
3549
 
3494
3550
  // src/components/Research-Specific/ActivityStructure.tsx
3495
- import { jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
3551
+ import { jsx as jsx53, jsxs as jsxs40 } from "react/jsx-runtime";
3496
3552
  var ActivityStructure = React52.forwardRef(
3497
- ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", action, children, ...props }, ref) => /* @__PURE__ */ jsxs39(
3553
+ ({ className, title = "Activity Structure", stats, sections, onRemoveTag, onAddTag, addTagLabel = "Add tag", action, children, ...props }, ref) => /* @__PURE__ */ jsxs40(
3498
3554
  "section",
3499
3555
  {
3500
3556
  ref,
3501
3557
  className: cn("flex w-full max-w-96.5 flex-col gap-4 rounded-xl bg-surface p-4", className),
3502
3558
  ...props,
3503
3559
  children: [
3504
- /* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-between gap-2", children: [
3560
+ /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between gap-2", children: [
3505
3561
  /* @__PURE__ */ jsx53("h3", { className: "text-body-section text-surface-foreground", children: title }),
3506
3562
  action
3507
3563
  ] }),
3508
3564
  stats.length > 0 && /* @__PURE__ */ jsx53("div", { className: "grid grid-cols-2 gap-3", children: stats.map(({ id, ...stat }) => /* @__PURE__ */ jsx53(StatCard, { ...stat }, id)) }),
3509
- sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ jsxs39("div", { className: "flex flex-col gap-2", children: [
3565
+ sections?.map(({ id, heading, body, tags }) => /* @__PURE__ */ jsxs40("div", { className: "flex flex-col gap-2", children: [
3510
3566
  /* @__PURE__ */ jsx53("h4", { className: "text-heading-h4 text-surface-foreground", children: heading }),
3511
3567
  /* @__PURE__ */ jsx53("div", { className: "text-body-base text-surface-foreground", children: body }),
3512
- (tags?.length || onAddTag) && /* @__PURE__ */ jsxs39("div", { className: "flex flex-wrap items-center gap-2", children: [
3568
+ (tags?.length || onAddTag) && /* @__PURE__ */ jsxs40("div", { className: "flex flex-wrap items-center gap-2", children: [
3513
3569
  tags?.map((tag) => /* @__PURE__ */ jsx53(EditableTag, { type: "editable", onRemove: onRemoveTag && (() => onRemoveTag(id, tag)), children: tag }, tag)),
3514
3570
  onAddTag && /* @__PURE__ */ jsx53(EditableTag, { type: "add", onClick: () => onAddTag(id), children: addTagLabel })
3515
3571
  ] })
@@ -3525,7 +3581,7 @@ ActivityStructure.displayName = "ActivityStructure";
3525
3581
  import * as React53 from "react";
3526
3582
  import { DotsSixVertical as DotsSixVertical5, RadioButton as RadioButton2 } from "@phosphor-icons/react";
3527
3583
  import { cva as cva8 } from "class-variance-authority";
3528
- import { jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
3584
+ import { jsx as jsx54, jsxs as jsxs41 } from "react/jsx-runtime";
3529
3585
  var roleTagVariants = cva8(
3530
3586
  "group inline-flex h-6 items-center whitespace-nowrap rounded-sm py-1 text-ui-caption transition-colors",
3531
3587
  {
@@ -3555,7 +3611,7 @@ var Badge = React53.forwardRef(
3555
3611
  ({ className, type = "primary", selected = false, onClick, children, ...props }, ref) => {
3556
3612
  const classes = cn(roleTagVariants({ type, selected: type === "interactable" ? selected : false }), className);
3557
3613
  if (type === "interactable") {
3558
- return /* @__PURE__ */ jsxs40(
3614
+ return /* @__PURE__ */ jsxs41(
3559
3615
  "button",
3560
3616
  {
3561
3617
  ref,
@@ -3571,7 +3627,7 @@ var Badge = React53.forwardRef(
3571
3627
  }
3572
3628
  );
3573
3629
  }
3574
- return /* @__PURE__ */ jsxs40("span", { ref, className: classes, ...props, children: [
3630
+ return /* @__PURE__ */ jsxs41("span", { ref, className: classes, ...props, children: [
3575
3631
  type === "question" && /* @__PURE__ */ jsx54(RadioButton2, { size: 16, weight: "fill", "aria-hidden": true }),
3576
3632
  type === "id" && /* @__PURE__ */ jsx54("span", { className: "text-secondary-muted-foreground", children: "ID" }),
3577
3633
  children
@@ -3583,7 +3639,7 @@ Badge.displayName = "Badge";
3583
3639
  // src/components/Utility/Pagination.tsx
3584
3640
  import * as React54 from "react";
3585
3641
  import { ArrowLeft, ArrowRight, DotsThree as DotsThree2 } from "@phosphor-icons/react";
3586
- import { jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
3642
+ import { jsx as jsx55, jsxs as jsxs42 } from "react/jsx-runtime";
3587
3643
  function getPaginationItems(page, pageCount, siblings = 1) {
3588
3644
  const keep = /* @__PURE__ */ new Set([1, pageCount]);
3589
3645
  for (let p = page - siblings; p <= page + siblings; p++) if (p >= 1 && p <= pageCount) keep.add(p);
@@ -3624,7 +3680,7 @@ var Pagination = React54.forwardRef(
3624
3680
  children: /* @__PURE__ */ jsx55(ArrowRight, { size: 16, "aria-hidden": true })
3625
3681
  }
3626
3682
  );
3627
- return /* @__PURE__ */ jsxs41(
3683
+ return /* @__PURE__ */ jsxs42(
3628
3684
  "nav",
3629
3685
  {
3630
3686
  ref,
@@ -3633,11 +3689,11 @@ var Pagination = React54.forwardRef(
3633
3689
  ...props,
3634
3690
  children: [
3635
3691
  previous,
3636
- variant === "compact" ? /* @__PURE__ */ jsxs41("span", { className: "text-body-small text-surface-foreground", "aria-live": "polite", children: [
3692
+ variant === "compact" ? /* @__PURE__ */ jsxs42("span", { className: "text-body-small text-surface-foreground", "aria-live": "polite", children: [
3637
3693
  page,
3638
3694
  "/",
3639
3695
  pageCount
3640
- ] }) : /* @__PURE__ */ jsx55("ul", { className: "flex items-center gap-2", children: getPaginationItems(page, pageCount, siblings).map((item, index) => /* @__PURE__ */ jsx55("li", { children: item === "ellipsis" ? /* @__PURE__ */ jsxs41("span", { className: "inline-flex size-8 items-center justify-center rounded-sm border border-border bg-surface text-surface-foreground", children: [
3696
+ ] }) : /* @__PURE__ */ jsx55("ul", { className: "flex items-center gap-2", children: getPaginationItems(page, pageCount, siblings).map((item, index) => /* @__PURE__ */ jsx55("li", { children: item === "ellipsis" ? /* @__PURE__ */ jsxs42("span", { className: "inline-flex size-8 items-center justify-center rounded-sm border border-border bg-surface text-surface-foreground", children: [
3641
3697
  /* @__PURE__ */ jsx55(DotsThree2, { size: 16, "aria-hidden": true }),
3642
3698
  /* @__PURE__ */ jsx55("span", { className: "sr-only", children: "More pages" })
3643
3699
  ] }) : /* @__PURE__ */ jsx55(