@postxl/ui-components 1.3.5 → 1.3.7

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
@@ -2,6 +2,7 @@ import { clsx } from "clsx";
2
2
  import { twMerge } from "tailwind-merge";
3
3
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
4
4
  import { ArrowLeftIcon, ArrowRightIcon, CalendarIcon, CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleIcon, Cross1Icon, Cross2Icon, DotFilledIcon, DotsHorizontalIcon, DoubleArrowLeftIcon, DoubleArrowRightIcon, DragHandleDots2Icon, EnterFullScreenIcon, MagnifyingGlassIcon } from "@radix-ui/react-icons";
5
+ import * as React$49 from "react";
5
6
  import * as React$48 from "react";
6
7
  import * as React$47 from "react";
7
8
  import * as React$46 from "react";
@@ -59,7 +60,7 @@ import * as AvatarPrimitive from "@radix-ui/react-avatar";
59
60
  import { DayPicker, getDefaultClassNames } from "react-day-picker";
60
61
  import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
61
62
  import useEmblaCarousel from "embla-carousel-react";
62
- import { BaselineIcon, CalendarIcon as CalendarIcon$1, CheckIcon as CheckIcon$1, CheckSquareIcon, ChevronDownIcon as ChevronDownIcon$1, ChevronUpIcon as ChevronUpIcon$1, CopyIcon, EraserIcon, EyeOffIcon, FilterX, GripHorizontalIcon, HashIcon, ListChecksIcon, ListIcon, PanelLeftIcon, PinIcon, PinOffIcon, PlusIcon, Settings2Icon, SquareIcon, TextInitialIcon, TrashIcon, XIcon } from "lucide-react";
63
+ import { BaselineIcon, CalendarIcon as CalendarIcon$1, CheckIcon as CheckIcon$1, CheckSquareIcon, ChevronDownIcon as ChevronDownIcon$1, ChevronRightIcon as ChevronRightIcon$1, ChevronUpIcon as ChevronUpIcon$1, CopyIcon, EraserIcon, EyeOffIcon, FilterX, GripHorizontalIcon, HashIcon, ListChecksIcon, ListIcon, ListTreeIcon, MinusIcon, PanelLeftIcon, PinIcon, PinOffIcon, PlusIcon, Settings2Icon, SquareIcon, TextInitialIcon, TrashIcon, XIcon } from "lucide-react";
63
64
  import * as CollapsePrimitive from "@radix-ui/react-collapsible";
64
65
  import { Command as Command$1 } from "cmdk";
65
66
  import * as DialogPrimitive from "@radix-ui/react-dialog";
@@ -91,17 +92,32 @@ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
91
92
  function cn(...inputs) {
92
93
  return twMerge(clsx(inputs));
93
94
  }
95
+ /**
96
+ * Generates a test ID by combining a base ID with a suffix.
97
+ * Returns undefined if no base ID is provided.
98
+ *
99
+ * For the root element, use `data-test-id={__e2e_test_id__}` directly.
100
+ * Use this function only for sub-elements that need a suffix.
101
+ *
102
+ * @example
103
+ * <div data-test-id={__e2e_test_id__}> // root element - use directly
104
+ * <input data-test-id={testId(__e2e_test_id__, 'search')}> // sub-element - returns `${baseId}-search` or undefined
105
+ */
106
+ function testId(baseId, suffix) {
107
+ if (!baseId) return void 0;
108
+ return `${baseId}-${suffix}`;
109
+ }
94
110
 
95
111
  //#endregion
96
112
  //#region src/accordion/accordion.tsx
97
113
  const Accordion = AccordionPrimitive.Root;
98
- const AccordionItem = React$48.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, {
114
+ const AccordionItem = React$49.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, {
99
115
  ref,
100
116
  className: cn("border-b", className),
101
117
  ...props
102
118
  }));
103
119
  AccordionItem.displayName = "AccordionItem";
104
- const AccordionTrigger = React$48.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, {
120
+ const AccordionTrigger = React$49.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, {
105
121
  className: "flex",
106
122
  children: /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, {
107
123
  ref,
@@ -111,7 +127,7 @@ const AccordionTrigger = React$48.forwardRef(({ className, children,...props },
111
127
  })
112
128
  }));
113
129
  AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
114
- const AccordionContent = React$48.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
130
+ const AccordionContent = React$49.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
115
131
  ref,
116
132
  className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
117
133
  ...props,
@@ -131,21 +147,21 @@ const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm [
131
147
  } },
132
148
  defaultVariants: { variant: "default" }
133
149
  });
134
- const Alert = React$47.forwardRef(({ className, variant,...props }, ref) => /* @__PURE__ */ jsx("div", {
150
+ const Alert = React$48.forwardRef(({ className, variant,...props }, ref) => /* @__PURE__ */ jsx("div", {
135
151
  ref,
136
152
  role: "alert",
137
153
  className: cn(alertVariants({ variant }), className),
138
154
  ...props
139
155
  }));
140
156
  Alert.displayName = "Alert";
141
- const AlertTitle = React$47.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsx("h5", {
157
+ const AlertTitle = React$48.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsx("h5", {
142
158
  ref,
143
159
  className: cn("mb-1 font-medium leading-none tracking-tight", className),
144
160
  ...props,
145
161
  children
146
162
  }));
147
163
  AlertTitle.displayName = "AlertTitle";
148
- const AlertDescription = React$47.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
164
+ const AlertDescription = React$48.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
149
165
  ref,
150
166
  className: cn("text-sm [&_p]:leading-relaxed", className),
151
167
  ...props
@@ -204,13 +220,13 @@ function Button({ className, variant, size, asChild = false, __e2e_test_id__,...
204
220
  const AlertDialog = AlertDialogPrimitive.Root;
205
221
  const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
206
222
  const AlertDialogPortal = AlertDialogPrimitive.Portal;
207
- const AlertDialogOverlay = React$46.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Overlay, {
223
+ const AlertDialogOverlay = React$47.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Overlay, {
208
224
  className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className),
209
225
  ...props,
210
226
  ref
211
227
  }));
212
228
  AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
213
- const AlertDialogContent = React$46.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialogPrimitive.Content, {
229
+ const AlertDialogContent = React$47.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialogPrimitive.Content, {
214
230
  ref,
215
231
  className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className),
216
232
  ...props
@@ -226,25 +242,25 @@ const AlertDialogFooter = ({ className,...props }) => /* @__PURE__ */ jsx("div",
226
242
  ...props
227
243
  });
228
244
  AlertDialogFooter.displayName = "AlertDialogFooter";
229
- const AlertDialogTitle = React$46.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, {
245
+ const AlertDialogTitle = React$47.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Title, {
230
246
  ref,
231
247
  className: cn("text-lg font-semibold", className),
232
248
  ...props
233
249
  }));
234
250
  AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
235
- const AlertDialogDescription = React$46.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, {
251
+ const AlertDialogDescription = React$47.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Description, {
236
252
  ref,
237
253
  className: cn("text-sm text-muted-foreground", className),
238
254
  ...props
239
255
  }));
240
256
  AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
241
- const AlertDialogAction = React$46.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, {
257
+ const AlertDialogAction = React$47.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Action, {
242
258
  ref,
243
259
  className: cn(buttonVariants(), className),
244
260
  ...props
245
261
  }));
246
262
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
247
- const AlertDialogCancel = React$46.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, {
263
+ const AlertDialogCancel = React$47.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AlertDialogPrimitive.Cancel, {
248
264
  ref,
249
265
  className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className),
250
266
  ...props
@@ -253,19 +269,19 @@ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
253
269
 
254
270
  //#endregion
255
271
  //#region src/avatar/avatar.tsx
256
- const Avatar = React$45.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
272
+ const Avatar = React$46.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
257
273
  ref,
258
274
  className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
259
275
  ...props
260
276
  }));
261
277
  Avatar.displayName = AvatarPrimitive.Root.displayName;
262
- const AvatarImage = React$45.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, {
278
+ const AvatarImage = React$46.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Image, {
263
279
  ref,
264
280
  className: cn("aspect-square h-full w-full", className),
265
281
  ...props
266
282
  }));
