@yca-software/yca-react-core 0.0.4 → 0.0.6

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.
@@ -4,10 +4,10 @@ import { cn, surfaceOverlay, controlFocus, controlInvalid, controlBase, surfaceC
4
4
  import { cva } from 'class-variance-authority';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
7
- import * as React6 from 'react';
7
+ import * as React7 from 'react';
8
8
  import { useRef, useId, useState, useEffect } from 'react';
9
9
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
10
- import { Check, ChevronLeft, ChevronRight, Loader2, Calendar as Calendar$1, XIcon, ChevronUp, ChevronDown, X, CheckSquare, FileText, ImagePlus, UploadCloud } from 'lucide-react';
10
+ import { Check, Calendar as Calendar$1, ChevronLeft, ChevronRight, Loader2, XIcon, ChevronUp, ChevronDown, X, CheckSquare, FileText, ImagePlus, UploadCloud } from 'lucide-react';
11
11
  import { DayPicker } from 'react-day-picker';
12
12
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
13
13
  import { format, parse } from 'date-fns';
@@ -68,7 +68,7 @@ function AlertDescription({ className, ...props }) {
68
68
  var AlertDialog = AlertDialogPrimitive.Root;
69
69
  var AlertDialogTrigger = AlertDialogPrimitive.Trigger;
70
70
  var AlertDialogPortal = AlertDialogPrimitive.Portal;
71
- var AlertDialogOverlay = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
71
+ var AlertDialogOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
72
72
  AlertDialogPrimitive.Overlay,
73
73
  {
74
74
  className: cn(
@@ -80,7 +80,7 @@ var AlertDialogOverlay = React6.forwardRef(({ className, ...props }, ref) => /*
80
80
  }
81
81
  ));
82
82
  AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
83
- var AlertDialogContent = React6.forwardRef(({ className, onOverlayClick, overlayClassName, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
83
+ var AlertDialogContent = React7.forwardRef(({ className, onOverlayClick, overlayClassName, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
84
84
  /* @__PURE__ */ jsx(AlertDialogOverlay, { onClick: onOverlayClick, className: overlayClassName }),
85
85
  /* @__PURE__ */ jsx(
86
86
  AlertDialogPrimitive.Content,
@@ -106,7 +106,7 @@ var AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
106
106
  }
107
107
  );
108
108
  AlertDialogFooter.displayName = "AlertDialogFooter";
109
- var AlertDialogTitle = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
109
+ var AlertDialogTitle = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
110
110
  AlertDialogPrimitive.Title,
111
111
  {
112
112
  ref,
@@ -115,7 +115,7 @@ var AlertDialogTitle = React6.forwardRef(({ className, ...props }, ref) => /* @_
115
115
  }
116
116
  ));
117
117
  AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
118
- var AlertDialogDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
118
+ var AlertDialogDescription = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
119
119
  AlertDialogPrimitive.Description,
120
120
  {
121
121
  ref,
@@ -124,7 +124,7 @@ var AlertDialogDescription = React6.forwardRef(({ className, ...props }, ref) =>
124
124
  }
125
125
  ));
126
126
  AlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;
127
- var AlertDialogAction = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
127
+ var AlertDialogAction = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
128
128
  AlertDialogPrimitive.Action,
129
129
  {
130
130
  ref,
@@ -134,7 +134,7 @@ var AlertDialogAction = React6.forwardRef(({ className, ...props }, ref) => /* @
134
134
  }
135
135
  ));
136
136
  AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
137
- var AlertDialogCancel = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
137
+ var AlertDialogCancel = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
138
138
  AlertDialogPrimitive.Cancel,
139
139
  {
140
140
  ref,
@@ -144,7 +144,7 @@ var AlertDialogCancel = React6.forwardRef(({ className, ...props }, ref) => /* @
144
144
  }
145
145
  ));
146
146
  AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
147
- var Avatar = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
147
+ var Avatar = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
148
148
  AvatarPrimitive.Root,
149
149
  {
150
150
  ref,
@@ -153,7 +153,7 @@ var Avatar = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
153
153
  }
154
154
  ));
155
155
  Avatar.displayName = AvatarPrimitive.Root.displayName;
156
- var AvatarImage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
156
+ var AvatarImage = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
157
157
  AvatarPrimitive.Image,
158
158
  {
159
159
  ref,
@@ -162,7 +162,7 @@ var AvatarImage = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
162
162
  }
163
163
  ));
164
164
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
165
- var AvatarFallback = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
165
+ var AvatarFallback = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
166
166
  AvatarPrimitive.Fallback,
167
167
  {
168
168
  ref,
@@ -254,7 +254,7 @@ function Calendar({
254
254
  }
255
255
  );
256
256
  }
257
- var Checkbox = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
257
+ var Checkbox = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
258
258
  CheckboxPrimitive.Root,
259
259
  {
260
260
  ref,
@@ -358,6 +358,9 @@ function Popover({ ...props }) {
358
358
  function PopoverTrigger({ ...props }) {
359
359
  return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
360
360
  }
361
+ function PopoverAnchor({ ...props }) {
362
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, { "data-slot": "popover-anchor", ...props });
363
+ }
361
364
  function PopoverContent({
362
365
  className,
363
366
  align = "start",
@@ -397,11 +400,11 @@ function DatePicker({
397
400
  className,
398
401
  "aria-label": ariaLabel
399
402
  }) {
400
- const [open, setOpen] = React6.useState(false);
403
+ const [open, setOpen] = React7.useState(false);
401
404
  const normalizedMin = normalizeDate(minDate);
402
405
  const normalizedMax = normalizeDate(maxDate);
403
- const formatOpts = React6.useMemo(() => locale ? { locale } : void 0, [locale]);
404
- const disabledMatchers = React6.useMemo(() => {
406
+ const formatOpts = React7.useMemo(() => locale ? { locale } : void 0, [locale]);
407
+ const disabledMatchers = React7.useMemo(() => {
405
408
  const toStartOfDay = (d) => {
406
409
  const copy = new Date(d);
407
410
  copy.setHours(0, 0, 0, 0);
@@ -872,67 +875,75 @@ function DateRangePickerPresetList({
872
875
  })
873
876
  ] }) });
874
877
  }
875
- function DateRangePickerTrigger({
876
- className,
877
- inputText,
878
- effectivePlaceholder,
879
- isEmpty,
880
- ariaLabel,
881
- onOpen,
882
- onInputChange,
883
- onInputFocus,
884
- onInputBlur
885
- }) {
886
- return /* @__PURE__ */ jsxs(
887
- "div",
888
- {
889
- role: "button",
890
- tabIndex: 0,
891
- onClick: onOpen,
892
- onKeyDown: (e) => {
893
- if (e.key === "Enter" || e.key === " ") {
894
- e.preventDefault();
895
- onOpen();
896
- }
897
- },
898
- className: cn(
899
- controlBase,
900
- "flex w-full min-w-[17rem] max-w-full cursor-pointer items-center overflow-hidden focus-within:ring-[3px] focus-within:ring-ring/40",
901
- className
902
- ),
903
- children: [
904
- /* @__PURE__ */ jsx("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center border-r border-border/40 bg-muted/25 text-muted-foreground", children: /* @__PURE__ */ jsx(Calendar$1, { className: "size-4", "aria-hidden": "true" }) }),
905
- /* @__PURE__ */ jsx(
906
- Input,
907
- {
908
- type: "text",
909
- value: inputText,
910
- onChange: (e) => onInputChange(e.target.value),
911
- onFocus: onInputFocus,
912
- onBlur: onInputBlur,
913
- onClick: (e) => {
914
- e.stopPropagation();
915
- onOpen();
916
- },
917
- onKeyDown: (e) => {
918
- if (e.key === "Enter") {
919
- e.target.blur();
920
- }
921
- },
922
- placeholder: effectivePlaceholder,
923
- "data-empty": isEmpty || void 0,
924
- className: cn(
925
- "h-10 min-w-0 flex-1 cursor-pointer rounded-none border-0 bg-transparent py-2 pl-3 pr-3 text-sm shadow-none focus-visible:ring-0 whitespace-nowrap",
926
- isEmpty && "text-muted-foreground"
927
- ),
928
- title: !isEmpty ? inputText : void 0,
929
- "aria-label": ariaLabel
878
+ var DateRangePickerTrigger = React7.forwardRef(
879
+ function DateRangePickerTrigger2({
880
+ className,
881
+ inputText,
882
+ effectivePlaceholder,
883
+ isEmpty,
884
+ ariaLabel,
885
+ onOpen,
886
+ onInputChange,
887
+ onInputFocus,
888
+ onInputBlur
889
+ }, ref) {
890
+ return /* @__PURE__ */ jsxs(
891
+ "div",
892
+ {
893
+ ref,
894
+ role: "button",
895
+ tabIndex: 0,
896
+ "aria-label": ariaLabel,
897
+ "aria-haspopup": "dialog",
898
+ onClick: onOpen,
899
+ onKeyDown: (e) => {
900
+ if (e.key === "Enter" || e.key === " ") {
901
+ e.preventDefault();
902
+ onOpen();
930
903
  }
931
- )
932
- ]
933
- }
934
- );
935
- }
904
+ },
905
+ className: cn(
906
+ controlBase,
907
+ "flex w-full min-w-[17rem] max-w-full cursor-pointer items-center overflow-hidden focus-within:ring-[3px] focus-within:ring-ring/40",
908
+ className
909
+ ),
910
+ children: [
911
+ /* @__PURE__ */ jsx("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center border-r border-border/40 bg-muted/25 text-muted-foreground", children: /* @__PURE__ */ jsx(Calendar$1, { className: "size-4", "aria-hidden": "true" }) }),
912
+ /* @__PURE__ */ jsx(
913
+ Input,
914
+ {
915
+ type: "text",
916
+ value: inputText,
917
+ onChange: (e) => onInputChange(e.target.value),
918
+ onFocus: onInputFocus,
919
+ onBlur: onInputBlur,
920
+ onClick: (e) => {
921
+ e.stopPropagation();
922
+ onOpen();
923
+ },
924
+ onPointerDown: (e) => {
925
+ e.stopPropagation();
926
+ },
927
+ onKeyDown: (e) => {
928
+ if (e.key === "Enter") {
929
+ e.target.blur();
930
+ }
931
+ },
932
+ placeholder: effectivePlaceholder,
933
+ "data-empty": isEmpty || void 0,
934
+ className: cn(
935
+ "h-10 min-w-0 flex-1 cursor-pointer rounded-none border-0 bg-transparent py-2 pl-3 pr-3 text-sm shadow-none focus-visible:ring-0 whitespace-nowrap",
936
+ isEmpty && "text-muted-foreground"
937
+ ),
938
+ title: !isEmpty ? inputText : void 0,
939
+ "aria-label": ariaLabel
940
+ }
941
+ )
942
+ ]
943
+ }
944
+ );
945
+ }
946
+ );
936
947
 
937
948
  // src/components/ui/date-range-picker/useDateRangePresets.ts
938
949
  function getPresetRange(presetId) {
@@ -986,7 +997,7 @@ function getPresetRange(presetId) {
986
997
  }
987
998
  }
988
999
  function useMediaQuery(query, fallback = false) {
989
- const subscribe = React6.useCallback(
1000
+ const subscribe = React7.useCallback(
990
1001
  (onChange) => {
991
1002
  const mql = window.matchMedia(query);
992
1003
  mql.addEventListener("change", onChange);
@@ -994,7 +1005,7 @@ function useMediaQuery(query, fallback = false) {
994
1005
  },
995
1006
  [query]
996
1007
  );
997
- return React6.useSyncExternalStore(
1008
+ return React7.useSyncExternalStore(
998
1009
  subscribe,
999
1010
  () => window.matchMedia(query).matches,
1000
1011
  () => fallback
@@ -1022,7 +1033,7 @@ function DateRangePicker({
1022
1033
  }) {
1023
1034
  const t = { ...DEFAULT_TRANSLATIONS, ...translations };
1024
1035
  const effectivePlaceholder = placeholder ?? t.placeholder;
1025
- const presetList = React6.useMemo(() => {
1036
+ const presetList = React7.useMemo(() => {
1026
1037
  if (customPresets?.length) return customPresets;
1027
1038
  if (!showPresets) return [];
1028
1039
  return DEFAULT_PRESET_IDS.map(({ id }) => ({
@@ -1036,16 +1047,16 @@ function DateRangePicker({
1036
1047
  const isMobileLayout = useIsDatePickerMobileLayout();
1037
1048
  const isWideLayout = useIsWideDatePickerLayout();
1038
1049
  const calendarMonths = isMobileLayout ? 1 : isWideLayout ? 2 : 1;
1039
- const [open, setOpen] = React6.useState(false);
1040
- const [draft, setDraft] = React6.useState(value);
1041
- const [displayedMonth, setDisplayedMonth] = React6.useState(() => value?.from ?? /* @__PURE__ */ new Date());
1042
- const appliedRef = React6.useRef(value);
1043
- const wasOpenRef = React6.useRef(false);
1050
+ const [open, setOpen] = React7.useState(false);
1051
+ const [draft, setDraft] = React7.useState(value);
1052
+ const [displayedMonth, setDisplayedMonth] = React7.useState(() => value?.from ?? /* @__PURE__ */ new Date());
1053
+ const appliedRef = React7.useRef(value);
1054
+ const wasOpenRef = React7.useRef(false);
1044
1055
  const useApplyFlow = !!onApply;
1045
- const idScope = React6.useId();
1056
+ const idScope = React7.useId();
1046
1057
  const startInputId = `date-range-start-${idScope}`;
1047
1058
  const endInputId = `date-range-end-${idScope}`;
1048
- React6.useEffect(() => {
1059
+ React7.useEffect(() => {
1049
1060
  const wasOpen = wasOpenRef.current;
1050
1061
  wasOpenRef.current = open;
1051
1062
  if (open && !wasOpen) {
@@ -1056,7 +1067,7 @@ function DateRangePicker({
1056
1067
  setDraft(value);
1057
1068
  }
1058
1069
  }, [open, value]);
1059
- const handleOpenChange = React6.useCallback(
1070
+ const handleOpenChange = React7.useCallback(
1060
1071
  (next) => {
1061
1072
  if (!next && open && !useApplyFlow) {
1062
1073
  onChange(appliedRef.current);
@@ -1066,14 +1077,14 @@ function DateRangePicker({
1066
1077
  },
1067
1078
  [open, useApplyFlow, onChange]
1068
1079
  );
1069
- const formatOpts = React6.useMemo(() => locale ? { locale } : void 0, [locale]);
1070
- const label = React6.useMemo(
1080
+ const formatOpts = React7.useMemo(() => locale ? { locale } : void 0, [locale]);
1081
+ const label = React7.useMemo(
1071
1082
  () => formatRangeLabel(value, effectivePlaceholder, formatOpts),
1072
1083
  [effectivePlaceholder, value, formatOpts]
1073
1084
  );
1074
- const [inputText, setInputText] = React6.useState(label);
1075
- const inputFocusedRef = React6.useRef(false);
1076
- React6.useEffect(() => {
1085
+ const [inputText, setInputText] = React7.useState(label);
1086
+ const inputFocusedRef = React7.useRef(false);
1087
+ React7.useEffect(() => {
1077
1088
  if (!inputFocusedRef.current) setInputText(label);
1078
1089
  }, [label]);
1079
1090
  const handleInputBlur = () => {
@@ -1092,7 +1103,7 @@ function DateRangePicker({
1092
1103
  setInputText(label);
1093
1104
  }
1094
1105
  };
1095
- const disabledMatchers = React6.useMemo(() => {
1106
+ const disabledMatchers = React7.useMemo(() => {
1096
1107
  const toStartOfDay = (d) => {
1097
1108
  const copy = new Date(d);
1098
1109
  copy.setHours(0, 0, 0, 0);
@@ -1148,9 +1159,9 @@ function DateRangePicker({
1148
1159
  return nextRange;
1149
1160
  });
1150
1161
  };
1151
- const [startInputText, setStartInputText] = React6.useState("");
1152
- const [endInputText, setEndInputText] = React6.useState("");
1153
- React6.useEffect(() => {
1162
+ const [startInputText, setStartInputText] = React7.useState("");
1163
+ const [endInputText, setEndInputText] = React7.useState("");
1164
+ React7.useEffect(() => {
1154
1165
  if (open) {
1155
1166
  setStartInputText(draft?.from ? format(draft.from, INPUT_FORMAT) : "");
1156
1167
  setEndInputText(draft?.to ? format(draft.to, INPUT_FORMAT) : "");
@@ -1255,8 +1266,8 @@ function DateRangePicker({
1255
1266
  ] });
1256
1267
  }
1257
1268
  return (
1258
- // Non-modal: trigger is an editable input that keeps focus. Modal focus-trap
1259
- // + preventDefault(onOpenAutoFocus) dismisses the popover on open (same as DatePicker).
1269
+ // Non-modal (editable input keeps focus). PopoverTrigger anchors Popper —
1270
+ // Anchor-without-forwardRef parked content at translate(0,-200%) off-screen.
1260
1271
  /* @__PURE__ */ jsxs(Popover, { modal: false, open, onOpenChange: handleOpenChange, children: [
1261
1272
  /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: trigger }),
1262
1273
  /* @__PURE__ */ jsx(
@@ -1268,7 +1279,9 @@ function DateRangePicker({
1268
1279
  calendarMonths === 2 && "min-w-[36rem]"
1269
1280
  ),
1270
1281
  align: "start",
1282
+ side: "bottom",
1271
1283
  sideOffset: 8,
1284
+ avoidCollisions: false,
1272
1285
  onOpenAutoFocus: (e) => e.preventDefault(),
1273
1286
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row", children: [
1274
1287
  /* @__PURE__ */ jsx(
@@ -1347,10 +1360,10 @@ function DropdownScrollableList({
1347
1360
  scrollAreaClassName,
1348
1361
  grow = true
1349
1362
  }) {
1350
- const scrollRef = React6.useRef(null);
1351
- const [showTop, setShowTop] = React6.useState(false);
1352
- const [showBottom, setShowBottom] = React6.useState(false);
1353
- const update = React6.useCallback(() => {
1363
+ const scrollRef = React7.useRef(null);
1364
+ const [showTop, setShowTop] = React7.useState(false);
1365
+ const [showBottom, setShowBottom] = React7.useState(false);
1366
+ const update = React7.useCallback(() => {
1354
1367
  const el = scrollRef.current;
1355
1368
  if (!el) {
1356
1369
  setShowTop(false);
@@ -1367,14 +1380,14 @@ function DropdownScrollableList({
1367
1380
  setShowTop(scrollTop > 2);
1368
1381
  setShowBottom(scrollTop + clientHeight < scrollHeight - 2);
1369
1382
  }, []);
1370
- React6.useLayoutEffect(() => {
1383
+ React7.useLayoutEffect(() => {
1371
1384
  update();
1372
1385
  const id = requestAnimationFrame(() => {
1373
1386
  requestAnimationFrame(update);
1374
1387
  });
1375
1388
  return () => cancelAnimationFrame(id);
1376
1389
  }, [update, scrollKey]);
1377
- React6.useEffect(() => {
1390
+ React7.useEffect(() => {
1378
1391
  const el = scrollRef.current;
1379
1392
  if (!el) return;
1380
1393
  if (typeof ResizeObserver === "undefined") {
@@ -1463,15 +1476,15 @@ function Label({
1463
1476
  return /* @__PURE__ */ jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn(labelVariants(), className), ...props });
1464
1477
  }
1465
1478
  var Form = FormProvider;
1466
- var FormFieldContext = React6.createContext(null);
1479
+ var FormFieldContext = React7.createContext(null);
1467
1480
  var FormField = ({
1468
1481
  ...props
1469
1482
  }) => {
1470
1483
  return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
1471
1484
  };
1472
1485
  var useFormField = () => {
1473
- const fieldContext = React6.useContext(FormFieldContext);
1474
- const itemContext = React6.useContext(FormItemContext);
1486
+ const fieldContext = React7.useContext(FormFieldContext);
1487
+ const itemContext = React7.useContext(FormItemContext);
1475
1488
  if (fieldContext === null || fieldContext === void 0) {
1476
1489
  throw new Error("useFormField should be used within <FormField>");
1477
1490
  }
@@ -1488,9 +1501,9 @@ var useFormField = () => {
1488
1501
  ...fieldState
1489
1502
  };
1490
1503
  };
1491
- var FormItemContext = React6.createContext({});
1504
+ var FormItemContext = React7.createContext({});
1492
1505
  function FormItem({ className, ...props }) {
1493
- const id = React6.useId();
1506
+ const id = React7.useId();
1494
1507
  return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { "data-slot": "form-item", className: cn("grid gap-3", className), ...props }) });
1495
1508
  }
1496
1509
  function FormLabel({
@@ -1551,7 +1564,7 @@ function FormMessage({ className, ...props }) {
1551
1564
  }
1552
1565
  );
1553
1566
  }
1554
- var InsideModalScrollLockContext = React6.createContext(false);
1567
+ var InsideModalScrollLockContext = React7.createContext(false);
1555
1568
  function InsideModalScrollLockProvider({
1556
1569
  children,
1557
1570
  active = true
@@ -1559,7 +1572,7 @@ function InsideModalScrollLockProvider({
1559
1572
  return /* @__PURE__ */ jsx(InsideModalScrollLockContext.Provider, { value: active, children });
1560
1573
  }
1561
1574
  function useInsideModalScrollLock() {
1562
- return React6.useContext(InsideModalScrollLockContext);
1575
+ return React7.useContext(InsideModalScrollLockContext);
1563
1576
  }
1564
1577
  function Sheet({ ...props }) {
1565
1578
  return /* @__PURE__ */ jsx(DialogPrimitive.Root, { ...props });
@@ -1759,14 +1772,14 @@ function MultiSelect({
1759
1772
  }) {
1760
1773
  const t = { ...DEFAULT_TRANSLATIONS2, ...translations };
1761
1774
  const insideModalScrollLock = useInsideModalScrollLock();
1762
- const [search, setSearch] = React6.useState("");
1763
- const selectedSet = React6.useMemo(() => new Set(value), [value]);
1764
- const labelByValue = React6.useMemo(() => {
1775
+ const [search, setSearch] = React7.useState("");
1776
+ const selectedSet = React7.useMemo(() => new Set(value), [value]);
1777
+ const labelByValue = React7.useMemo(() => {
1765
1778
  const map = /* @__PURE__ */ new Map();
1766
1779
  for (const opt of options) map.set(opt.value, opt.label);
1767
1780
  return map;
1768
1781
  }, [options]);
1769
- const filteredOptions = React6.useMemo(() => {
1782
+ const filteredOptions = React7.useMemo(() => {
1770
1783
  const q = search.trim().toLowerCase();
1771
1784
  if (!q) return options;
1772
1785
  return options.filter((opt) => opt.label.toLowerCase().includes(q));
@@ -1860,7 +1873,7 @@ function MultiSelect({
1860
1873
  ] })
1861
1874
  ] });
1862
1875
  }
1863
- var ScrollArea = React6.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1876
+ var ScrollArea = React7.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
1864
1877
  ScrollAreaPrimitive.Root,
1865
1878
  {
1866
1879
  ref,
@@ -1874,7 +1887,7 @@ var ScrollArea = React6.forwardRef(({ className, children, ...props }, ref) => /
1874
1887
  }
1875
1888
  ));
1876
1889
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
1877
- var ScrollBar = React6.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
1890
+ var ScrollBar = React7.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
1878
1891
  ScrollAreaPrimitive.ScrollAreaScrollbar,
1879
1892
  {
1880
1893
  ref,
@@ -1921,10 +1934,10 @@ function Select({
1921
1934
  }) {
1922
1935
  const t = { ...DEFAULT_TRANSLATIONS3, ...translations };
1923
1936
  const insideModalScrollLock = useInsideModalScrollLock();
1924
- const [open, setOpen] = React6.useState(false);
1925
- const [search, setSearch] = React6.useState("");
1937
+ const [open, setOpen] = React7.useState(false);
1938
+ const [search, setSearch] = React7.useState("");
1926
1939
  const showSearch = isSelectSearchable(options.length, searchable);
1927
- const filteredOptions = React6.useMemo(
1940
+ const filteredOptions = React7.useMemo(
1928
1941
  () => showSearch ? filterSelectOptions(options, search) : options,
1929
1942
  [options, search, showSearch]
1930
1943
  );
@@ -2028,7 +2041,7 @@ function ChevronDownIcon({ className, ...props }) {
2028
2041
  }
2029
2042
  );
2030
2043
  }
2031
- var Separator = React6.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
2044
+ var Separator = React7.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
2032
2045
  SeparatorPrimitive.Root,
2033
2046
  {
2034
2047
  ref,
@@ -2043,7 +2056,7 @@ var Separator = React6.forwardRef(({ className, orientation = "horizontal", deco
2043
2056
  }
2044
2057
  ));
2045
2058
  Separator.displayName = SeparatorPrimitive.Root.displayName;
2046
- var Switch = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2059
+ var Switch = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2047
2060
  SwitchPrimitive.Root,
2048
2061
  {
2049
2062
  ref,
@@ -2069,11 +2082,11 @@ var Switch = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
2069
2082
  }
2070
2083
  ));
2071
2084
  Switch.displayName = SwitchPrimitive.Root.displayName;
2072
- var Table = React6.forwardRef(
2085
+ var Table = React7.forwardRef(
2073
2086
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx("table", { ref, className: cn("w-full caption-bottom text-sm", className), ...props }) })
2074
2087
  );
2075
2088
  Table.displayName = "Table";
2076
- var TableHeader = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2089
+ var TableHeader = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2077
2090
  "thead",
2078
2091
  {
2079
2092
  ref,
@@ -2082,9 +2095,9 @@ var TableHeader = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
2082
2095
  }
2083
2096
  ));
2084
2097
  TableHeader.displayName = "TableHeader";
2085
- var TableBody = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
2098
+ var TableBody = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", { ref, className: cn("[&_tr:last-child]:border-0", className), ...props }));
2086
2099
  TableBody.displayName = "TableBody";
2087
- var TableFooter = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2100
+ var TableFooter = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2088
2101
  "tfoot",
2089
2102
  {
2090
2103
  ref,
@@ -2096,7 +2109,7 @@ var TableFooter = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE
2096
2109
  }
2097
2110
  ));
2098
2111
  TableFooter.displayName = "TableFooter";
2099
- var TableRow = React6.forwardRef(
2112
+ var TableRow = React7.forwardRef(
2100
2113
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2101
2114
  "tr",
2102
2115
  {
@@ -2110,7 +2123,7 @@ var TableRow = React6.forwardRef(
2110
2123
  )
2111
2124
  );
2112
2125
  TableRow.displayName = "TableRow";
2113
- var TableHead = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2126
+ var TableHead = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2114
2127
  "th",
2115
2128
  {
2116
2129
  ref,
@@ -2122,7 +2135,7 @@ var TableHead = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__
2122
2135
  }
2123
2136
  ));
2124
2137
  TableHead.displayName = "TableHead";
2125
- var TableCell = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2138
+ var TableCell = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2126
2139
  "td",
2127
2140
  {
2128
2141
  ref,
@@ -2131,7 +2144,7 @@ var TableCell = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__
2131
2144
  }
2132
2145
  ));
2133
2146
  TableCell.displayName = "TableCell";
2134
- var TableCaption = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
2147
+ var TableCaption = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", { ref, className: cn("mt-4 text-sm text-muted-foreground", className), ...props }));
2135
2148
  TableCaption.displayName = "TableCaption";
2136
2149
  function Tabs({ className, ...props }) {
2137
2150
  return /* @__PURE__ */ jsx(
@@ -2191,7 +2204,7 @@ function TabsContent({
2191
2204
  }
2192
2205
  );
2193
2206
  }
2194
- var Textarea = React6.forwardRef(
2207
+ var Textarea = React7.forwardRef(
2195
2208
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2196
2209
  "textarea",
2197
2210
  {
@@ -2220,22 +2233,22 @@ function Tooltip({
2220
2233
  delayDuration = 400,
2221
2234
  closeDelay = 100
2222
2235
  }) {
2223
- const [open, setOpen] = React6.useState(false);
2224
- const openTimeoutRef = React6.useRef(null);
2225
- const closeTimeoutRef = React6.useRef(null);
2226
- const clearOpenTimeout = React6.useCallback(() => {
2236
+ const [open, setOpen] = React7.useState(false);
2237
+ const openTimeoutRef = React7.useRef(null);
2238
+ const closeTimeoutRef = React7.useRef(null);
2239
+ const clearOpenTimeout = React7.useCallback(() => {
2227
2240
  if (openTimeoutRef.current !== null) {
2228
2241
  window.clearTimeout(openTimeoutRef.current);
2229
2242
  openTimeoutRef.current = null;
2230
2243
  }
2231
2244
  }, []);
2232
- const clearCloseTimeout = React6.useCallback(() => {
2245
+ const clearCloseTimeout = React7.useCallback(() => {
2233
2246
  if (closeTimeoutRef.current !== null) {
2234
2247
  window.clearTimeout(closeTimeoutRef.current);
2235
2248
  closeTimeoutRef.current = null;
2236
2249
  }
2237
2250
  }, []);
2238
- const handleOpenChange = React6.useCallback(
2251
+ const handleOpenChange = React7.useCallback(
2239
2252
  (next) => {
2240
2253
  if (!next) {
2241
2254
  clearOpenTimeout();
@@ -2245,14 +2258,14 @@ function Tooltip({
2245
2258
  },
2246
2259
  [clearCloseTimeout, clearOpenTimeout]
2247
2260
  );
2248
- const handlePointerEnter = React6.useCallback(() => {
2261
+ const handlePointerEnter = React7.useCallback(() => {
2249
2262
  clearCloseTimeout();
2250
2263
  clearOpenTimeout();
2251
2264
  openTimeoutRef.current = window.setTimeout(() => {
2252
2265
  setOpen(true);
2253
2266
  }, delayDuration);
2254
2267
  }, [clearCloseTimeout, clearOpenTimeout, delayDuration]);
2255
- const handlePointerLeave = React6.useCallback(() => {
2268
+ const handlePointerLeave = React7.useCallback(() => {
2256
2269
  clearOpenTimeout();
2257
2270
  clearCloseTimeout();
2258
2271
  if (closeDelay === 0) {
@@ -2263,7 +2276,7 @@ function Tooltip({
2263
2276
  setOpen(false);
2264
2277
  }, closeDelay);
2265
2278
  }, [clearCloseTimeout, clearOpenTimeout, closeDelay]);
2266
- React6.useEffect(
2279
+ React7.useEffect(
2267
2280
  () => () => {
2268
2281
  clearOpenTimeout();
2269
2282
  clearCloseTimeout();
@@ -2324,7 +2337,7 @@ var paragraphVariants = cva("text-muted-foreground leading-relaxed", {
2324
2337
  size: "default"
2325
2338
  }
2326
2339
  });
2327
- var Heading = React6.forwardRef(
2340
+ var Heading = React7.forwardRef(
2328
2341
  ({ className, level, as, ...props }, ref) => {
2329
2342
  const Component = as || (level === "h1" ? "h1" : level === "h2" ? "h2" : level === "h3" ? "h3" : "h4");
2330
2343
  return /* @__PURE__ */ jsx(
@@ -2338,13 +2351,13 @@ var Heading = React6.forwardRef(
2338
2351
  }
2339
2352
  );
2340
2353
  Heading.displayName = "Heading";
2341
- var Paragraph = React6.forwardRef(
2354
+ var Paragraph = React7.forwardRef(
2342
2355
  ({ className, size, ...props }, ref) => {
2343
2356
  return /* @__PURE__ */ jsx("p", { ref, className: cn(paragraphVariants({ size }), className), ...props });
2344
2357
  }
2345
2358
  );
2346
2359
  Paragraph.displayName = "Paragraph";
2347
- var H3 = React6.forwardRef(
2360
+ var H3 = React7.forwardRef(
2348
2361
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx(Heading, { ref, level: "h3", as: "h3", className, ...props })
2349
2362
  );
2350
2363
  H3.displayName = "H3";
@@ -2510,6 +2523,6 @@ function UploadDropzone(props) {
2510
2523
  ] });
2511
2524
  }
2512
2525
 
2513
- export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Calendar, Checkbox, ConfirmDialog, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, DropdownScrollableList, DropdownSelectSearchInput, Form, FormControl, FormDescription, FormDrawer, FormField, FormItem, FormLabel, FormMessage, H3, Heading, Label, Link, MultiSelect, Paragraph, Popover, PopoverContent, PopoverTrigger, SEARCHABLE_SELECT_MIN_OPTIONS, ScrollArea, ScrollBar, Select, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipProvider, UploadDropzone, badgeVariants, dropdownMenuSelectOptionsMaxHeightClassName, filterSelectOptions, headingVariants, isSelectSearchable, linkStyles, paragraphVariants, useFormField };
2514
- //# sourceMappingURL=chunk-YR5QPXBX.js.map
2515
- //# sourceMappingURL=chunk-YR5QPXBX.js.map
2526
+ export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, Calendar, Checkbox, ConfirmDialog, DatePicker, DateRangePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, DropdownScrollableList, DropdownSelectSearchInput, Form, FormControl, FormDescription, FormDrawer, FormField, FormItem, FormLabel, FormMessage, H3, Heading, Label, Link, MultiSelect, Paragraph, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, SEARCHABLE_SELECT_MIN_OPTIONS, ScrollArea, ScrollBar, Select, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipProvider, UploadDropzone, badgeVariants, dropdownMenuSelectOptionsMaxHeightClassName, filterSelectOptions, headingVariants, isSelectSearchable, linkStyles, paragraphVariants, useFormField };
2527
+ //# sourceMappingURL=chunk-COQAEZJH.js.map
2528
+ //# sourceMappingURL=chunk-COQAEZJH.js.map