267
283
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
268
- const AvatarFallback = React$45.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Fallback, {
284
+ const AvatarFallback = React$46.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Fallback, {
269
285
  ref,
270
286
  className: cn("flex h-full w-full items-center justify-center rounded-full bg-muted", className),
271
287
  ...props
@@ -311,25 +327,25 @@ function Badge({ className, variant, size, asChild = false,...props }) {
311
327
 
312
328
  //#endregion
313
329
  //#region src/breadcrumb/breadcrumb.tsx
314
- const Breadcrumb = React$44.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", {
330
+ const Breadcrumb = React$45.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx("nav", {
315
331
  ref,
316
332
  "aria-label": "breadcrumb",
317
333
  ...props
318
334
  }));
319
335
  Breadcrumb.displayName = "Breadcrumb";
320
- const BreadcrumbList = React$44.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("ol", {
336
+ const BreadcrumbList = React$45.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("ol", {
321
337
  ref,
322
338
  className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className),
323
339
  ...props
324
340
  }));
325
341
  BreadcrumbList.displayName = "BreadcrumbList";
326
- const BreadcrumbItem = React$44.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("li", {
342
+ const BreadcrumbItem = React$45.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("li", {
327
343
  ref,
328
344
  className: cn("inline-flex items-center gap-1.5", className),
329
345
  ...props
330
346
  }));
331
347
  BreadcrumbItem.displayName = "BreadcrumbItem";
332
- const BreadcrumbLink = React$44.forwardRef(({ asChild, className,...props }, ref) => {
348
+ const BreadcrumbLink = React$45.forwardRef(({ asChild, className,...props }, ref) => {
333
349
  const Comp = asChild ? Slot : "a";
334
350
  return /* @__PURE__ */ jsx(Comp, {
335
351
  ref,
@@ -338,7 +354,7 @@ const BreadcrumbLink = React$44.forwardRef(({ asChild, className,...props }, ref
338
354
  });
339
355
  });
340
356
  BreadcrumbLink.displayName = "BreadcrumbLink";
341
- const BreadcrumbPage = React$44.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("span", {
357
+ const BreadcrumbPage = React$45.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("span", {
342
358
  ref,
343
359
  "aria-disabled": "true",
344
360
  "aria-current": "page",
@@ -366,10 +382,10 @@ BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
366
382
 
367
383
  //#endregion
368
384
  //#region src/calendar/calendar.tsx
369
- function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", showYearNavigation = false, formatters, components,...props }) {
385
+ function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", showYearNavigation = false, formatters, components, __e2e_test_id__,...props }) {
370
386
  const defaultClassNames = getDefaultClassNames();
371
- const [rangeSelectionStep, setRangeSelectionStep] = React$43.useState("from");
372
- const handleDayClick = React$43.useCallback((day, modifiers, e) => {
387
+ const [rangeSelectionStep, setRangeSelectionStep] = React$44.useState("from");
388
+ const handleDayClick = React$44.useCallback((day, modifiers, e) => {
373
389
  if (props.mode === "range") {
374
390
  const range = props.selected;
375
391
  if (rangeSelectionStep === "from") {
@@ -399,8 +415,8 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
399
415
  fromMonth = props.startMonth ?? new Date(nowYear - 100, 0);
400
416
  toMonth = props.endMonth ?? new Date(nowYear + 100, 11);
401
417
  }
402
- const [currentMonth, setCurrentMonth] = React$43.useState(props.defaultMonth ?? props.month ?? new Date());
403
- React$43.useEffect(() => {
418
+ const [currentMonth, setCurrentMonth] = React$44.useState(props.defaultMonth ?? props.month ?? new Date());
419
+ React$44.useEffect(() => {
404
420
  if (props.month) setCurrentMonth(props.month);
405
421
  }, [props.month]);
406
422
  const addMonths = (date, months) => {
@@ -467,6 +483,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
467
483
  disabled: fromMonth && currentMonth <= fromMonth,
468
484
  className: btnClassNames,
469
485
  onClick: () => setCurrentMonth((m) => addMonths(m ?? new Date(), -12)),
486
+ __e2e_test_id__: testId(__e2e_test_id__, "prev-year"),
470
487
  children: /* @__PURE__ */ jsx(DoubleArrowLeftIcon, { className: "" })
471
488
  }), /* @__PURE__ */ jsx(Button, {
472
489
  "aria-label": "previous month",
@@ -475,6 +492,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
475
492
  disabled: fromMonth && currentMonth <= fromMonth,
476
493
  className: btnClassNames,
477
494
  onClick: () => setCurrentMonth((m) => addMonths(m ?? new Date(), -1)),
495
+ __e2e_test_id__: testId(__e2e_test_id__, "prev-month"),
478
496
  children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
479
497
  })]
480
498
  }), /* @__PURE__ */ jsxs("div", {
@@ -486,6 +504,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
486
504
  disabled: toMonth && currentMonth >= toMonth,
487
505
  className: btnClassNames,
488
506
  onClick: () => setCurrentMonth((m) => addMonths(m ?? new Date(), 1)),
507
+ __e2e_test_id__: testId(__e2e_test_id__, "next-month"),
489
508
  children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
490
509
  }), showYearNavigation && /* @__PURE__ */ jsx(Button, {
491
510
  "aria-label": "next year",
@@ -494,6 +513,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
494
513
  disabled: toMonth && currentMonth >= toMonth,
495
514
  className: btnClassNames,
496
515
  onClick: () => setCurrentMonth((m) => addMonths(m ?? new Date(), 12)),
516
+ __e2e_test_id__: testId(__e2e_test_id__, "next-year"),
497
517
  children: /* @__PURE__ */ jsx(DoubleArrowRightIcon, {})
498
518
  })]
499
519
  })]
@@ -502,6 +522,7 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
502
522
  Root: ({ className: className$1, rootRef,...props$1 }) => {
503
523
  return /* @__PURE__ */ jsx("div", {
504
524
  "data-slot": "calendar",
525
+ "data-test-id": __e2e_test_id__,
505
526
  ref: rootRef,
506
527
  className: cn(className$1),
507
528
  ...props$1
@@ -539,8 +560,8 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
539
560
  }
540
561
  function CalendarDayButton({ className, day, modifiers,...props }) {
541
562
  const defaultClassNames = getDefaultClassNames();
542
- const ref = React$43.useRef(null);
543
- React$43.useEffect(() => {
563
+ const ref = React$44.useRef(null);
564
+ React$44.useEffect(() => {
544
565
  if (modifiers.focused) ref.current?.focus();
545
566
  }, [modifiers.focused]);
546
567
  return /* @__PURE__ */ jsx(Button, {
@@ -559,38 +580,38 @@ function CalendarDayButton({ className, day, modifiers,...props }) {
559
580
 
560
581
  //#endregion
561
582
  //#region src/card/card.tsx
562
- const Card = React$42.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
583
+ const Card = React$43.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
563
584
  ref,
564
585
  className: cn("rounded-xl border bg-card text-card-foreground shadow", className),
565
586
  ...props
566
587
  }));
567
588
  Card.displayName = "Card";
568
- const CardHeader = React$42.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
589
+ const CardHeader = React$43.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
569
590
  ref,
570
591
  className: cn("flex flex-col space-y-1.5 p-6", className),
571
592
  ...props
572
593
  }));
573
594
  CardHeader.displayName = "CardHeader";
574
- const CardTitle = React$42.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsx("h3", {
595
+ const CardTitle = React$43.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsx("h3", {
575
596
  ref,
576
597
  className: cn("font-semibold leading-none tracking-tight", className),
577
598
  ...props,
578
599
  children
579
600
  }));
580
601
  CardTitle.displayName = "CardTitle";
581
- const CardDescription = React$42.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("p", {
602
+ const CardDescription = React$43.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("p", {
582
603
  ref,
583
604
  className: cn("text-sm text-muted-foreground", className),
584
605
  ...props
585
606
  }));
586
607
  CardDescription.displayName = "CardDescription";
587
- const CardContent = React$42.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
608
+ const CardContent = React$43.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
588
609
  ref,
589
610
  className: cn("p-6 pt-0", className),
590
611
  ...props
591
612
  }));
592
613
  CardContent.displayName = "CardContent";
593
- const CardFooter = React$42.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
614
+ const CardFooter = React$43.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx("div", {
594
615
  ref,
595
616
  className: cn("flex items-center p-6 pt-0", className),
596
617
  ...props
@@ -601,7 +622,7 @@ CardFooter.displayName = "CardFooter";
601
622
  //#region src/card-hover/card-hover.tsx
602
623
  const HoverCard = HoverCardPrimitive.Root;
603
624
  const HoverCardTrigger = HoverCardPrimitive.Trigger;
604
- const HoverCardContent = React$41.forwardRef(({ className, align = "center", sideOffset = 4,...props }, ref) => /* @__PURE__ */ jsx(HoverCardPrimitive.Content, {
625
+ const HoverCardContent = React$42.forwardRef(({ className, align = "center", sideOffset = 4,...props }, ref) => /* @__PURE__ */ jsx(HoverCardPrimitive.Content, {
605
626
  ref,
606
627
  align,
607
628
  sideOffset,
@@ -612,31 +633,31 @@ HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
612
633
 
613
634
  //#endregion
614
635
  //#region src/carousel/carousel.tsx
615
- const CarouselContext = React$40.createContext(null);
636
+ const CarouselContext = React$41.createContext(null);
616
637
  function useCarousel() {
617
- const context = React$40.useContext(CarouselContext);
638
+ const context = React$41.useContext(CarouselContext);
618
639
  if (!context) throw new Error("useCarousel must be used within a <Carousel />");
619
640
  return context;
620
641
  }
621
- const Carousel = React$40.forwardRef(({ orientation = "horizontal", opts, setApi, plugins, className, children,...props }, ref) => {
642
+ const Carousel = React$41.forwardRef(({ orientation = "horizontal", opts, setApi, plugins, className, children,...props }, ref) => {
622
643
  const [carouselRef, api] = useEmblaCarousel({
623
644
  ...opts,
624
645
  axis: orientation === "horizontal" ? "x" : "y"
625
646
  }, plugins);
626
- const [canScrollPrev, setCanScrollPrev] = React$40.useState(false);
627
- const [canScrollNext, setCanScrollNext] = React$40.useState(false);
628
- const onSelect = React$40.useCallback(() => {
647
+ const [canScrollPrev, setCanScrollPrev] = React$41.useState(false);
648
+ const [canScrollNext, setCanScrollNext] = React$41.useState(false);
649
+ const onSelect = React$41.useCallback(() => {
629
650
  if (!api) return;
630
651
  setCanScrollPrev(api.canScrollPrev());
631
652
  setCanScrollNext(api.canScrollNext());
632
653
  }, [api]);
633
- const scrollPrev = React$40.useCallback(() => {
654
+ const scrollPrev = React$41.useCallback(() => {
634
655
  api?.scrollPrev();
635
656
  }, [api]);
636
- const scrollNext = React$40.useCallback(() => {
657
+ const scrollNext = React$41.useCallback(() => {
637
658
  api?.scrollNext();
638
659
  }, [api]);
639
- const handleKeyDown = React$40.useCallback((event) => {
660
+ const handleKeyDown = React$41.useCallback((event) => {
640
661
  if (event.key === "ArrowLeft") {
641
662
  event.preventDefault();
642
663
  scrollPrev();
@@ -645,11 +666,11 @@ const Carousel = React$40.forwardRef(({ orientation = "horizontal", opts, setApi
645
666
  scrollNext();
646
667
  }
647
668
  }, [scrollPrev, scrollNext]);
648
- React$40.useEffect(() => {
669
+ React$41.useEffect(() => {
649
670
  if (!api || !setApi) return;
650
671
  setApi(api);
651
672
  }, [api, setApi]);
652
- React$40.useEffect(() => {
673
+ React$41.useEffect(() => {
653
674
  if (!api) return;
654
675
  onSelect();
655
676
  api.on("reInit", onSelect);
@@ -690,7 +711,7 @@ const Carousel = React$40.forwardRef(({ orientation = "horizontal", opts, setApi
690
711
  });
691
712
  });
692
713
  Carousel.displayName = "Carousel";
693
- const CarouselContent = React$40.forwardRef(({ className,...props }, ref) => {
714
+ const CarouselContent = React$41.forwardRef(({ className,...props }, ref) => {
694
715
  const { carouselRef, orientation } = useCarousel();
695
716
  return /* @__PURE__ */ jsx("div", {
696
717
  ref: carouselRef,
@@ -703,7 +724,7 @@ const CarouselContent = React$40.forwardRef(({ className,...props }, ref) => {
703
724
  });
704
725
  });
705
726
  CarouselContent.displayName = "CarouselContent";
706
- const CarouselItem = React$40.forwardRef(({ className,...props }, ref) => {
727
+ const CarouselItem = React$41.forwardRef(({ className,...props }, ref) => {
707
728
  const { orientation } = useCarousel();
708
729
  return /* @__PURE__ */ jsx("div", {
709
730
  ref,
@@ -713,7 +734,7 @@ const CarouselItem = React$40.forwardRef(({ className,...props }, ref) => {
713
734
  });
714
735
  });
715
736
  CarouselItem.displayName = "CarouselItem";
716
- const CarouselPrevious = React$40.forwardRef(({ className, variant = "outline", size = "icon",...props }, ref) => {
737
+ const CarouselPrevious = React$41.forwardRef(({ className, variant = "outline", size = "icon",...props }, ref) => {
717
738
  const { orientation, scrollPrev, canScrollPrev } = useCarousel();
718
739
  return /* @__PURE__ */ jsxs(Button, {
719
740
  ref,
@@ -730,7 +751,7 @@ const CarouselPrevious = React$40.forwardRef(({ className, variant = "outline",
730
751
  });
731
752
  });
732
753
  CarouselPrevious.displayName = "CarouselPrevious";
733
- const CarouselNext = React$40.forwardRef(({ className, variant = "outline", size = "icon",...props }, ref) => {
754
+ const CarouselNext = React$41.forwardRef(({ className, variant = "outline", size = "icon",...props }, ref) => {
734
755
  const { orientation, scrollNext, canScrollNext } = useCarousel();
735
756
  return /* @__PURE__ */ jsxs(Button, {
736
757
  ref,
@@ -765,7 +786,8 @@ const checkboxVariants = cva("cursor-pointer peer appearance-none rounded-sm bor
765
786
  checkIcon: {
766
787
  default: "cross",
767
788
  check: "check",
768
- square: "square"
789
+ square: "square",
790
+ minus: "minus"
769
791
  },
770
792
  iconStyle: {
771
793
  default: "text-foreground",
@@ -788,6 +810,7 @@ function Checkbox({ label, className, variant, checkIcon, checkboxSize, iconStyl
788
810
  fill: "var(--muted-foreground)",
789
811
  className: "size-1/3"
790
812
  });
813
+ else if (checkIcon === "minus") icon = /* @__PURE__ */ jsx(MinusIcon, {});
791
814
  return /* @__PURE__ */ jsxs("div", {
792
815
  className: cn("relative flex gap-2 items-center", className),
793
816
  "data-test-id": __e2e_test_id__,
@@ -863,6 +886,7 @@ function DialogContent({ className, children, showCloseButton = true, __e2e_test
863
886
  children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
864
887
  "data-slot": "dialog-content",
865
888
  className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className),
889
+ "data-test-id": __e2e_test_id__,
866
890
  ...props,
867
891
  children: [children, showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
868
892
  title: "Close",
@@ -873,7 +897,7 @@ function DialogContent({ className, children, showCloseButton = true, __e2e_test
873
897
  variant: "outline",
874
898
  size: "icon",
875
899
  className: "size-6 rounded",
876
- __e2e_test_id__: __e2e_test_id__ ? `${__e2e_test_id__}-close` : void 0,
900
+ __e2e_test_id__: testId(__e2e_test_id__, "close"),
877
901
  children: /* @__PURE__ */ jsx(Cross2Icon, {})
878
902
  }), /* @__PURE__ */ jsx("span", {
879
903
  className: "sr-only",
@@ -914,7 +938,7 @@ function DialogDescription({ className,...props }) {
914
938
 
915
939
  //#endregion
916
940
  //#region src/command-palette/command-palette.tsx
917
- const CommandPalette = React$39.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(Command$1, {
941
+ const CommandPalette = React$40.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(Command$1, {
918
942
  ref,
919
943
  className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className),
920
944
  ...props
@@ -932,7 +956,7 @@ const CommandPaletteDialog = ({ children,...props }) => {
932
956
  })
933
957
  });
934
958
  };
935
- const CommandPaletteInput = React$39.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsxs("div", {
959
+ const CommandPaletteInput = React$40.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsxs("div", {
936
960
  className: "flex items-center border-b px-3",
937
961
  "data-cmdk-input-wrapper": "",
938
962
  children: [/* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ jsx(Command$1.Input, {
@@ -942,31 +966,31 @@ const CommandPaletteInput = React$39.forwardRef(({ className,...props }, ref) =>
942
966
  })]
943
967
  }));
944
968
  CommandPaletteInput.displayName = Command$1.Input.displayName;
945
- const CommandPaletteList = React$39.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(Command$1.List, {
969
+ const CommandPaletteList = React$40.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(Command$1.List, {
946
970
  ref,
947
971
  className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
948
972
  ...props
949
973
  }));
950
974
  CommandPaletteList.displayName = Command$1.List.displayName;
951
- const CommandPaletteEmpty = React$39.forwardRef((props, ref) => /* @__PURE__ */ jsx(Command$1.Empty, {
975
+ const CommandPaletteEmpty = React$40.forwardRef((props, ref) => /* @__PURE__ */ jsx(Command$1.Empty, {
952
976
  ref,
953
977
  className: "py-6 text-center text-sm",
954
978
  ...props
955
979
  }));
956
980
  CommandPaletteEmpty.displayName = Command$1.Empty.displayName;
957
- const CommandPaletteGroup = React$39.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(Command$1.Group, {
981
+ const CommandPaletteGroup = React$40.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(Command$1.Group, {
958
982
  ref,
959
983
  className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className),
960
984
  ...props
961
985
  }));
962
986
  CommandPaletteGroup.displayName = Command$1.Group.displayName;
963
- const CommandPaletteSeparator = React$39.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(Command$1.Separator, {
987
+ const CommandPaletteSeparator = React$40.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(Command$1.Separator, {
964
988
  ref,
965
989
  className: cn("-mx-1 h-px bg-border", className),
966
990
  ...props
967
991
  }));
968
992
  CommandPaletteSeparator.displayName = Command$1.Separator.displayName;
969
- const CommandPaletteItem = React$39.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(Command$1.Item, {
993
+ const CommandPaletteItem = React$40.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(Command$1.Item, {
970
994
  ref,
971
995
  className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50", className),
972
996
  ...props
@@ -1042,8 +1066,8 @@ const frameworks = [
1042
1066
  }
1043
1067
  ];
1044
1068
  function ComboboxDemo() {
1045
- const [open, setOpen] = React$38.useState(false);
1046
- const [value, setValue] = React$38.useState("");
1069
+ const [open, setOpen] = React$39.useState(false);
1070
+ const [value, setValue] = React$39.useState("");
1047
1071
  return /* @__PURE__ */ jsxs(Popover, {
1048
1072
  open,
1049
1073
  onOpenChange: setOpen,
@@ -1247,7 +1271,7 @@ const ContentFrame = ({ title = "", controls = [], indicators = [], children, on
1247
1271
  /* @__PURE__ */ jsxs("div", {
1248
1272
  className: "flex flex-grow gap-2 overflow-hidden",
1249
1273
  children: [/* @__PURE__ */ jsx("h2", {
1250
- className: "text-xl overflow-hidden text-ellipsis whitespace-nowrap",
1274
+ className: "text-xl overflow-hidden text-ellipsis whitespace-nowrap w-full",
1251
1275
  children: titleLink ?? title
1252
1276
  }), indicators.length > 0 && /* @__PURE__ */ jsx("div", {
1253
1277
  className: "flex gap-2 whitespace-nowrap",
@@ -1283,32 +1307,32 @@ const ContextMenuGroup = ContextMenuPrimitive.Group;
1283
1307
  const ContextMenuPortal = ContextMenuPrimitive.Portal;
1284
1308
  const ContextMenuSub = ContextMenuPrimitive.Sub;
1285
1309
  const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
1286
- const ContextMenuSubTrigger = React$37.forwardRef(({ className, inset, children,...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.SubTrigger, {
1310
+ const ContextMenuSubTrigger = React$38.forwardRef(({ className, inset, children,...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.SubTrigger, {
1287
1311
  ref,
1288
1312
  className: cn("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", inset && "pl-8", className),
1289
1313
  ...props,
1290
1314
  children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })]
1291
1315
  }));
1292
1316
  ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
1293
- const ContextMenuSubContent = React$37.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.SubContent, {
1317
+ const ContextMenuSubContent = React$38.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.SubContent, {
1294
1318
  ref,
1295
1319
  className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className),
1296
1320
  ...props
1297
1321
  }));
1298
1322
  ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
1299
- const ContextMenuContent = React$37.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(ContextMenuPrimitive.Content, {
1323
+ const ContextMenuContent = React$38.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(ContextMenuPrimitive.Content, {
1300
1324
  ref,
1301
1325
  className: cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className),
1302
1326
  ...props
1303
1327
  }) }));
1304
1328
  ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
1305
- const ContextMenuItem = React$37.forwardRef(({ className, inset,...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Item, {
1329
+ const ContextMenuItem = React$38.forwardRef(({ className, inset,...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Item, {
1306
1330
  ref,
1307
1331
  className: cn("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", inset && "pl-8", className),
1308
1332
  ...props
1309
1333
  }));
1310
1334
  ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
1311
- const ContextMenuCheckboxItem = React$37.forwardRef(({ className, children, checked,...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.CheckboxItem, {
1335
+ const ContextMenuCheckboxItem = React$38.forwardRef(({ className, children, checked,...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.CheckboxItem, {
1312
1336
  ref,
1313
1337
  className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
1314
1338
  checked,
@@ -1319,7 +1343,7 @@ const ContextMenuCheckboxItem = React$37.forwardRef(({ className, children, chec
1319
1343
  }), children]
1320
1344
  }));
1321
1345
  ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
1322
- const ContextMenuRadioItem = React$37.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.RadioItem, {
1346
+ const ContextMenuRadioItem = React$38.forwardRef(({ className, children,...props }, ref) => /* @__PURE__ */ jsxs(ContextMenuPrimitive.RadioItem, {
1323
1347
  ref,
1324
1348
  className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
1325
1349
  ...props,
@@ -1329,13 +1353,13 @@ const ContextMenuRadioItem = React$37.forwardRef(({ className, children,...props
1329
1353
  }), children]
1330
1354
  }));
1331
1355
  ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
1332
- const ContextMenuLabel = React$37.forwardRef(({ className, inset,...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Label, {
1356
+ const ContextMenuLabel = React$38.forwardRef(({ className, inset,...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Label, {
1333
1357
  ref,
1334
1358
  className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className),
1335
1359
  ...props
1336
1360
  }));
1337
1361
  ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
1338
- const ContextMenuSeparator = React$37.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Separator, {
1362
+ const ContextMenuSeparator = React$38.forwardRef(({ className,...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Separator, {
1339
1363
  ref,
1340
1364
  className: cn("-mx-1 my-1 h-px bg-border", className),
1341
1365
  ...props
@@ -1480,7 +1504,7 @@ function DropdownMenuSubContent({ className,...props }) {
1480
1504
  const TooltipProvider = TooltipPrimitive.Provider;
1481
1505
  const Tooltip = TooltipPrimitive.Root;
1482
1506
  const TooltipTrigger = TooltipPrimitive.Trigger;
1483
- const TooltipContent = React$36.forwardRef(({ className, sideOffset = 4,...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Content, {
1507
+ const TooltipContent = React$37.forwardRef(({ className, sideOffset = 4,...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Content, {
1484
1508
  ref,
1485
1509
  sideOffset,
1486
1510
  className: cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", className),
@@ -1975,6 +1999,10 @@ function getColumnVariant(variant) {
1975
1999
  icon: ListChecksIcon,
1976
2000
  label: "Multi-select"
1977
2001
  };
2002
+ case "hierarchy": return {
2003
+ icon: ListTreeIcon,
2004
+ label: "Hierarchy"
2005
+ };
1978
2006
  case "checkbox": return {
1979
2007
  icon: CheckSquareIcon,
1980
2008
  label: "Checkbox"
@@ -1987,7 +2015,7 @@ function getColumnVariant(variant) {
1987
2015
  }
1988
2016
  }
1989
2017
  function DataGridColumnHeader({ header, table, className, onPointerDown,...props }) {
1990
- const [open, setOpen] = React$35.useState(false);
2018
+ const [open, setOpen] = React$36.useState(false);
1991
2019
  const column = header.column;
1992
2020
  const label = column.columnDef.meta?.label ? column.columnDef.meta.label : typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
1993
2021
  const isAnyColumnResizing = table.getState().columnSizingInfo.isResizingColumn;
@@ -1996,7 +2024,7 @@ function DataGridColumnHeader({ header, table, className, onPointerDown,...props
1996
2024
  const pinnedPosition = column.getIsPinned();
1997
2025
  const isPinnedLeft = pinnedPosition === "left";
1998
2026
  const isPinnedRight = pinnedPosition === "right";
1999
- const onSortingChange = React$35.useCallback((direction) => {
2027
+ const onSortingChange = React$36.useCallback((direction) => {
2000
2028
  table.setSorting((prev) => {
2001
2029
  const existingSortIndex = prev.findIndex((sort) => sort.id === column.id);
2002
2030
  const newSort = {
@@ -2010,19 +2038,19 @@ function DataGridColumnHeader({ header, table, className, onPointerDown,...props
2010
2038
  } else return [...prev, newSort];
2011
2039
  });
2012
2040
  }, [column.id, table]);
2013
- const onSortRemove = React$35.useCallback(() => {
2041
+ const onSortRemove = React$36.useCallback(() => {
2014
2042
  table.setSorting((prev) => prev.filter((sort) => sort.id !== column.id));
2015
2043
  }, [column.id, table]);
2016
- const onLeftPin = React$35.useCallback(() => {
2044
+ const onLeftPin = React$36.useCallback(() => {
2017
2045
  column.pin("left");
2018
2046
  }, [column]);
2019
- const onRightPin = React$35.useCallback(() => {
2047
+ const onRightPin = React$36.useCallback(() => {
2020
2048
  column.pin("right");
2021
2049
  }, [column]);
2022
- const onUnpin = React$35.useCallback(() => {
2050
+ const onUnpin = React$36.useCallback(() => {
2023
2051
  column.pin(false);
2024
2052
  }, [column]);
2025
- const onTriggerPointerDown = React$35.useCallback((event) => {
2053
+ const onTriggerPointerDown = React$36.useCallback((event) => {
2026
2054
  onPointerDown?.(event);
2027
2055
  if (event.defaultPrevented) return;
2028
2056
  if (event.button !== 0) return;
@@ -2134,7 +2162,7 @@ function DataGridColumnHeader({ header, table, className, onPointerDown,...props
2134
2162
  })
2135
2163
  ] });
2136
2164
  }
2137
- const DataGridColumnResizer = React$35.memo(DataGridColumnResizerImpl, (prev, next) => {
2165
+ const DataGridColumnResizer = React$36.memo(DataGridColumnResizerImpl, (prev, next) => {
2138
2166
  const prevColumn = prev.header.column;
2139
2167
  const nextColumn = next.header.column;
2140
2168
  if (prevColumn.getIsResizing() !== nextColumn.getIsResizing() || prevColumn.getSize() !== nextColumn.getSize()) return false;
@@ -2143,7 +2171,7 @@ const DataGridColumnResizer = React$35.memo(DataGridColumnResizerImpl, (prev, ne
2143
2171
  });
2144
2172
  function DataGridColumnResizerImpl({ header, table, label }) {
2145
2173
  const defaultColumnDef = table._getDefaultColumnDef();
2146
- const onDoubleClick = React$35.useCallback(() => {
2174
+ const onDoubleClick = React$36.useCallback(() => {
2147
2175
  header.column.resetSize();
2148
2176
  }, [header.column]);
2149
2177
  return /* @__PURE__ */ jsx("div", {
@@ -2252,7 +2280,7 @@ function DataGridContextMenu({ table }) {
2252
2280
  onRowsDelete
2253
2281
  });
2254
2282
  }
2255
- const ContextMenu$1 = React$34.memo(ContextMenuImpl, (prev, next) => {
2283
+ const ContextMenu$1 = React$35.memo(ContextMenuImpl, (prev, next) => {
2256
2284
  if (prev.contextMenu.open !== next.contextMenu.open) return false;
2257
2285
  if (!next.contextMenu.open) return true;
2258
2286
  if (prev.contextMenu.x !== next.contextMenu.x) return false;
@@ -2263,7 +2291,7 @@ const ContextMenu$1 = React$34.memo(ContextMenuImpl, (prev, next) => {
2263
2291
  return true;
2264
2292
  });
2265
2293
  function ContextMenuImpl({ table, dataGridRef, contextMenu, onContextMenuOpenChange, selectionState, onDataUpdate, onRowsDelete }) {
2266
- const triggerStyle = React$34.useMemo(() => ({
2294
+ const triggerStyle = React$35.useMemo(() => ({
2267
2295
  position: "fixed",
2268
2296
  left: `${contextMenu.x}px`,
2269
2297
  top: `${contextMenu.y}px`,
@@ -2276,11 +2304,11 @@ function ContextMenuImpl({ table, dataGridRef, contextMenu, onContextMenuOpenCha
2276
2304
  pointerEvents: "none",
2277
2305
  opacity: 0
2278
2306
  }), [contextMenu.x, contextMenu.y]);
2279
- const onCloseAutoFocus = React$34.useCallback((event) => {
2307
+ const onCloseAutoFocus = React$35.useCallback((event) => {
2280
2308
  event.preventDefault();
2281
2309
  dataGridRef?.current?.focus();
2282
2310
  }, [dataGridRef]);
2283
- const onCopy = React$34.useCallback(async () => {
2311
+ const onCopy = React$35.useCallback(async () => {
2284
2312
  if (!selectionState?.selectedCells || selectionState.selectedCells.size === 0) return;
2285
2313
  const rows = table.getRowModel().rows;
2286
2314
  const columnIds = [];
@@ -2319,7 +2347,7 @@ function ContextMenuImpl({ table, dataGridRef, contextMenu, onContextMenuOpenCha
2319
2347
  await navigator.clipboard.writeText(tsvData);
2320
2348
  toast$1.success(`${selectionState.selectedCells.size} cell${selectionState.selectedCells.size !== 1 ? "s" : ""} copied`);
2321
2349
  }, [table, selectionState]);
2322
- const canClear = React$34.useMemo(() => {
2350
+ const canClear = React$35.useMemo(() => {
2323
2351
  if (!selectionState?.selectedCells || selectionState.selectedCells.size === 0) return false;
2324
2352
  const visibleCols = table.getVisibleLeafColumns();
2325
2353
  const rows = table.getRowModel().rows;
@@ -2336,7 +2364,7 @@ function ContextMenuImpl({ table, dataGridRef, contextMenu, onContextMenuOpenCha
2336
2364
  }
2337
2365
  return true;
2338
2366
  }, [selectionState, table]);
2339
- const onClear = React$34.useCallback(() => {
2367
+ const onClear = React$35.useCallback(() => {
2340
2368
  if (!selectionState?.selectedCells || selectionState.selectedCells.size === 0) return;
2341
2369
  if (!canClear) return;
2342
2370
  const updates = [];
@@ -2355,7 +2383,7 @@ function ContextMenuImpl({ table, dataGridRef, contextMenu, onContextMenuOpenCha
2355
2383
  selectionState,
2356
2384
  canClear
2357
2385
  ]);
2358
- const onDelete = React$34.useCallback(async () => {
2386
+ const onDelete = React$35.useCallback(async () => {
2359
2387
  if (!selectionState?.selectedCells || selectionState.selectedCells.size === 0) return;
2360
2388
  const rowIndices = new Set();
2361
2389
  for (const cellKey of selectionState.selectedCells) {
@@ -2432,12 +2460,12 @@ function composeRefs(...refs) {
2432
2460
  * Accepts callback refs and RefObject(s)
2433
2461
  */
2434
2462
  function useComposedRefs(...refs) {
2435
- return React$33.useCallback(composeRefs(...refs), refs);
2463
+ return React$34.useCallback(composeRefs(...refs), refs);
2436
2464
  }
2437
2465
 
2438
2466
  //#endregion
2439
2467
  //#region src/data-grid/data-grid-row.tsx
2440
- const DataGridRow = React$32.memo(DataGridRowImpl, (prev, next) => {
2468
+ const DataGridRow = React$33.memo(DataGridRowImpl, (prev, next) => {
2441
2469
  if (prev.row.id !== next.row.id) return false;
2442
2470
  if (prev.row.original !== next.row.original) return false;
2443
2471
  const prevRowIndex = prev.virtualRowIndex;
@@ -2457,9 +2485,10 @@ const DataGridRow = React$32.memo(DataGridRowImpl, (prev, next) => {
2457
2485
  if (prev.selectionSize !== next.selectionSize) return false;
2458
2486
  if (prev.visibleColumnIds !== next.visibleColumnIds) return false;
2459
2487
  if (prev.isHighlighted !== next.isHighlighted) return false;
2488
+ if (prev.columnDefsVersion !== next.columnDefsVersion) return false;
2460
2489
  return true;
2461
2490
  });
2462
- function DataGridRowImpl({ row, virtualRowIndex, virtualStart, rowVirtualizer, rowMapRef, rowHeight, focusedCell, editingCell: _editingCell, selectionSize: _selectionSize, visibleColumnIds: _visibleColumnIds, isHighlighted = false, onRowClick, ref, className,...props }) {
2491
+ function DataGridRowImpl({ row, virtualRowIndex, virtualStart, rowVirtualizer, rowMapRef, rowHeight, focusedCell, editingCell: _editingCell, selectionSize: _selectionSize, visibleColumnIds: _visibleColumnIds, columnDefsVersion: _columnDefsVersion, isHighlighted = false, onRowClick, ref, className,...props }) {
2463
2492
  const rowRef = useComposedRefs(ref, (node) => {
2464
2493
  if (node && typeof virtualRowIndex !== "undefined") {
2465
2494
  rowVirtualizer.measureElement(node);
@@ -2467,7 +2496,7 @@ function DataGridRowImpl({ row, virtualRowIndex, virtualStart, rowVirtualizer, r
2467
2496
  }
2468
2497
  });
2469
2498
  const isRowSelected = row.getIsSelected();
2470
- const handleRowClick = React$32.useCallback((event) => {
2499
+ const handleRowClick = React$33.useCallback((event) => {
2471
2500
  const target = event.target;
2472
2501
  if (target.closest("input, button, [role=\"checkbox\"]")) return;
2473
2502
  if (event.detail === 1) onRowClick?.(virtualRowIndex);
@@ -2517,20 +2546,20 @@ function DataGridRowImpl({ row, virtualRowIndex, virtualStart, rowVirtualizer, r
2517
2546
  * prop or avoid re-executing effects when passed as a dependency
2518
2547
  */
2519
2548
  function useCallbackRef(callback) {
2520
- const callbackRef = React$31.useRef(callback);
2521
- React$31.useEffect(() => {
2549
+ const callbackRef = React$32.useRef(callback);
2550
+ React$32.useEffect(() => {
2522
2551
  callbackRef.current = callback;
2523
2552
  });
2524
- return React$31.useMemo(() => (...args) => callbackRef.current?.(...args), []);
2553
+ return React$32.useMemo(() => (...args) => callbackRef.current?.(...args), []);
2525
2554
  }
2526
2555
 
2527
2556
  //#endregion
2528
2557
  //#region src/hooks/use-debounced-callback.ts
2529
2558
  function useDebouncedCallback(callback, delay) {
2530
2559
  const handleCallback = useCallbackRef(callback);
2531
- const debounceTimerRef = React$30.useRef(0);
2532
- React$30.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);
2533
- const setValue = React$30.useCallback((...args) => {
2560
+ const debounceTimerRef = React$31.useRef(0);
2561
+ React$31.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);
2562
+ const setValue = React$31.useCallback((...args) => {
2534
2563
  window.clearTimeout(debounceTimerRef.current);
2535
2564
  debounceTimerRef.current = window.setTimeout(() => handleCallback(...args), delay);
2536
2565
  }, [handleCallback, delay]);
@@ -2546,11 +2575,12 @@ function useDebouncedCallback(callback, delay) {
2546
2575
  const inputVariants = cva("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
2547
2576
  variants: { variant: {
2548
2577
  default: "min-h-9 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
2549
- simple: "min-h-8"
2578
+ simple: "min-h-8",
2579
+ discreet: "py-0 min-h-7 border-transparent shadow-none hover:border-input hover:shadow-sm focus:border-input focus:shadow-sm bg-transparent hover:bg-accent/30"
2550
2580
  } },
2551
2581
  defaultVariants: { variant: "default" }
2552
2582
  });
2553
- const Input = React$29.forwardRef(({ className, type, variant, __e2e_test_id__, onEnter, wrapperClassName,...props }, ref) => {
2583
+ const Input = React$30.forwardRef(({ className, type, variant, __e2e_test_id__, onEnter, wrapperClassName,...props }, ref) => {
2554
2584
  const input = /* @__PURE__ */ jsx("input", {
2555
2585
  type,
2556
2586
  "data-slot": "input",
@@ -2576,7 +2606,7 @@ Input.displayName = "Input";
2576
2606
 
2577
2607
  //#endregion
2578
2608
  //#region src/data-grid/data-grid-search.tsx
2579
- const DataGridSearch = React$28.memo(DataGridSearchImpl, (prev, next) => {
2609
+ const DataGridSearch = React$29.memo(DataGridSearchImpl, (prev, next) => {
2580
2610
  if (prev.searchOpen !== next.searchOpen) return false;
2581
2611
  if (!next.searchOpen) return true;
2582
2612
  if (prev.searchQuery !== next.searchQuery || prev.matchIndex !== next.matchIndex) return false;
@@ -2590,13 +2620,13 @@ const DataGridSearch = React$28.memo(DataGridSearchImpl, (prev, next) => {
2590
2620
  return true;
2591
2621
  });
2592
2622
  function DataGridSearchImpl({ searchMatches, matchIndex, searchOpen, onSearchOpenChange, searchQuery, onSearchQueryChange, onSearch, onNavigateToNextMatch, onNavigateToPrevMatch }) {
2593
- const inputRef = React$28.useRef(null);
2594
- React$28.useEffect(() => {
2623
+ const inputRef = React$29.useRef(null);
2624
+ React$29.useEffect(() => {
2595
2625
  if (searchOpen) requestAnimationFrame(() => {
2596
2626
  inputRef.current?.focus();
2597
2627
  });
2598
2628
  }, [searchOpen]);
2599
- React$28.useEffect(() => {
2629
+ React$29.useEffect(() => {
2600
2630
  if (!searchOpen) return;
2601
2631
  function onEscape(event) {
2602
2632
  if (event.key === "Escape") {
@@ -2607,7 +2637,7 @@ function DataGridSearchImpl({ searchMatches, matchIndex, searchOpen, onSearchOpe
2607
2637
  document.addEventListener("keydown", onEscape);
2608
2638
  return () => document.removeEventListener("keydown", onEscape);
2609
2639
  }, [searchOpen, onSearchOpenChange]);
2610
- const onKeyDown = React$28.useCallback((event) => {
2640
+ const onKeyDown = React$29.useCallback((event) => {
2611
2641
  event.stopPropagation();
2612
2642
  if (event.key === "Enter") {
2613
2643
  event.preventDefault();
@@ -2618,20 +2648,20 @@ function DataGridSearchImpl({ searchMatches, matchIndex, searchOpen, onSearchOpe
2618
2648
  const debouncedSearch = useDebouncedCallback((query) => {
2619
2649
  onSearch(query);
2620
2650
  }, 150);
2621
- const onChange = React$28.useCallback((event) => {
2651
+ const onChange = React$29.useCallback((event) => {
2622
2652
  const value = event.target.value;
2623
2653
  onSearchQueryChange(value);
2624
2654
  debouncedSearch(value);
2625
2655
  }, [onSearchQueryChange, debouncedSearch]);
2626
- const onTriggerPointerDown = React$28.useCallback((event) => {
2656
+ const onTriggerPointerDown = React$29.useCallback((event) => {
2627
2657
  const target = event.target;
2628
2658
  if (!(target instanceof HTMLElement)) return;
2629
2659
  if (target.hasPointerCapture(event.pointerId)) target.releasePointerCapture(event.pointerId);
2630
2660
  if (event.button === 0 && event.ctrlKey === false && event.pointerType === "mouse" && !(event.target instanceof HTMLInputElement)) event.preventDefault();
2631
2661
  }, []);
2632
- const onPrevMatchPointerDown = React$28.useCallback((event) => onTriggerPointerDown(event), [onTriggerPointerDown]);
2633
- const onNextMatchPointerDown = React$28.useCallback((event) => onTriggerPointerDown(event), [onTriggerPointerDown]);
2634
- const onClose = React$28.useCallback(() => {
2662
+ const onPrevMatchPointerDown = React$29.useCallback((event) => onTriggerPointerDown(event), [onTriggerPointerDown]);
2663
+ const onNextMatchPointerDown = React$29.useCallback((event) => onTriggerPointerDown(event), [onTriggerPointerDown]);
2664
+ const onClose = React$29.useCallback(() => {
2635
2665
  onSearchOpenChange(false);
2636
2666
  }, [onSearchOpenChange]);
2637
2667
  if (!searchOpen) return null;
@@ -2708,16 +2738,17 @@ function DataGrid({ dataGridRef, headerRef, rowMapRef, footerRef, table, rowVirt
2708
2738
  const selectionSize = meta?.selectionState?.selectedCells?.size ?? 0;
2709
2739
  const highlightedRowIndex = meta?.highlightedRowIndex ?? -1;
2710
2740
  const onRowClick = meta?.onRowClick;
2741
+ const columnDefsVersion = meta?.columnDefsVersion ?? 0;
2711
2742
  const visibleColumnIds = table.getVisibleLeafColumns().map((c) => c.id).join(",");
2712
- const prevVisibleColumnIdsRef = React$27.useRef(visibleColumnIds);
2743
+ const prevVisibleColumnIdsRef = React$28.useRef(visibleColumnIds);
2713
2744
  if (prevVisibleColumnIdsRef.current !== visibleColumnIds) {
2714
2745
  rowMapRef.current.clear();
2715
2746
  prevVisibleColumnIdsRef.current = visibleColumnIds;
2716
2747
  }
2717
- const onGridContextMenu = React$27.useCallback((event) => {
2748
+ const onGridContextMenu = React$28.useCallback((event) => {
2718
2749
  event.preventDefault();
2719
2750
  }, []);
2720
- const onAddRowKeyDown = React$27.useCallback(async (event) => {
2751
+ const onAddRowKeyDown = React$28.useCallback(async (event) => {
2721
2752
  if (!onRowAdd) return;
2722
2753
  if (event.key === "Enter" || event.key === "") {
2723
2754
  event.preventDefault();
@@ -2820,6 +2851,7 @@ function DataGrid({ dataGridRef, headerRef, rowMapRef, footerRef, table, rowVirt
2820
2851
  editingCell,
2821
2852
  selectionSize,
2822
2853
  visibleColumnIds,
2854
+ columnDefsVersion,
2823
2855
  isHighlighted: highlightedRowIndex === virtualItem.index,
2824
2856
  onRowClick
2825
2857
  }, row.id);
@@ -2869,20 +2901,20 @@ function DataGridCellWrapper({ cell, table, rowIndex, columnId, isEditing, isFoc
2869
2901
  const rowOriginal = cell?.row?.original ?? {};
2870
2902
  const colCellMeta = cell?.column?.columnDef?.meta;
2871
2903
  const align = colCellMeta?.align ?? "left";
2872
- const editableResolver = React$26.useMemo(() => {
2904
+ const editableResolver = React$27.useMemo(() => {
2873
2905
  const v = colCellMeta?.editable;
2874
2906
  if (v === void 0) return () => true;
2875
2907
  return typeof v === "function" ? v : () => Boolean(v);
2876
2908
  }, [colCellMeta?.editable]);
2877
2909
  const isEditable = editableResolver(rowOriginal);
2878
- const classNameResolver = React$26.useMemo(() => {
2910
+ const classNameResolver = React$27.useMemo(() => {
2879
2911
  const v = colCellMeta?.className;
2880
2912
  return typeof v === "function" ? v : () => v;
2881
2913
  }, [colCellMeta?.className]);
2882
2914
  const colCellClassName = classNameResolver(rowOriginal);
2883
2915
  const isSearchMatch = meta?.getIsSearchMatch?.(rowIndex, columnId) ?? false;
2884
2916
  const isActiveSearchMatch = meta?.getIsActiveSearchMatch?.(rowIndex, columnId) ?? false;
2885
- const onClick = React$26.useCallback((event) => {
2917
+ const onClick = React$27.useCallback((event) => {
2886
2918
  if (!isEditing) {
2887
2919
  event.preventDefault();
2888
2920
  onClickProp?.(event);
@@ -2895,7 +2927,7 @@ function DataGridCellWrapper({ cell, table, rowIndex, columnId, isEditing, isFoc
2895
2927
  isEditing,
2896
2928
  onClickProp
2897
2929
  ]);
2898
- const onContextMenu = React$26.useCallback((event) => {
2930
+ const onContextMenu = React$27.useCallback((event) => {
2899
2931
  if (!isEditing) meta?.onCellContextMenu?.(rowIndex, columnId, event);
2900
2932
  }, [
2901
2933
  meta,
@@ -2903,7 +2935,7 @@ function DataGridCellWrapper({ cell, table, rowIndex, columnId, isEditing, isFoc
2903
2935
  columnId,
2904
2936
  isEditing
2905
2937
  ]);
2906
- const onMouseDown = React$26.useCallback((event) => {
2938
+ const onMouseDown = React$27.useCallback((event) => {
2907
2939
  if (!isEditing) meta?.onCellMouseDown?.(rowIndex, columnId, event);
2908
2940
  }, [
2909
2941
  meta,
@@ -2911,7 +2943,7 @@ function DataGridCellWrapper({ cell, table, rowIndex, columnId, isEditing, isFoc
2911
2943
  columnId,
2912
2944
  isEditing
2913
2945
  ]);
2914
- const onMouseEnter = React$26.useCallback((event) => {
2946
+ const onMouseEnter = React$27.useCallback((event) => {
2915
2947
  if (!isEditing) meta?.onCellMouseEnter?.(rowIndex, columnId, event);
2916
2948
  }, [
2917
2949
  meta,
@@ -2919,10 +2951,10 @@ function DataGridCellWrapper({ cell, table, rowIndex, columnId, isEditing, isFoc
2919
2951
  columnId,
2920
2952
  isEditing
2921
2953
  ]);
2922
- const onMouseUp = React$26.useCallback(() => {
2954
+ const onMouseUp = React$27.useCallback(() => {
2923
2955
  if (!isEditing) meta?.onCellMouseUp?.();
2924
2956
  }, [meta, isEditing]);
2925
- const onDoubleClick = React$26.useCallback((event) => {
2957
+ const onDoubleClick = React$27.useCallback((event) => {
2926
2958
  if (!isEditing) {
2927
2959
  event.preventDefault();
2928
2960
  if (isEditable) meta?.onCellDoubleClick?.(rowIndex, columnId);
@@ -2934,7 +2966,7 @@ function DataGridCellWrapper({ cell, table, rowIndex, columnId, isEditing, isFoc
2934
2966
  isEditing,
2935
2967
  isEditable
2936
2968
  ]);
2937
- const onKeyDown = React$26.useCallback((event) => {
2969
+ const onKeyDown = React$27.useCallback((event) => {
2938
2970
  onKeyDownProp?.(event);
2939
2971
  if (event.defaultPrevented) return;
2940
2972
  if (event.key === "ArrowUp" || event.key === "ArrowDown" || event.key === "ArrowLeft" || event.key === "ArrowRight" || event.key === "Home" || event.key === "End" || event.key === "PageUp" || event.key === "PageDown" || event.key === "Enter" || event.key === "Tab") return;
@@ -3008,17 +3040,17 @@ function DataGridCellWrapper({ cell, table, rowIndex, columnId, isEditing, isFoc
3008
3040
  //#region src/data-grid/cell-variants/checkbox-cell.tsx
3009
3041
  function CheckboxCell({ cell, table, rowIndex, columnId, isFocused, isSelected }) {
3010
3042
  const initialValue = cell.getValue();
3011
- const [value, setValue] = React$25.useState(Boolean(initialValue));
3012
- const containerRef = React$25.useRef(null);
3043
+ const [value, setValue] = React$26.useState(Boolean(initialValue));
3044
+ const containerRef = React$26.useRef(null);
3013
3045
  const meta = table.options.meta;
3014
3046
  const colMeta = cell.column.columnDef.meta;
3015
- const editableResolver = React$25.useMemo(() => {
3047
+ const editableResolver = React$26.useMemo(() => {
3016
3048
  const v = colMeta?.editable;
3017
3049
  if (v === void 0) return () => true;
3018
3050
  return typeof v === "function" ? v : () => Boolean(v);
3019
3051
  }, [colMeta?.editable]);
3020
3052
  const isEditable = editableResolver(cell.row.original);
3021
- const onCheckedChange = React$25.useCallback((checked) => {
3053
+ const onCheckedChange = React$26.useCallback((checked) => {
3022
3054
  setValue(checked);
3023
3055
  meta?.onDataUpdate?.({
3024
3056
  rowIndex,
@@ -3030,7 +3062,7 @@ function CheckboxCell({ cell, table, rowIndex, columnId, isFocused, isSelected }
3030
3062
  rowIndex,
3031
3063
  columnId
3032
3064
  ]);
3033
- const onWrapperKeyDown = React$25.useCallback((event) => {
3065
+ const onWrapperKeyDown = React$26.useCallback((event) => {
3034
3066
  if (!isEditable) return;
3035
3067
  if (isFocused && (event.key === "" || event.key === "Enter")) {
3036
3068
  event.preventDefault();
@@ -3043,17 +3075,17 @@ function CheckboxCell({ cell, table, rowIndex, columnId, isFocused, isSelected }
3043
3075
  onCheckedChange,
3044
3076
  isEditable
3045
3077
  ]);
3046
- React$25.useEffect(() => {
3078
+ React$26.useEffect(() => {
3047
3079
  setValue(Boolean(initialValue));
3048
3080
  }, [initialValue]);
3049
- React$25.useEffect(() => {
3081
+ React$26.useEffect(() => {
3050
3082
  if (isFocused && !meta?.searchOpen && !meta?.isScrolling && containerRef.current) containerRef.current.focus();
3051
3083
  }, [
3052
3084
  isFocused,
3053
3085
  meta?.searchOpen,
3054
3086
  meta?.isScrolling
3055
3087
  ]);
3056
- const onWrapperClick = React$25.useCallback((event) => {
3088
+ const onWrapperClick = React$26.useCallback((event) => {
3057
3089
  if (!isEditable) return;
3058
3090
  if (isFocused) {
3059
3091
  event.preventDefault();
@@ -3066,13 +3098,13 @@ function CheckboxCell({ cell, table, rowIndex, columnId, isFocused, isSelected }
3066
3098
  onCheckedChange,
3067
3099
  isEditable
3068
3100
  ]);
3069
- const onCheckboxClick = React$25.useCallback((event) => {
3101
+ const onCheckboxClick = React$26.useCallback((event) => {
3070
3102
  event.stopPropagation();
3071
3103
  }, []);
3072
- const onCheckboxMouseDown = React$25.useCallback((event) => {
3104
+ const onCheckboxMouseDown = React$26.useCallback((event) => {
3073
3105
  event.stopPropagation();
3074
3106
  }, []);
3075
- const onCheckboxDoubleClick = React$25.useCallback((event) => {
3107
+ const onCheckboxDoubleClick = React$26.useCallback((event) => {
3076
3108
  event.stopPropagation();
3077
3109
  }, []);
3078
3110
  return /* @__PURE__ */ jsx(DataGridCellWrapper, {
@@ -3127,20 +3159,20 @@ function formatDateToISOString(date) {
3127
3159
  }
3128
3160
  function DateCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isSelected }) {
3129
3161
  const initialValue = cell.getValue();
3130
- const [value, setValue] = React$24.useState(parseToLocalDate(initialValue));
3131
- const [open, setOpen] = React$24.useState(false);
3132
- const containerRef = React$24.useRef(null);
3133
- const hasStoppedRef = React$24.useRef(false);
3162
+ const [value, setValue] = React$25.useState(parseToLocalDate(initialValue));
3163
+ const [open, setOpen] = React$25.useState(false);
3164
+ const containerRef = React$25.useRef(null);
3165
+ const hasStoppedRef = React$25.useRef(false);
3134
3166
  const meta = table.options.meta;
3135
- const prevInitialValueRef = React$24.useRef(initialValue);
3167
+ const prevInitialValueRef = React$25.useRef(initialValue);
3136
3168
  if (initialValue !== prevInitialValueRef.current) {
3137
3169
  prevInitialValueRef.current = initialValue;
3138
3170
  setValue(parseToLocalDate(initialValue));
3139
3171
  }
3140
- React$24.useEffect(() => {
3172
+ React$25.useEffect(() => {
3141
3173
  if (isEditing) hasStoppedRef.current = false;
3142
3174
  }, [isEditing]);
3143
- const onDateSelect = React$24.useCallback((date) => {
3175
+ const onDateSelect = React$25.useCallback((date) => {
3144
3176
  if (!date) return;
3145
3177
  setValue(date);
3146
3178
  meta?.onDataUpdate?.({
@@ -3156,14 +3188,14 @@ function DateCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isSel
3156
3188
  rowIndex,
3157
3189
  columnId
3158
3190
  ]);
3159
- const onOpenChange = React$24.useCallback((isOpen) => {
3191
+ const onOpenChange = React$25.useCallback((isOpen) => {
3160
3192
  setOpen(isOpen);
3161
3193
  if (!isOpen && isEditing && !hasStoppedRef.current) {
3162
3194
  hasStoppedRef.current = true;
3163
3195
  meta?.onCellEditingStop?.();
3164
3196
  }
3165
3197
  }, [isEditing, meta]);
3166
- const onWrapperKeyDown = React$24.useCallback((event) => {
3198
+ const onWrapperKeyDown = React$25.useCallback((event) => {
3167
3199
  if (isEditing) {
3168
3200
  if (event.key === "Escape") {
3169
3201
  event.preventDefault();
@@ -3183,10 +3215,10 @@ function DateCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isSel
3183
3215
  initialValue,
3184
3216
  meta
3185
3217
  ]);
3186
- React$24.useEffect(() => {
3218
+ React$25.useEffect(() => {
3187
3219
  setOpen(isEditing);
3188
3220
  }, [isEditing]);
3189
- React$24.useEffect(() => {
3221
+ React$25.useEffect(() => {
3190
3222
  if (isFocused && !isEditing && !meta?.searchOpen && !meta?.isScrolling && containerRef.current) containerRef.current.focus();
3191
3223
  }, [
3192
3224
  isFocused,
@@ -3238,7 +3270,7 @@ function DateCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isSel
3238
3270
  //#region src/data-grid/cell-variants/gantt-cell.tsx
3239
3271
  function GanttCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isSelected }) {
3240
3272
  const initialValue = cell.getValue();
3241
- const containerRef = React$23.useRef(null);
3273
+ const containerRef = React$24.useRef(null);
3242
3274
  const cellOpts = cell.column.columnDef.meta?.cell;
3243
3275
  const ts = cellOpts?.dateRangeFrom ?? cellOpts?.timelineStart;
3244
3276
  const te = cellOpts?.dateRangeTo ?? cellOpts?.timelineEnd;
@@ -3247,8 +3279,9 @@ function GanttCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isSe
3247
3279
  if (!timelineStartMs || !timelineEndMs) return null;
3248
3280
  const timelineDurationMs = timelineEndMs - timelineStartMs;
3249
3281
  const hasValidDates = initialValue && initialValue.start instanceof Date && initialValue.end instanceof Date;
3250
- const msUntilStart = hasValidDates ? initialValue.start.getTime() - timelineStartMs : 0;
3251
3282
  const barWidthMs = hasValidDates ? Math.min(initialValue.end.getTime(), timelineEndMs) - Math.max(initialValue.start.getTime(), timelineStartMs) : 0;
3283
+ const hasVisibleBar = hasValidDates && barWidthMs > 0;
3284
+ const msUntilStart = hasVisibleBar ? Math.max(0, initialValue.start.getTime() - timelineStartMs) : 0;
3252
3285
  return /* @__PURE__ */ jsx(DataGridCellWrapper, {
3253
3286
  ref: containerRef,
3254
3287
  cell,
@@ -3261,9 +3294,9 @@ function GanttCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isSe
3261
3294
  className: "px-1",
3262
3295
  children: /* @__PURE__ */ jsx("div", {
3263
3296
  className: "size-full flex overflow-hidden",
3264
- children: hasValidDates && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
3297
+ children: hasVisibleBar && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
3265
3298
  className: "shrink-0",
3266
- style: { width: `${Math.max(0, msUntilStart / timelineDurationMs * 100)}%` }
3299
+ style: { width: `${msUntilStart / timelineDurationMs * 100}%` }
3267
3300
  }), /* @__PURE__ */ jsx("div", {
3268
3301
  className: cn("shrink-0 h-full rounded-sm bg-primary", initialValue.barClassName),
3269
3302
  style: { width: `${barWidthMs / timelineDurationMs * 100}%` }
@@ -3272,12 +3305,299 @@ function GanttCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isSe
3272
3305
  });
3273
3306
  }
3274
3307
 
3308
+ //#endregion
3309
+ //#region src/data-grid/cell-variants/hierarchy-cell.tsx
3310
+ /**
3311
+ * Collects all descendant IDs from a hierarchy option.
3312
+ */
3313
+ function getAllDescendantIds(option) {
3314
+ const ids = [];
3315
+ if (option.children) for (const child of option.children) {
3316
+ ids.push(child.id);
3317
+ ids.push(...getAllDescendantIds(child));
3318
+ }
3319
+ return ids;
3320
+ }
3321
+ /**
3322
+ * Collects all IDs in the hierarchy tree (including the option itself).
3323
+ */
3324
+ function getAllIds(option) {
3325
+ return [option.id, ...getAllDescendantIds(option)];
3326
+ }
3327
+ /**
3328
+ * Finds an option by ID in the hierarchy tree.
3329
+ */
3330
+ function findOptionById(options, id) {
3331
+ for (const opt of options) {
3332
+ if (opt.id === id) return opt;
3333
+ if (opt.children) {
3334
+ const found = findOptionById(opt.children, id);
3335
+ if (found) return found;
3336
+ }
3337
+ }
3338
+ return null;
3339
+ }
3340
+ /**
3341
+ * Gets the label path from root to the given ID.
3342
+ */
3343
+ function getLabelPath(options, id, path = []) {
3344
+ for (const opt of options) {
3345
+ if (opt.id === id) return {
3346
+ found: true,
3347
+ path: [...path, opt.label]
3348
+ };
3349
+ if (opt.children) {
3350
+ const result = getLabelPath(opt.children, id, [...path, opt.label]);
3351
+ if (result.found) return result;
3352
+ }
3353
+ }
3354
+ return {
3355
+ found: false,
3356
+ path
3357
+ };
3358
+ }
3359
+ /**
3360
+ * Gets the ancestor IDs (parent chain) from root to the given ID.
3361
+ * Returns the IDs of all ancestors, NOT including the target ID itself.
3362
+ */
3363
+ function getAncestorIds(options, targetId, currentPath = []) {
3364
+ for (const opt of options) {
3365
+ if (opt.id === targetId) return currentPath;
3366
+ if (opt.children) {
3367
+ const result = getAncestorIds(opt.children, targetId, [...currentPath, opt.id]);
3368
+ if (result !== null) return result;
3369
+ }
3370
+ }
3371
+ return null;
3372
+ }
3373
+ /**
3374
+ * Builds a flat lookup map from ID to label for O(1) display lookups.
3375
+ */
3376
+ function buildLabelMap(options, map = new Map()) {
3377
+ for (const opt of options) {
3378
+ map.set(opt.id, opt.label);
3379
+ if (opt.children) buildLabelMap(opt.children, map);
3380
+ }
3381
+ return map;
3382
+ }
3383
+ /**
3384
+ * Checks if an option or any of its descendants contain the search term.
3385
+ */
3386
+ function matchesSearch$1(option, searchTerm) {
3387
+ const term = searchTerm.toLowerCase();
3388
+ if (option.label.toLowerCase().includes(term)) return true;
3389
+ if (option.children) return option.children.some((child) => matchesSearch$1(child, term));
3390
+ return false;
3391
+ }
3392
+ /**
3393
+ * Computes the initial expanded IDs.
3394
+ * - If there's only one top-level option with children, expand it by default.
3395
+ * - If there's a selected value, expand all ancestors to show it.
3396
+ */
3397
+ function getInitialExpandedIds(options, selectedValue) {
3398
+ const expandedIds = new Set();
3399
+ const firstOption = options[0];
3400
+ if (options.length === 1 && firstOption?.children && firstOption.children.length > 0) expandedIds.add(firstOption.id);
3401
+ if (selectedValue) {
3402
+ const ancestors = getAncestorIds(options, selectedValue);
3403
+ if (ancestors) for (const id of ancestors) expandedIds.add(id);
3404
+ }
3405
+ return expandedIds;
3406
+ }
3407
+ /**
3408
+ * Renders a single hierarchy item with expand/collapse and selection capabilities.
3409
+ */
3410
+ function HierarchyItem({ option, selectedValue, expandedIds, onToggleExpand, onSelect, depth = 0, searchTerm = "", ancestorMatched = false }) {
3411
+ const hasChildren = option.children && option.children.length > 0;
3412
+ const isExpanded = expandedIds.has(option.id);
3413
+ const isSelected = option.id === selectedValue;
3414
+ const matchesSelf = searchTerm && option.label.toLowerCase().includes(searchTerm.toLowerCase());
3415
+ const childrenMatchSearch = searchTerm && hasChildren && option.children.some((c) => matchesSearch$1(c, searchTerm));
3416
+ if (searchTerm && !matchesSelf && !childrenMatchSearch && !ancestorMatched) return null;
3417
+ const shouldShowExpanded = isExpanded || searchTerm !== "" && childrenMatchSearch;
3418
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(CommandItem, {
3419
+ value: `${option.label}-${option.id}`,
3420
+ onSelect: () => onSelect(option),
3421
+ style: { paddingLeft: `${depth * 20 + 8}px` },
3422
+ children: [
3423
+ hasChildren ? /* @__PURE__ */ jsx(Button, {
3424
+ onClick: (e) => {
3425
+ e.stopPropagation();
3426
+ onToggleExpand(option.id);
3427
+ },
3428
+ variant: "extraGhost",
3429
+ size: "sm",
3430
+ className: "size-4",
3431
+ children: shouldShowExpanded ? /* @__PURE__ */ jsx(ChevronDownIcon$1, {}) : /* @__PURE__ */ jsx(ChevronRightIcon$1, {})
3432
+ }) : /* @__PURE__ */ jsx("span", { className: "size-4" }),
3433
+ /* @__PURE__ */ jsx("span", {
3434
+ className: "flex-1 truncate",
3435
+ children: option.label
3436
+ }),
3437
+ isSelected && /* @__PURE__ */ jsx(CheckIcon$1, { className: "ml-auto h-4 w-4" })
3438
+ ]
3439
+ }), hasChildren && shouldShowExpanded && /* @__PURE__ */ jsx(Fragment, { children: option.children.map((child) => /* @__PURE__ */ jsx(HierarchyItem, {
3440
+ option: child,
3441
+ selectedValue,
3442
+ expandedIds,
3443
+ onToggleExpand,
3444
+ onSelect,
3445
+ depth: depth + 1,
3446
+ searchTerm,
3447
+ ancestorMatched: ancestorMatched || !!matchesSelf
3448
+ }, child.id)) })] });
3449
+ }
3450
+ function HierarchyCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isSelected }) {
3451
+ const initialValue = cell.getValue();
3452
+ const [value, setValue] = React$23.useState(initialValue);
3453
+ const [open, setOpen] = React$23.useState(false);
3454
+ const [searchValue, setSearchValue] = React$23.useState("");
3455
+ const containerRef = React$23.useRef(null);
3456
+ const inputRef = React$23.useRef(null);
3457
+ const meta = table.options.meta;
3458
+ const cellOpts = cell.column.columnDef.meta?.cell;
3459
+ const sideOffset = -(containerRef.current?.clientHeight ?? 0);
3460
+ const options = cellOpts?.variant === "hierarchy" ? cellOpts.options : [];
3461
+ const [expandedIds, setExpandedIds] = React$23.useState(() => getInitialExpandedIds(options, initialValue));
3462
+ const labelMap = React$23.useMemo(() => buildLabelMap(options), [options]);
3463
+ const displayLabel = React$23.useMemo(() => {
3464
+ if (!value) return "";
3465
+ return labelMap.get(value) ?? value;
3466
+ }, [value, labelMap]);
3467
+ const toggleExpand = React$23.useCallback((id) => {
3468
+ setExpandedIds((prev) => {
3469
+ const next = new Set(prev);
3470
+ if (next.has(id)) next.delete(id);
3471
+ else next.add(id);
3472
+ return next;
3473
+ });
3474
+ }, []);
3475
+ const onOptionSelect = React$23.useCallback((option) => {
3476
+ const newValue = option.id;
3477
+ setValue(newValue);
3478
+ meta?.onDataUpdate?.({
3479
+ rowIndex,
3480
+ columnId,
3481
+ value: newValue
3482
+ });
3483
+ meta?.onCellEditingStop?.();
3484
+ setOpen(false);
3485
+ }, [
3486
+ meta,
3487
+ rowIndex,
3488
+ columnId
3489
+ ]);
3490
+ const onOpenChange = React$23.useCallback((isOpen) => {
3491
+ setOpen(isOpen);
3492
+ if (!isOpen) {
3493
+ setSearchValue("");
3494
+ meta?.onCellEditingStop?.();
3495
+ }
3496
+ }, [meta]);
3497
+ const onOpenAutoFocus = React$23.useCallback((event) => {
3498
+ event.preventDefault();
3499
+ inputRef.current?.focus();
3500
+ }, []);
3501
+ const onWrapperKeyDown = React$23.useCallback((event) => {
3502
+ if (isEditing) {
3503
+ if (event.key === "Escape") {
3504
+ event.preventDefault();
3505
+ setValue(initialValue);
3506
+ setOpen(false);
3507
+ setSearchValue("");
3508
+ meta?.onCellEditingStop?.();
3509
+ } else if (event.key === "Tab") {
3510
+ event.preventDefault();
3511
+ setOpen(false);
3512
+ setSearchValue("");
3513
+ meta?.onCellEditingStop?.({ direction: event.shiftKey ? "left" : "right" });
3514
+ }
3515
+ }
3516
+ }, [
3517
+ isEditing,
3518
+ initialValue,
3519
+ meta
3520
+ ]);
3521
+ React$23.useEffect(() => {
3522
+ setValue(initialValue);
3523
+ }, [initialValue]);
3524
+ React$23.useEffect(() => {
3525
+ if (value) {
3526
+ const ancestors = getAncestorIds(options, value);
3527
+ if (ancestors && ancestors.length > 0) setExpandedIds((prev) => {
3528
+ const next = new Set(prev);
3529
+ for (const id of ancestors) next.add(id);
3530
+ return next;
3531
+ });
3532
+ }
3533
+ }, [value, options]);
3534
+ React$23.useEffect(() => {
3535
+ if (isEditing && !open) setOpen(true);
3536
+ if (isFocused && !isEditing && !meta?.searchOpen && !meta?.isScrolling && containerRef.current) containerRef.current.focus();
3537
+ }, [
3538
+ isFocused,
3539
+ isEditing,
3540
+ open,
3541
+ meta?.searchOpen,
3542
+ meta?.isScrolling
3543
+ ]);
3544
+ return /* @__PURE__ */ jsx(DataGridCellWrapper, {
3545
+ ref: containerRef,
3546
+ cell,
3547
+ table,
3548
+ rowIndex,
3549
+ columnId,
3550
+ isEditing,
3551
+ isFocused,
3552
+ isSelected,
3553
+ onKeyDown: onWrapperKeyDown,
3554
+ children: isEditing ? /* @__PURE__ */ jsxs(Popover, {
3555
+ open,
3556
+ onOpenChange,
3557
+ children: [/* @__PURE__ */ jsx(PopoverTrigger, {
3558
+ asChild: true,
3559
+ children: /* @__PURE__ */ jsx("div", {
3560
+ className: "size-full items-start text-start border-none p-0 shadow-none focus-visible:ring-0 dark:bg-transparent [&_svg]:hidden line-clamp-1",
3561
+ children: displayLabel
3562
+ })
3563
+ }), /* @__PURE__ */ jsx(PopoverContent, {
3564
+ "data-grid-cell-editor": "",
3565
+ align: "start",
3566
+ sideOffset,
3567
+ className: "max-w-[500px] w-full rounded-none p-0",
3568
+ onOpenAutoFocus,
3569
+ children: /* @__PURE__ */ jsxs(Command, {
3570
+ shouldFilter: false,
3571
+ children: [/* @__PURE__ */ jsx(CommandInput, {
3572
+ ref: inputRef,
3573
+ value: searchValue,
3574
+ onValueChange: setSearchValue,
3575
+ placeholder: "Search...",
3576
+ className: "h-auto flex-1 p-0 rounded-none"
3577
+ }), /* @__PURE__ */ jsxs(CommandList, { children: [/* @__PURE__ */ jsx(CommandEmpty, { children: "No options found." }), /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsx(HierarchyItem, {
3578
+ option,
3579
+ selectedValue: value,
3580
+ expandedIds,
3581
+ onToggleExpand: toggleExpand,
3582
+ onSelect: onOptionSelect,
3583
+ searchTerm: searchValue
3584
+ }, option.id)) })] })]
3585
+ })
3586
+ })]
3587
+ }) : /* @__PURE__ */ jsx("span", {
3588
+ "data-slot": "grid-cell-content",
3589
+ children: displayLabel
3590
+ })
3591
+ });
3592
+ }
3593
+
3275
3594
  //#endregion
3276
3595
  //#region src/textarea/textarea.tsx
3277
3596
  const textareaVariants = cva("border-input placeholder:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50", {
3278
3597
  variants: { variant: {
3279
3598
  default: "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
3280
- simple: ""
3599
+ simple: "",
3600
+ discreet: "border-transparent shadow-none hover:border-input hover:shadow-sm focus:border-input focus:shadow-sm bg-transparent hover:bg-accent/30"
3281
3601
  } },
3282
3602
  defaultVariants: { variant: "default" }
3283
3603
  });
@@ -3680,7 +4000,7 @@ function MultiSelectCell({ cell, table, rowIndex, columnId, isFocused, isEditing
3680
4000
  onValueChange: setSearchValue,
3681
4001
  onKeyDown: onInputKeyDown,
3682
4002
  placeholder: "Search...",
3683
- className: "h-auto flex-1 p-0"
4003
+ className: "h-auto flex-1 p-0 rounded-none"
3684
4004
  })]
3685
4005
  }), /* @__PURE__ */ jsxs(CommandList, {
3686
4006
  className: "max-h-full",
@@ -4023,7 +4343,7 @@ function SelectCell({ cell, table, rowIndex, columnId, isFocused, isEditing, isS
4023
4343
  hasSearch && /* @__PURE__ */ jsx(CommandInput, {
4024
4344
  ref: inputRef,
4025
4345
  placeholder: "Search...",
4026
- className: "h-auto flex-1 p-0"
4346
+ className: "h-auto flex-1 p-0 rounded-none"
4027
4347
  }),
4028
4348
  /* @__PURE__ */ jsx(CommandEmpty, { children: "No results found." }),
4029
4349
  /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(CommandItem, {
@@ -4261,6 +4581,15 @@ function DataGridCell({ cell, table }) {
4261
4581
  isFocused,
4262
4582
  isSelected
4263
4583
  });
4584
+ case "hierarchy": return /* @__PURE__ */ jsx(HierarchyCell, {
4585
+ cell,
4586
+ table,
4587
+ rowIndex,
4588
+ columnId,
4589
+ isEditing,
4590
+ isFocused,
4591
+ isSelected
4592
+ });
4264
4593
  case "checkbox": return /* @__PURE__ */ jsx(CheckboxCell, {
4265
4594
  cell,
4266
4595
  table,
@@ -4702,6 +5031,13 @@ function useDataGrid({ columns, data, onDataChange, onRowAdd: onRowAddProp, onRo
4702
5031
  return void 0;
4703
5032
  }).filter((id) => Boolean(id));
4704
5033
  }, [columns]);
5034
+ const columnDefsVersionRef = React$15.useRef(0);
5035
+ const prevColumnsRef = React$15.useRef(columns);
5036
+ if (prevColumnsRef.current !== columns) {
5037
+ prevColumnsRef.current = columns;
5038
+ columnDefsVersionRef.current += 1;
5039
+ }
5040
+ const columnDefsVersion = columnDefsVersionRef.current;
4705
5041
  const storageKey = React$15.useMemo(() => {
4706
5042
  if (typeof window === "undefined") return void 0;
4707
5043
  const path = globalThis.location?.pathname ?? "unknown";
@@ -5593,6 +5929,7 @@ function useDataGrid({ columns, data, onDataChange, onRowAdd: onRowAddProp, onRo
5593
5929
  rowHeight,
5594
5930
  isScrolling,
5595
5931
  highlightedRowIndex,
5932
+ columnDefsVersion,
5596
5933
  onRowClick: onRowClickProp,
5597
5934
  getIsCellSelected,
5598
5935
  getIsSearchMatch,
@@ -5630,6 +5967,7 @@ function useDataGrid({ columns, data, onDataChange, onRowAdd: onRowAddProp, onRo
5630
5967
  searchOpen,
5631
5968
  isScrolling,
5632
5969
  highlightedRowIndex,
5970
+ columnDefsVersion,
5633
5971
  onRowClickProp,
5634
5972
  getIsCellSelected,
5635
5973
  getIsSearchMatch,
@@ -6215,6 +6553,47 @@ const InfoCard = ({ variant, title, message, showHomeButton = false, children })
6215
6553
  });
6216
6554
  };
6217
6555
 
6556
+ //#endregion
6557
+ //#region src/input/deferred-input.tsx
6558
+ /**
6559
+ * An Input that buffers changes locally and only commits to the parent
6560
+ * on blur or Enter key press. Useful for forms where you don't want to
6561
+ * trigger expensive operations (like API calls) on every keystroke.
6562
+ */
6563
+ function DeferredInput({ value, onCommit, onValueChange, commitOnEnter = true, onBlur, onKeyDown,...props }) {
6564
+ const [localValue, setLocalValue] = useState(value);
6565
+ useEffect(() => {
6566
+ setLocalValue(value);
6567
+ }, [value]);
6568
+ const commitValue = useCallback(() => {
6569
+ if (localValue !== value) onCommit(localValue);
6570
+ }, [
6571
+ localValue,
6572
+ value,
6573
+ onCommit
6574
+ ]);
6575
+ const handleChange = useCallback((e) => {
6576
+ const newValue = e.target.value;
6577
+ setLocalValue(newValue);
6578
+ onValueChange?.(newValue);
6579
+ }, [onValueChange]);
6580
+ const handleBlur = useCallback((e) => {
6581
+ commitValue();
6582
+ onBlur?.(e);
6583
+ }, [commitValue, onBlur]);
6584
+ const handleKeyDown = useCallback((e) => {
6585
+ if (commitOnEnter && e.key === "Enter") e.currentTarget.blur();
6586
+ onKeyDown?.(e);
6587
+ }, [commitOnEnter, onKeyDown]);
6588
+ return /* @__PURE__ */ jsx(Input, {
6589
+ ...props,
6590
+ value: localValue,
6591
+ onChange: handleChange,
6592
+ onBlur: handleBlur,
6593
+ onKeyDown: handleKeyDown
6594
+ });
6595
+ }
6596
+
6218
6597
  //#endregion
6219
6598
  //#region src/input/number-input.tsx
6220
6599
  /**
@@ -6268,7 +6647,8 @@ function parseFormattedNumberHeuristic(formatted) {
6268
6647
  const numberInputWrapperVariants = cva("border-input bg-background grid grid-cols-[auto_1fr_auto] items-center overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] has-[input:disabled]:pointer-events-none has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50", {
6269
6648
  variants: { variant: {
6270
6649
  default: "min-h-9 focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",
6271
- simple: "min-h-8"
6650
+ simple: "min-h-8",
6651
+ discreet: "py-0 min-h-7 border-transparent shadow-none hover:border-input hover:shadow-sm focus-within:border-input focus-within:shadow-sm bg-transparent hover:bg-accent/30"
6272
6652
  } },
6273
6653
  defaultVariants: { variant: "default" }
6274
6654
  });
@@ -6361,7 +6741,7 @@ const NumberInput = React$10.forwardRef(({ className, wrapperClassName, prefix,
6361
6741
  inputVariants({ variant }),
6362
6742
  // Remove border/shadow/ring from input since wrapper handles it
6363
6743
  // Use min-h-full to override min-h-9/min-h-8 from inputVariants - wrapper controls height - never use explicit h-* in input since it breaks the spinner buttons for some browsers
6364
- "min-h-full border-0 shadow-none focus-visible:ring-0 p-0 tabular-nums",
6744
+ "min-h-full bg-transparent hover:bg-transparent border-0 shadow-none focus-visible:ring-0 p-0 tabular-nums",
6365
6745
  !prefix && !suffix ? "col-span-3" : !prefix || !suffix ? "col-span-2" : "col-span-1",
6366
6746
  "text-right",
6367
6747
  !prefix && "pl-2",
@@ -6392,6 +6772,51 @@ const NumberInput = React$10.forwardRef(({ className, wrapperClassName, prefix,
6392
6772
  });
6393
6773
  NumberInput.displayName = "NumberInput";
6394
6774
 
6775
+ //#endregion
6776
+ //#region src/input/deferred-number-input.tsx
6777
+ /**
6778
+ * A NumberInput that buffers changes locally and only commits to the parent
6779
+ * on blur or Enter key press. Useful for forms where you don't want to
6780
+ * trigger expensive operations (like API calls) on every keystroke.
6781
+ */
6782
+ function DeferredNumberInput({ value, onCommit, onValueChange, commitOnEnter = true, onBlur, onEnter,...props }) {
6783
+ const [localValue, setLocalValue] = useState(value);
6784
+ useEffect(() => {
6785
+ setLocalValue(value);
6786
+ }, [value]);
6787
+ const commitValue = useCallback(() => {
6788
+ if (localValue !== value) onCommit(localValue);
6789
+ }, [
6790
+ localValue,
6791
+ value,
6792
+ onCommit
6793
+ ]);
6794
+ const handleChange = useCallback((newValue) => {
6795
+ const normalizedValue = newValue ?? null;
6796
+ setLocalValue(normalizedValue);
6797
+ onValueChange?.(normalizedValue);
6798
+ }, [onValueChange]);
6799
+ const handleBlur = useCallback((e) => {
6800
+ commitValue();
6801
+ onBlur?.(e);
6802
+ }, [commitValue, onBlur]);
6803
+ const handleEnter = useCallback(() => {
6804
+ if (commitOnEnter) commitValue();
6805
+ onEnter?.();
6806
+ }, [
6807
+ commitOnEnter,
6808
+ commitValue,
6809
+ onEnter
6810
+ ]);
6811
+ return /* @__PURE__ */ jsx(NumberInput, {
6812
+ ...props,
6813
+ value: localValue ?? void 0,
6814
+ onChange: handleChange,
6815
+ onBlur: handleBlur,
6816
+ onEnter: handleEnter
6817
+ });
6818
+ }
6819
+
6395
6820
  //#endregion
6396
6821
  //#region src/mark-value-renderer/mark-value-renderer.tsx
6397
6822
  /**
@@ -6799,12 +7224,14 @@ const sheetVariants = cva("fixed z-50 gap-4 bg-background p-6 shadow-lg transiti
6799
7224
  } },
6800
7225
  defaultVariants: { side: "right" }
6801
7226
  });
6802
- const SheetContent = React$6.forwardRef(({ side = "right", className, children,...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(SheetPrimitive.Content, {
7227
+ const SheetContent = React$6.forwardRef(({ side = "right", className, children, __e2e_test_id__,...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(SheetPrimitive.Content, {
6803
7228
  ref,
6804
7229
  className: cn(sheetVariants({ side }), className),
7230
+ "data-test-id": __e2e_test_id__,
6805
7231
  ...props,
6806
7232
  children: [/* @__PURE__ */ jsxs(SheetPrimitive.Close, {
6807
7233
  className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
7234
+ "data-test-id": testId(__e2e_test_id__, "close"),
6808
7235
  children: [/* @__PURE__ */ jsx(Cross2Icon, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", {
6809
7236
  className: "sr-only",
6810
7237
  children: "Close"
@@ -7220,6 +7647,23 @@ function SidebarMenuSubButton({ asChild = false, size = "md", isActive = false,
7220
7647
 
7221
7648
  //#endregion
7222
7649
  //#region src/slicer/slicer.tsx
7650
+ /**
7651
+ * Collects all descendant values from a hierarchy option.
7652
+ */
7653
+ function getAllDescendantValues(option) {
7654
+ const values = [];
7655
+ if (option.children) for (const child of option.children) values.push(child.value, ...getAllDescendantValues(child));
7656
+ return values;
7657
+ }
7658
+ /**
7659
+ * Checks if an option or any of its descendants contain the search term.
7660
+ */
7661
+ function matchesSearch(option, searchTerm) {
7662
+ const term = searchTerm.toLowerCase();
7663
+ if (option.label.toLowerCase().includes(term)) return true;
7664
+ if (option.children) return option.children.some((child) => matchesSearch(child, term));
7665
+ return false;
7666
+ }
7223
7667
  function usePersistedState(storageKey, defaultValue) {
7224
7668
  const [state, setState] = useState(() => {
7225
7669
  if (!storageKey) return defaultValue;
@@ -7238,7 +7682,21 @@ function usePersistedState(storageKey, defaultValue) {
7238
7682
  }, [storageKey]);
7239
7683
  return [state, setPersistedState];
7240
7684
  }
7241
- function Slicer({ filterValues, selectedValues, onChange, title, isLoading = false, optionsHeight = 200, className, defaultCollapsed = false, storageKey }) {
7685
+ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = false, optionsHeight = 200, className, defaultCollapsed = false, storageKey, isHierarchy, __e2e_test_id__ }) {
7686
+ const isHierarchyMode = isHierarchy ?? filterValues.some((opt) => opt.children && opt.children.length > 0);
7687
+ const [expandedIds, setExpandedIds] = useState(() => {
7688
+ const firstOption = filterValues[0];
7689
+ if (filterValues.length === 1 && firstOption?.children?.length) return new Set([firstOption.value]);
7690
+ return new Set();
7691
+ });
7692
+ const toggleExpand = useCallback((value) => {
7693
+ setExpandedIds((prev) => {
7694
+ const next = new Set(prev);
7695
+ if (next.has(value)) next.delete(value);
7696
+ else next.add(value);
7697
+ return next;
7698
+ });
7699
+ }, []);
7242
7700
  const effectiveStorageKey = storageKey === null ? void 0 : storageKey ?? `slicer-collapsed-${title}`;
7243
7701
  const [isCollapsed, setIsCollapsed] = usePersistedState(effectiveStorageKey, defaultCollapsed);
7244
7702
  const [searchQuery, setSearchQuery] = useState("");
@@ -7264,14 +7722,15 @@ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = fal
7264
7722
  else newVals = filterValues.map((o) => o.value);
7265
7723
  onChange(newVals);
7266
7724
  };
7267
- const handleOptionToggle = (optionValue, checked) => {
7725
+ const handleOptionToggle = useCallback((optionValue) => {
7268
7726
  const newSelected = new Set(selectedValues);
7269
- if (checked) newSelected.add(optionValue);
7270
- else newSelected.delete(optionValue);
7727
+ if (newSelected.has(optionValue)) newSelected.delete(optionValue);
7728
+ else newSelected.add(optionValue);
7271
7729
  onChange(Array.from(newSelected));
7272
- };
7730
+ }, [selectedValues, onChange]);
7273
7731
  return /* @__PURE__ */ jsxs(Card, {
7274
7732
  className: cn("flex flex-col overflow-hidden w-56 rounded shadow-sm shrink-0", className),
7733
+ "data-test-id": __e2e_test_id__,
7275
7734
  children: [/* @__PURE__ */ jsxs(CardHeader, {
7276
7735
  className: "px-2 py-0 pt-2 flex space-y-0 border-b border-border bg-muted/50 relative min-h-9",
7277
7736
  children: [
@@ -7284,7 +7743,8 @@ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = fal
7284
7743
  variant: "simple",
7285
7744
  placeholder: "Search...",
7286
7745
  value: searchQuery,
7287
- onChange: (e) => setSearchQuery(e.target.value)
7746
+ onChange: (e) => setSearchQuery(e.target.value),
7747
+ "data-test-id": testId(__e2e_test_id__, "search")
7288
7748
  }),
7289
7749
  /* @__PURE__ */ jsx(Button, {
7290
7750
  variant: "ghost",
@@ -7295,6 +7755,7 @@ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = fal
7295
7755
  },
7296
7756
  title: isCollapsed ? "Expand slicer" : "Collapse slicer",
7297
7757
  className: "size-7 absolute top-1 right-9 text-muted-foreground",
7758
+ "data-test-id": testId(__e2e_test_id__, "collapse"),
7298
7759
  children: /* @__PURE__ */ jsx(ChevronUpIcon$1, { className: cn(isCollapsed && "rotate-180") })
7299
7760
  }),
7300
7761
  /* @__PURE__ */ jsx(Button, {
@@ -7304,16 +7765,18 @@ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = fal
7304
7765
  onClick: handleClear,
7305
7766
  title: "Clear filter",
7306
7767
  className: "size-7 absolute top-1 right-1 text-muted-foreground",
7768
+ "data-test-id": testId(__e2e_test_id__, "clear"),
7307
7769
  children: /* @__PURE__ */ jsx(FilterX, {})
7308
7770
  })
7309
7771
  ]
7310
7772
  }), !isCollapsed && /* @__PURE__ */ jsxs(CardContent, {
7311
7773
  className: "p-1 flex flex-col",
7312
- children: [/* @__PURE__ */ jsx(Button, {
7774
+ children: [!isHierarchyMode && /* @__PURE__ */ jsx(Button, {
7313
7775
  variant: "ghost",
7314
7776
  size: "xs",
7315
7777
  className: "w-full justify-start px-2 py-1 rounded-sm text-sm font-normal",
7316
7778
  onClick: handleSelectAll,
7779
+ "data-test-id": testId(__e2e_test_id__, "select-all"),
7317
7780
  children: searchQuery.length > 0 ? /* @__PURE__ */ jsx(Checkbox, {
7318
7781
  readOnly: true,
7319
7782
  checked: isAnyFilteredSelected,
@@ -7336,34 +7799,116 @@ function Slicer({ filterValues, selectedValues, onChange, title, isLoading = fal
7336
7799
  checkIcon: areAllSelected ? "check" : "square"
7337
7800
  })
7338
7801
  }), /* @__PURE__ */ jsx("div", {
7339
- className: `px-2 py-1 h-(--optionsHeight) shrink-0 overflow-auto`,
7802
+ className: cn("px-2 py-1 h-(--optionsHeight) shrink-0 overflow-auto", isHierarchyMode && "px-1"),
7340
7803
  style: { "--optionsHeight": `${optionsHeight}px` },
7341
- children: filteredOptions.length === 0 ? /* @__PURE__ */ jsx("div", {
7342
- className: "flex size-full items-center justify-center text-sm",
7343
- children: filterValues.length === 0 ? "No options available" : "No results found"
7344
- }) : /* @__PURE__ */ jsx(Fragment, { children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
7345
- /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-full" }),
7346
- /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-3/4" }),
7347
- /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-5/6" })
7348
- ] }) : /* @__PURE__ */ jsx(Fragment, { children: filteredOptions.map((option) => /* @__PURE__ */ jsx(SlicerItem, {
7349
- option,
7350
- isSelected: selectedValues.has(option.value),
7351
- onToggle: handleOptionToggle
7352
- }, option.value)) }) })
7804
+ children: /* @__PURE__ */ jsx(SlicerOptions, {
7805
+ isLoading,
7806
+ isHierarchyMode,
7807
+ filterValues,
7808
+ filteredOptions,
7809
+ selectedValues,
7810
+ expandedIds,
7811
+ onToggleExpand: toggleExpand,
7812
+ onOptionToggle: handleOptionToggle,
7813
+ searchQuery
7814
+ })
7353
7815
  })]
7354
7816
  })]
7355
7817
  });
7356
7818
  }
7819
+ const SlicerOptions = ({ isLoading, isHierarchyMode, filterValues, filteredOptions, selectedValues, expandedIds, onToggleExpand, onOptionToggle, searchQuery }) => {
7820
+ if (isLoading) return /* @__PURE__ */ jsxs(Fragment, { children: [
7821
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-full" }),
7822
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-3/4" }),
7823
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-5/6" })
7824
+ ] });
7825
+ if (filterValues.length === 0) return /* @__PURE__ */ jsx("div", {
7826
+ className: "flex size-full items-center justify-center text-sm",
7827
+ children: "No options available"
7828
+ });
7829
+ if (isHierarchyMode) return filterValues.map((option) => /* @__PURE__ */ jsx(SlicerHierarchyItem, {
7830
+ option,
7831
+ selectedValues,
7832
+ inheritedSelected: false,
7833
+ expandedIds,
7834
+ onToggleExpand,
7835
+ onSelect: onOptionToggle,
7836
+ searchTerm: searchQuery
7837
+ }, option.value));
7838
+ if (filteredOptions.length === 0) return /* @__PURE__ */ jsx("div", {
7839
+ className: "flex size-full items-center justify-center text-sm",
7840
+ children: "No results found"
7841
+ });
7842
+ return filteredOptions.map((option) => /* @__PURE__ */ jsx(SlicerItem, {
7843
+ option,
7844
+ isSelected: selectedValues.has(option.value),
7845
+ onToggle: onOptionToggle
7846
+ }, option.value));
7847
+ };
7357
7848
  const SlicerItem = ({ option, isSelected, onToggle }) => {
7849
+ const hasMatches = option.hasMatches ?? true;
7358
7850
  return /* @__PURE__ */ jsx(Checkbox, {
7359
7851
  checked: isSelected,
7360
- onChange: (e) => onToggle(option.value, e.target.checked),
7852
+ onChange: () => onToggle(option.value),
7361
7853
  checkIcon: "check",
7362
7854
  checkboxSize: "sm",
7363
- className: cn("whitespace-nowrap py-px text-sm", !option.hasMatches && "opacity-50", (option.value == "" || option.value == null || option.value == void 0) && "italic"),
7855
+ className: cn("whitespace-nowrap py-px text-sm", !hasMatches && "opacity-50", (option.value === "" || option.value == null) && "italic"),
7364
7856
  label: option.label
7365
7857
  }, option.value);
7366
7858
  };
7859
+ /**
7860
+ * Hierarchy item component for slicer - renders a single item in the hierarchy tree.
7861
+ * Can also be used directly for hierarchy filters in other components like TableFilter.
7862
+ */
7863
+ const SlicerHierarchyItem = ({ option, selectedValues, inheritedSelected, expandedIds, onToggleExpand, onSelect, depth = 0, searchTerm = "" }) => {
7864
+ const hasChildren = option.children && option.children.length > 0;
7865
+ const isExpanded = expandedIds.has(option.value);
7866
+ const isDirectlySelected = selectedValues.has(option.value);
7867
+ const isSelected = isDirectlySelected || inheritedSelected;
7868
+ const hasMatches = option.hasMatches ?? true;
7869
+ const hasSelectedDescendants = useMemo(() => {
7870
+ if (!hasChildren) return false;
7871
+ const descendantValues = getAllDescendantValues(option);
7872
+ return descendantValues.some((val) => selectedValues.has(val));
7873
+ }, [
7874
+ option,
7875
+ selectedValues,
7876
+ hasChildren
7877
+ ]);
7878
+ const isPartiallySelected = !isDirectlySelected && hasSelectedDescendants && !inheritedSelected;
7879
+ const matchesSelf = searchTerm && option.label.toLowerCase().includes(searchTerm.toLowerCase());
7880
+ const childrenMatchSearch = searchTerm && hasChildren && option.children.some((c) => matchesSearch(c, searchTerm));
7881
+ if (searchTerm && !matchesSelf && !childrenMatchSearch) return null;
7882
+ const shouldShowExpanded = isExpanded || searchTerm !== "" && childrenMatchSearch;
7883
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
7884
+ className: "flex items-center",
7885
+ style: { paddingLeft: `${depth * 12}px` },
7886
+ children: [hasChildren ? /* @__PURE__ */ jsx(Button, {
7887
+ onClick: () => onToggleExpand(option.value),
7888
+ variant: "extraGhost",
7889
+ size: "sm",
7890
+ className: "size-4",
7891
+ children: shouldShowExpanded ? /* @__PURE__ */ jsx(ChevronDownIcon$1, { className: "size-3.5" }) : /* @__PURE__ */ jsx(ChevronRightIcon$1, { className: "size-3.5" })
7892
+ }) : /* @__PURE__ */ jsx("span", { className: "size-4" }), /* @__PURE__ */ jsx(Checkbox, {
7893
+ checked: isSelected || isPartiallySelected,
7894
+ onChange: () => onSelect(option.value),
7895
+ iconStyle: isPartiallySelected || !isDirectlySelected ? "solo" : "default",
7896
+ checkIcon: isPartiallySelected ? "square" : !isDirectlySelected ? "minus" : "check",
7897
+ checkboxSize: "sm",
7898
+ className: cn("whitespace-nowrap py-px text-sm", !hasMatches && "opacity-50", inheritedSelected && !isDirectlySelected && "[&_svg]:opacity-50"),
7899
+ label: option.label
7900
+ })]
7901
+ }), hasChildren && shouldShowExpanded && /* @__PURE__ */ jsx(Fragment, { children: option.children.map((child) => /* @__PURE__ */ jsx(SlicerHierarchyItem, {
7902
+ option: child,
7903
+ selectedValues,
7904
+ inheritedSelected: isSelected,
7905
+ expandedIds,
7906
+ onToggleExpand,
7907
+ onSelect,
7908
+ depth: depth + 1,
7909
+ searchTerm
7910
+ }, child.value)) })] });
7911
+ };
7367
7912
 
7368
7913
  //#endregion
7369
7914
  //#region src/slider/slider.tsx
@@ -7486,6 +8031,42 @@ function TabsContent({ className,...props }) {
7486
8031
  });
7487
8032
  }
7488
8033
 
8034
+ //#endregion
8035
+ //#region src/textarea/deferred-textarea.tsx
8036
+ /**
8037
+ * A Textarea that buffers changes locally and only commits to the parent
8038
+ * on blur. Useful for forms where you don't want to trigger expensive
8039
+ * operations (like API calls) on every keystroke.
8040
+ */
8041
+ function DeferredTextarea({ value, onCommit, onValueChange, onBlur,...props }) {
8042
+ const [localValue, setLocalValue] = useState(value);
8043
+ useEffect(() => {
8044
+ setLocalValue(value);
8045
+ }, [value]);
8046
+ const commitValue = useCallback(() => {
8047
+ if (localValue !== value) onCommit(localValue);
8048
+ }, [
8049
+ localValue,
8050
+ value,
8051
+ onCommit
8052
+ ]);
8053
+ const handleChange = useCallback((e) => {
8054
+ const newValue = e.target.value;
8055
+ setLocalValue(newValue);
8056
+ onValueChange?.(newValue);
8057
+ }, [onValueChange]);
8058
+ const handleBlur = useCallback((e) => {
8059
+ commitValue();
8060
+ onBlur?.(e);
8061
+ }, [commitValue, onBlur]);
8062
+ return /* @__PURE__ */ jsx(Textarea, {
8063
+ ...props,
8064
+ value: localValue,
8065
+ onChange: handleChange,
8066
+ onBlur: handleBlur
8067
+ });
8068
+ }
8069
+
7489
8070
  //#endregion
7490
8071
  //#region src/toggle/toggle.tsx
7491
8072
  const toggleVariants = cva("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground cursor-pointer", {
@@ -7553,5 +8134,5 @@ const ToggleGroupItem = React$1.forwardRef(({ className, children, variant, size
7553
8134
  ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
7554
8135
 
7555
8136
  //#endregion
7556
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, CheckboxCell, Collapse, CollapseContent, CollapseTrigger, ComboboxDemo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, CommandPaletteDialog, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, CommandPaletteShortcut, CommandSeparator, CommandShortcut, ContentFrame, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataGridCell, DataGridCellWrapper, DataGridColumnHeader, DataGridContextMenu, DataGridRow, DataGridSearch, DataGridViewMenu, DateCell, DatePickerDemo, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GanttCell, GanttTimeline, GanttTimerangePicker, HeaderComponents, HoverCard, HoverCardContent, HoverCardTrigger, InfoCard, Input, Label, Loader, LongTextCell, MarkValueRenderer, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, MultiSelectCell, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberCell, NumberInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ReactNodeCell, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectCell, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortTextCell, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slicer, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, checkboxVariants, cn, commandInputVariants, createSelectColumn, getCellKey, getCommonPinningStyles, getLineCount, getRowHeightValue, inputVariants, isoToLocalDate, knobVariants, navigationMenuTriggerStyle, parseCellKey, sliderVariants, toast, toggleVariants, useCallbackRef, useDataGrid, useDebouncedCallback, useIsMobile, useSidebar };
8137
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, CheckboxCell, Collapse, CollapseContent, CollapseTrigger, ComboboxDemo, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandPalette, CommandPaletteDialog, CommandPaletteEmpty, CommandPaletteGroup, CommandPaletteInput, CommandPaletteItem, CommandPaletteList, CommandPaletteSeparator, CommandPaletteShortcut, CommandSeparator, CommandShortcut, ContentFrame, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataGrid, DataGridCell, DataGridCellWrapper, DataGridColumnHeader, DataGridContextMenu, DataGridRow, DataGridSearch, DataGridViewMenu, DateCell, DatePickerDemo, DeferredInput, DeferredNumberInput, DeferredTextarea, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, GanttCell, GanttTimeline, GanttTimerangePicker, HeaderComponents, HierarchyCell, HoverCard, HoverCardContent, HoverCardTrigger, InfoCard, Input, Label, Loader, LongTextCell, MarkValueRenderer, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Modal, MultiSelectCell, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NumberCell, NumberInput, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ReactNodeCell, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectCell, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortTextCell, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slicer, SlicerHierarchyItem, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buildLabelMap, buttonVariants, checkboxVariants, cn, commandInputVariants, createSelectColumn, findOptionById, getAllDescendantIds, getAllDescendantValues, getAllIds, getAncestorIds, getCellKey, getCommonPinningStyles, getLabelPath, getLineCount, getRowHeightValue, inputVariants, isoToLocalDate, knobVariants, matchesSearch, navigationMenuTriggerStyle, parseCellKey, sliderVariants, testId, toast, toggleVariants, useCallbackRef, useDataGrid, useDebouncedCallback, useIsMobile, useSidebar };
7557
8138
  //# sourceMappingURL=index.js.map