@chekinapp/ui 0.0.22 → 0.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -280,6 +280,7 @@ __export(index_exports, {
280
280
  buttonVariants: () => buttonVariants,
281
281
  calendarClassNames: () => calendarClassNames,
282
282
  cn: () => cn,
283
+ copyToClipboard: () => copyToClipboard2,
283
284
  emptyMediaVariants: () => emptyMediaVariants,
284
285
  getSidebarState: () => getSidebarState,
285
286
  inputVariants: () => inputVariants,
@@ -293,10 +294,28 @@ __export(index_exports, {
293
294
  toggleVariants: () => toggleVariants,
294
295
  uiKitI18nResources: () => uiKitI18nResources,
295
296
  uiKitTranslations: () => uiKitTranslations,
297
+ useAbortController: () => useAbortController,
298
+ useClickEscape: () => useClickEscape,
299
+ useCombinedRef: () => useCombinedRef,
300
+ useDebounce: () => useDebounce,
301
+ useDebouncedFunction: () => useDebouncedFunction,
302
+ useEvent: () => useEvent,
303
+ useHover: () => useHover,
304
+ useIsMobile: () => useIsMobile,
305
+ useIsMounted: () => useIsMounted,
306
+ useModalControls: () => useModalControls,
307
+ useOutsideClick: () => useOutsideClick,
308
+ usePagination: () => usePagination,
309
+ usePrevious: () => usePrevious,
296
310
  useRadioOptions: () => useRadioOptions,
311
+ useScreenResize: () => useScreenResize,
312
+ useScrollFrameIntoView: () => useScrollFrameIntoView,
313
+ useScrollToTop: () => useScrollToTop,
297
314
  useSidebar: () => useSidebar,
298
315
  useSidebarMenuButton: () => useSidebarMenuButton,
299
316
  useSidebarSafe: () => useSidebarSafe,
317
+ useTimeout: () => useTimeout,
318
+ useTimer: () => useTimer,
300
319
  useUpdateToast: () => useUpdateToast
301
320
  });
302
321
  module.exports = __toCommonJS(index_exports);
@@ -414,6 +433,11 @@ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
414
433
 
415
434
  // src/alert-box/AlertBox.tsx
416
435
  var import_lucide_react2 = require("lucide-react");
436
+
437
+ // src/alert-box/AlertBox.module.css
438
+ var AlertBox_default = {};
439
+
440
+ // src/alert-box/AlertBox.tsx
417
441
  var import_jsx_runtime2 = require("react/jsx-runtime");
418
442
  var AlertType = /* @__PURE__ */ ((AlertType2) => {
419
443
  AlertType2["INFO"] = "INFO";
@@ -441,12 +465,12 @@ var sizeClasses = {
441
465
  ["M" /* M */]: "p-4 text-base font-medium items-start",
442
466
  ["L" /* L */]: "px-6 py-5 items-start"
443
467
  };
444
- var typeClasses = {
445
- ["INFO" /* INFO */]: "bg-blue-50 [&_svg]:text-chekin-blue",
446
- ["WARNING" /* WARNING */]: "bg-amber-100 [&_svg]:text-amber-600",
447
- ["ERROR" /* ERROR */]: "bg-red-50 [&_svg]:text-chekin-red",
448
- ["LIGHT" /* LIGHT */]: "",
449
- ["SUCCESS" /* SUCCESS */]: "bg-emerald-50 text-chekin-navy [&_svg]:text-emerald-600"
468
+ var typeStyles = {
469
+ ["INFO" /* INFO */]: AlertBox_default["alertBox--info"],
470
+ ["WARNING" /* WARNING */]: AlertBox_default["alertBox--warning"],
471
+ ["ERROR" /* ERROR */]: AlertBox_default["alertBox--error"],
472
+ ["SUCCESS" /* SUCCESS */]: AlertBox_default["alertBox--success"],
473
+ ["LIGHT" /* LIGHT */]: ""
450
474
  };
451
475
  function AlertBox({
452
476
  text,
@@ -462,9 +486,10 @@ function AlertBox({
462
486
  {
463
487
  "data-slot": "alert-box",
464
488
  className: cn(
465
- "flex gap-3 rounded-[10px] [&_svg]:h-5 [&_svg]:w-5 [&_svg]:shrink-0",
489
+ AlertBox_default.alertBox,
490
+ "flex gap-3 [&_svg]:h-5 [&_svg]:w-5 [&_svg]:shrink-0",
466
491
  sizeClasses[size],
467
- typeClasses[type],
492
+ typeStyles[type],
468
493
  className
469
494
  ),
470
495
  children: [
@@ -481,6 +506,11 @@ var AlertSizes = AlertSize;
481
506
  // src/audio-player/AudioPlayer.tsx
482
507
  var import_react = require("react");
483
508
  var import_lucide_react3 = require("lucide-react");
509
+
510
+ // src/audio-player/AudioPlayer.module.css
511
+ var AudioPlayer_default = {};
512
+
513
+ // src/audio-player/AudioPlayer.tsx
484
514
  var import_jsx_runtime3 = require("react/jsx-runtime");
485
515
  function formatTime(seconds) {
486
516
  const mins = Math.floor(seconds / 60);
@@ -544,16 +574,12 @@ function AudioPlayer({ src, compact, className }) {
544
574
  {
545
575
  type: "button",
546
576
  className: cn(
547
- "inline-flex items-center justify-center rounded-lg bg-chekin-blue hover:bg-chekin-blue-hover",
577
+ AudioPlayer_default.playButton,
578
+ "inline-flex items-center justify-center",
548
579
  compact ? "h-6 min-w-6 p-1" : "h-8 min-w-8 p-1.5"
549
580
  ),
550
581
  onClick: togglePlayPause,
551
- children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react3.Pause, { className: cn(compact ? "h-2.5 w-2.5" : "h-3 w-3", "text-white") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
552
- import_lucide_react3.Play,
553
- {
554
- className: cn(compact ? "h-2.5 w-2.5" : "h-3 w-3", "fill-white text-white")
555
- }
556
- )
582
+ children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react3.Pause, { className: cn(compact ? "h-2.5 w-2.5" : "h-3 w-3", "fill-current") }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react3.Play, { className: cn(compact ? "h-2.5 w-2.5" : "h-3 w-3", "fill-current") })
557
583
  }
558
584
  ),
559
585
  !compact && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
@@ -561,18 +587,24 @@ function AudioPlayer({ src, compact, className }) {
561
587
  "div",
562
588
  {
563
589
  ref: progressRef,
564
- className: "h-1 flex-1 cursor-pointer overflow-hidden rounded-full bg-chekin-gray-3",
590
+ className: cn(
591
+ AudioPlayer_default.track,
592
+ "h-1 flex-1 cursor-pointer overflow-hidden rounded-full"
593
+ ),
565
594
  onClick: handleSeek,
566
595
  children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
567
596
  "div",
568
597
  {
569
- className: "h-full bg-chekin-blue transition-all duration-100 ease-linear",
598
+ className: cn(
599
+ AudioPlayer_default.progress,
600
+ "h-full transition-all duration-100 ease-linear"
601
+ ),
570
602
  style: { width: `${progress}%` }
571
603
  }
572
604
  )
573
605
  }
574
606
  ),
575
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "min-w-10 text-xs font-medium text-chekin-gray-1", children: isPlaying || currentTime > 0 ? formatTime(currentTime) : formatTime(duration) })
607
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: cn(AudioPlayer_default.time, "min-w-10 text-xs font-medium"), children: isPlaying || currentTime > 0 ? formatTime(currentTime) : formatTime(duration) })
576
608
  ] })
577
609
  ] });
578
610
  }
@@ -581,6 +613,11 @@ AudioPlayer.displayName = "AudioPlayer";
581
613
  // src/avatar/Avatar.tsx
582
614
  var React2 = __toESM(require("react"), 1);
583
615
  var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
616
+
617
+ // src/avatar/Avatar.module.css
618
+ var Avatar_default = {};
619
+
620
+ // src/avatar/Avatar.tsx
584
621
  var import_jsx_runtime4 = require("react/jsx-runtime");
585
622
  var sizeClasses2 = {
586
623
  sm: "h-8 w-8",
@@ -611,8 +648,9 @@ var Avatar = React2.forwardRef(({ className, src, alt, fallback, size = "md", fa
611
648
  AvatarPrimitive.Fallback,
612
649
  {
613
650
  className: cn(
614
- "flex h-full w-full items-center justify-center rounded-full font-medium text-chekin-gray-1",
615
- fallbackClassName ? fallbackClassName : "bg-chekin-gray-3"
651
+ "flex h-full w-full items-center justify-center rounded-full font-medium",
652
+ !fallbackClassName && Avatar_default.fallback,
653
+ fallbackClassName
616
654
  ),
617
655
  children: fallback
618
656
  }
@@ -664,6 +702,11 @@ Badge.displayName = "Badge";
664
702
 
665
703
  // src/beta-badge/BetaBadge.tsx
666
704
  var import_react_i18next = require("react-i18next");
705
+
706
+ // src/beta-badge/BetaBadge.module.css
707
+ var BetaBadge_default = {};
708
+
709
+ // src/beta-badge/BetaBadge.tsx
667
710
  var import_jsx_runtime6 = require("react/jsx-runtime");
668
711
  function BetaBadge({
669
712
  className,
@@ -678,8 +721,9 @@ function BetaBadge({
678
721
  {
679
722
  "data-slot": "beta-badge",
680
723
  className: cn(
724
+ BetaBadge_default.betaBadge,
681
725
  "rounded-sm px-2 py-1 text-sm/4 font-semibold uppercase",
682
- readOnly ? "bg-chekin-blue/10 text-chekin-blue" : "bg-chekin-gray-1/15 text-chekin-gray-1",
726
+ readOnly && BetaBadge_default["betaBadge--readonly"],
683
727
  className
684
728
  ),
685
729
  ...props,
@@ -770,6 +814,11 @@ BookmarkTabsTrigger.displayName = "BookmarkTabsTrigger";
770
814
  // src/box-option-selector/BoxOptionSelector.tsx
771
815
  var import_react2 = require("react");
772
816
  var import_react_i18next2 = require("react-i18next");
817
+
818
+ // src/box-option-selector/BoxOptionSelector.module.css
819
+ var BoxOptionSelector_default = {};
820
+
821
+ // src/box-option-selector/BoxOptionSelector.tsx
773
822
  var import_jsx_runtime8 = require("react/jsx-runtime");
774
823
  var BoxOptionSelector = (0, import_react2.forwardRef)(
775
824
  ({
@@ -805,8 +854,9 @@ var BoxOptionSelector = (0, import_react2.forwardRef)(
805
854
  ref,
806
855
  "data-slot": "box-option-selector",
807
856
  className: cn(
857
+ BoxOptionSelector_default.boxOption,
808
858
  "flex min-h-[116px] w-full max-w-[400px] cursor-pointer flex-col gap-4 rounded-lg border p-4 transition-all duration-200",
809
- isSelected ? "border-chekin-blue bg-chekin-surface-pressed" : "border-chekin-gray-3 bg-white hover:bg-chekin-surface-input-empty",
859
+ isSelected && BoxOptionSelector_default["boxOption--selected"],
810
860
  disabled && "cursor-not-allowed opacity-50"
811
861
  ),
812
862
  onClick: handleClick,
@@ -867,8 +917,8 @@ function Breadcrumb({
867
917
  }
868
918
  const isLink = Boolean(to && !current);
869
919
  const contentClassName = cn(
870
- "flex items-center gap-2.5 text-sm font-medium text-chekin-gray-1",
871
- current && "font-bold text-chekin-navy",
920
+ "flex items-center gap-2.5 text-sm font-medium text-[var(--breadcrumbs-link-color)]",
921
+ current && "font-bold text-[var(--breadcrumbs-current-color)]",
872
922
  isLink && "transition-opacity hover:opacity-80",
873
923
  className
874
924
  );
@@ -908,7 +958,7 @@ function Breadcrumbs({ className, children }) {
908
958
  import_lucide_react4.ChevronRight,
909
959
  {
910
960
  "aria-hidden": "true",
911
- className: "shrink-0 text-chekin-navy",
961
+ className: "shrink-0 text-[var(--breadcrumbs-separator-color)]",
912
962
  size: 16
913
963
  }
914
964
  ) : null,
@@ -1214,7 +1264,7 @@ function ButtonGroupText({
1214
1264
  {
1215
1265
  "data-slot": "button-group-text",
1216
1266
  className: cn(
1217
- "flex items-center gap-2 rounded-lg border bg-chekin-surface-input-empty px-2.5 text-sm font-medium",
1267
+ "flex items-center gap-2 rounded-lg border border-[var(--button-group-text-border)] bg-[var(--button-group-text-bg)] px-2.5 text-sm font-medium text-[var(--button-group-text-color)]",
1218
1268
  "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
1219
1269
  className
1220
1270
  ),
@@ -1228,7 +1278,7 @@ ButtonGroupText.displayName = "ButtonGroupText";
1228
1278
  var import_jsx_runtime13 = require("react/jsx-runtime");
1229
1279
  function ButtonsGroupLabel({ children, label, className }) {
1230
1280
  return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { "data-slot": "buttons-group-label", className: cn(className), children: [
1231
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "mb-2 text-xs font-medium text-chekin-gray-1", children: label }),
1281
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "mb-2 text-xs font-medium text-[var(--buttons-group-label-color)]", children: label }),
1232
1282
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { children })
1233
1283
  ] });
1234
1284
  }
@@ -1424,6 +1474,15 @@ var getDocument = () => {
1424
1474
  function getCustomContainer() {
1425
1475
  return getDocument()?.body;
1426
1476
  }
1477
+ function scrollToTop(value = 0, behavior) {
1478
+ window.scrollTo({
1479
+ top: value,
1480
+ behavior
1481
+ });
1482
+ }
1483
+ function isObject(value) {
1484
+ return value !== null && typeof value === "object";
1485
+ }
1427
1486
  var isNumeric = (n) => n !== "" && !isNaN(n);
1428
1487
  function toCssSize(size) {
1429
1488
  if (!size) {
@@ -2280,15 +2339,73 @@ function DataTable({ columns, data }) {
2280
2339
  }
2281
2340
 
2282
2341
  // src/dialog/Dialog.tsx
2283
- var React10 = __toESM(require("react"), 1);
2342
+ var React11 = __toESM(require("react"), 1);
2284
2343
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
2285
2344
  var import_react_visually_hidden = require("@radix-ui/react-visually-hidden");
2286
2345
  var import_lucide_react10 = require("lucide-react");
2287
2346
 
2288
- // src/lib/use-combined-ref.ts
2347
+ // src/hooks/use-scroll-to-top.ts
2289
2348
  var import_react8 = require("react");
2349
+ function useScrollToTop() {
2350
+ (0, import_react8.useEffect)(() => {
2351
+ scrollToTop();
2352
+ }, []);
2353
+ }
2354
+
2355
+ // src/hooks/use-abort-controller.ts
2356
+ var import_react9 = __toESM(require("react"), 1);
2357
+ function useAbortController() {
2358
+ const [abortController, setAbortController] = import_react9.default.useState(() => {
2359
+ return new AbortController();
2360
+ });
2361
+ const setupAbortController = import_react9.default.useCallback(() => {
2362
+ const abortController2 = new AbortController();
2363
+ setAbortController(abortController2);
2364
+ return abortController2.signal;
2365
+ }, []);
2366
+ return {
2367
+ abortController,
2368
+ setupAbortController
2369
+ };
2370
+ }
2371
+
2372
+ // src/hooks/use-click-escape.ts
2373
+ var import_react11 = require("react");
2374
+
2375
+ // src/hooks/use-event.ts
2376
+ var import_react10 = require("react");
2377
+ function useEvent(fn) {
2378
+ const fnRef = (0, import_react10.useRef)(fn);
2379
+ (0, import_react10.useLayoutEffect)(() => {
2380
+ fnRef.current = fn;
2381
+ }, [fn]);
2382
+ const eventCb = (0, import_react10.useCallback)(
2383
+ (...args) => {
2384
+ return fnRef.current?.apply(null, args);
2385
+ },
2386
+ [fnRef]
2387
+ );
2388
+ return eventCb;
2389
+ }
2390
+
2391
+ // src/hooks/use-click-escape.ts
2392
+ function useClickEscape({ enabled = true, onClick }) {
2393
+ const handler = useEvent(onClick);
2394
+ (0, import_react11.useEffect)(() => {
2395
+ const handleKeyDown = (event) => {
2396
+ if (event.key === "Escape" && enabled) {
2397
+ handler();
2398
+ }
2399
+ };
2400
+ window.addEventListener("keydown", handleKeyDown);
2401
+ return () => window.removeEventListener("keydown", handleKeyDown);
2402
+ }, [handler, enabled]);
2403
+ }
2404
+
2405
+ // src/hooks/use-combined-ref.ts
2406
+ var import_react12 = require("react");
2290
2407
  function useCombinedRef(...refs) {
2291
- return (0, import_react8.useCallback)(
2408
+ return (0, import_react12.useCallback)(
2292
2409
  (node) => {
2293
2410
  refs.forEach((ref) => {
2294
2411
  if (!ref) return;
@@ -2304,10 +2421,484 @@ function useCombinedRef(...refs) {
2304
2421
  );
2305
2422
  }
2306
2423
 
2424
+ // src/hooks/use-is-mobile.ts
2425
+ var import_react13 = require("react");
2426
+ var MOBILE_BREAKPOINT = 768;
2427
+ function useIsMobile({ breakpoint = MOBILE_BREAKPOINT } = {}) {
2428
+ const [isMobile, setIsMobile] = (0, import_react13.useState)(void 0);
2429
+ (0, import_react13.useEffect)(() => {
2430
+ const mediaQuery = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
2431
+ const onChange = () => {
2432
+ setIsMobile(window.innerWidth < breakpoint);
2433
+ };
2434
+ mediaQuery.addEventListener("change", onChange);
2435
+ setIsMobile(window.innerWidth < breakpoint);
2436
+ return () => {
2437
+ mediaQuery.removeEventListener("change", onChange);
2438
+ };
2439
+ }, [breakpoint]);
2440
+ return !!isMobile;
2441
+ }
2442
+
2443
+ // src/hooks/use-is-mounted.ts
2444
+ var import_react14 = require("react");
2445
+ function useIsMounted() {
2446
+ const isMounted = (0, import_react14.useRef)(false);
2447
+ (0, import_react14.useEffect)(() => {
2448
+ isMounted.current = true;
2449
+ return () => {
2450
+ isMounted.current = false;
2451
+ };
2452
+ }, []);
2453
+ return isMounted;
2454
+ }
2455
+
2456
+ // src/hooks/use-modal-controls.ts
2457
+ var import_react15 = require("react");
2458
+ function useModalControls(initState = false, { disabled } = {}) {
2459
+ const [isOpen, setIsOpen] = (0, import_react15.useState)(initState);
2460
+ const openModal = (0, import_react15.useCallback)(() => {
2461
+ if (disabled) return;
2462
+ setIsOpen(true);
2463
+ }, [disabled]);
2464
+ const closeModal = (0, import_react15.useCallback)(() => {
2465
+ if (disabled) return;
2466
+ setIsOpen(false);
2467
+ }, [disabled]);
2468
+ const toggleModal = (0, import_react15.useCallback)(() => {
2469
+ if (disabled) return;
2470
+ setIsOpen((value) => !value);
2471
+ }, [disabled]);
2472
+ return {
2473
+ isOpen,
2474
+ openModal,
2475
+ closeModal,
2476
+ toggleModal,
2477
+ setIsOpen
2478
+ };
2479
+ }
2480
+
2481
+ // src/hooks/use-outside-click.ts
2482
+ var import_react16 = require("react");
2483
+ function useOutsideClick(elementRef, onOutsideClick, nested) {
2484
+ const handleOutsideClick = (0, import_react16.useRef)(onOutsideClick);
2485
+ handleOutsideClick.current = onOutsideClick;
2486
+ const checkNestedElements = (0, import_react16.useCallback)(
2487
+ (event) => {
2488
+ const checkIsElementClickedBySelector = (selector) => {
2489
+ const nestedElement = getDocument().querySelector(selector);
2490
+ return nestedElement?.contains(event.target);
2491
+ };
2492
+ const checkDataAttribute = () => {
2493
+ const target = event.target;
2494
+ if (!target || !(target instanceof HTMLElement)) {
2495
+ return false;
2496
+ }
2497
+ let current = target;
2498
+ while (current) {
2499
+ if (current.hasAttribute("data-exclude-from-outside-click")) {
2500
+ return true;
2501
+ }
2502
+ current = current.parentElement;
2503
+ }
2504
+ return false;
2505
+ };
2506
+ if (nested) {
2507
+ if (typeof nested === "string") {
2508
+ if (checkIsElementClickedBySelector(nested)) return true;
2509
+ } else {
2510
+ if (nested.some(checkIsElementClickedBySelector)) return true;
2511
+ }
2512
+ }
2513
+ return checkDataAttribute();
2514
+ },
2515
+ [nested]
2516
+ );
2517
+ (0, import_react16.useEffect)(() => {
2518
+ function handleClickOutside(event) {
2519
+ const isNestedElement = checkNestedElements(event);
2520
+ if (elementRef?.current && !elementRef.current.contains(event.target) && !isNestedElement) {
2521
+ handleOutsideClick.current?.(event);
2522
+ }
2523
+ }
2524
+ getDocument().addEventListener("mousedown", handleClickOutside, true);
2525
+ getDocument().addEventListener("touchstart", handleClickOutside, true);
2526
+ return () => {
2527
+ getDocument().removeEventListener("mousedown", handleClickOutside, true);
2528
+ getDocument().removeEventListener("touchstart", handleClickOutside, true);
2529
+ };
2530
+ }, [checkNestedElements, elementRef]);
2531
+ }
2532
+
2533
+ // src/hooks/use-screen-resize.ts
2534
+ var import_react17 = require("react");
2535
+ var eventName = "resize";
2536
+ function useScreenResize(maxWidth) {
2537
+ const [isInitialized, setIsInitialized] = (0, import_react17.useState)(false);
2538
+ const [isMatch, setIsMatch] = (0, import_react17.useState)(false);
2539
+ const handleResizeEvent = (0, import_react17.useCallback)(() => {
2540
+ const adjustedMaxWidth = `${parseInt(maxWidth, 10) - 1}px`;
2541
+ const media = getWindow().matchMedia(`(max-width: ${adjustedMaxWidth})`);
2542
+ setIsInitialized(true);
2543
+ setIsMatch(media?.matches);
2544
+ }, [maxWidth]);
2545
+ (0, import_react17.useLayoutEffect)(() => {
2546
+ handleResizeEvent();
2547
+ getWindow().addEventListener(eventName, handleResizeEvent);
2548
+ return () => {
2549
+ getWindow().removeEventListener(eventName, handleResizeEvent);
2550
+ };
2551
+ }, [handleResizeEvent]);
2552
+ return { isMatch, isInitialized };
2553
+ }
2554
+
2555
+ // src/hooks/use-scroll-frame-into-view.ts
2556
+ var import_react18 = require("react");
2557
+
2558
+ // src/lib/runtimeSettings.ts
2559
+ function getChekinRuntimeSettings() {
2560
+ return window.ChekinProSettings || window.ChekinHousingsSDKSettings || {};
2561
+ }
2562
+ function isMobileModalModeAvailable() {
2563
+ const settings = getChekinRuntimeSettings();
2564
+ return !settings.autoHeight;
2565
+ }
2566
+
2567
+ // src/hooks/use-scroll-frame-into-view.ts
2568
+ function useScrollFrameIntoView(active, options = {}) {
2569
+ const { behavior = "smooth", elementRef } = options;
2570
+ (0, import_react18.useEffect)(() => {
2571
+ const sdkWindow = window;
2572
+ if (!active || !getChekinRuntimeSettings()?.autoHeight) {
2573
+ return;
2574
+ }
2575
+ const frame = sdkWindow.chekinCustomFrame;
2576
+ if (!frame) {
2577
+ return;
2578
+ }
2579
+ const parentWindow = window.parent;
2580
+ const scrollToElement = () => {
2581
+ const frameRect = frame.getBoundingClientRect();
2582
+ if (elementRef?.current) {
2583
+ const elementRect = elementRef.current.getBoundingClientRect();
2584
+ const elementCenterInFrame = elementRect.top + elementRect.height / 2;
2585
+ const elementCenterInParent = frameRect.top + elementCenterInFrame;
2586
+ const targetScroll = parentWindow.scrollY + elementCenterInParent - parentWindow.innerHeight / 2;
2587
+ parentWindow.scrollTo({
2588
+ top: Math.max(0, targetScroll),
2589
+ behavior
2590
+ });
2591
+ return;
2592
+ }
2593
+ frame.scrollIntoView({ behavior, block: "start" });
2594
+ };
2595
+ requestAnimationFrame(() => {
2596
+ requestAnimationFrame(scrollToElement);
2597
+ });
2598
+ }, [active, behavior, elementRef]);
2599
+ }
2600
+
2601
+ // src/hooks/use-debounce.ts
2602
+ var import_react19 = require("react");
2603
+ function useDebounce(value, delayMs = 1e3, handleChange) {
2604
+ const onChange = useEvent(handleChange);
2605
+ const [debouncedValue, setDebouncedValue] = (0, import_react19.useState)(value);
2606
+ (0, import_react19.useEffect)(() => {
2607
+ const handler = setTimeout(() => {
2608
+ setDebouncedValue(value);
2609
+ }, delayMs);
2610
+ return () => {
2611
+ clearTimeout(handler);
2612
+ };
2613
+ }, [value, delayMs]);
2614
+ (0, import_react19.useEffect)(() => {
2615
+ onChange?.(debouncedValue);
2616
+ }, [debouncedValue, onChange]);
2617
+ return [debouncedValue, setDebouncedValue];
2618
+ }
2619
+
2620
+ // src/hooks/use-debounced-function.ts
2621
+ var import_react20 = require("react");
2622
+ function useDebouncedFunction(callback, delay) {
2623
+ const timerRef = (0, import_react20.useRef)();
2624
+ const immediateCalling = (0, import_react20.useRef)(false);
2625
+ const callbackFn = useEvent(callback);
2626
+ const throttled = (0, import_react20.useCallback)(
2627
+ (...args) => {
2628
+ clearTimeout(timerRef.current);
2629
+ if (immediateCalling.current) {
2630
+ immediateCalling.current = false;
2631
+ callbackFn?.(...args);
2632
+ } else {
2633
+ timerRef.current = setTimeout(() => {
2634
+ immediateCalling.current = false;
2635
+ callbackFn?.(...args);
2636
+ }, delay);
2637
+ }
2638
+ },
2639
+ [callbackFn, delay]
2640
+ );
2641
+ const immediate = (0, import_react20.useCallback)(() => {
2642
+ immediateCalling.current = true;
2643
+ }, []);
2644
+ return { throttled, immediate };
2645
+ }
2646
+
2647
+ // src/hooks/use-previous.ts
2648
+ var import_react21 = require("react");
2649
+ function usePrevious(value, defaultValue) {
2650
+ const ref = (0, import_react21.useRef)(defaultValue);
2651
+ (0, import_react21.useEffect)(() => {
2652
+ ref.current = isObject(value) ? { ...value } : value;
2653
+ }, [value]);
2654
+ return ref.current;
2655
+ }
2656
+
2657
+ // src/hooks/use-pagination.ts
2658
+ var import_react22 = require("react");
2659
+
2660
+ // src/storage/AbstractStorage.ts
2661
+ var AbstractStorage = class {
2662
+ static get(key) {
2663
+ if (!key) {
2664
+ throw new Error("The key is not valid");
2665
+ }
2666
+ return null;
2667
+ }
2668
+ static set(key, value) {
2669
+ if (!key) {
2670
+ throw new Error("The key is not valid");
2671
+ }
2672
+ if (!value) {
2673
+ throw new Error("The value not passed");
2674
+ }
2675
+ }
2676
+ static remove(key) {
2677
+ if (!key) {
2678
+ throw new Error("The key is not valid");
2679
+ }
2680
+ }
2681
+ static clear() {
2682
+ }
2683
+ };
2684
+ var AbstractStorage_default = AbstractStorage;
2685
+
2686
+ // src/storage/utils.ts
2687
+ function jsonParse(data) {
2688
+ try {
2689
+ if (data) {
2690
+ return JSON.parse(data);
2691
+ }
2692
+ return null;
2693
+ } catch {
2694
+ return data;
2695
+ }
2696
+ }
2697
+
2698
+ // src/storage/SessionStorage.ts
2699
+ var SessionStorage = class _SessionStorage extends AbstractStorage_default {
2700
+ static get(key) {
2701
+ const data = sessionStorage.getItem(key);
2702
+ return jsonParse(data);
2703
+ }
2704
+ static set(key, value) {
2705
+ if (value) {
2706
+ sessionStorage.setItem(key, JSON.stringify(value));
2707
+ }
2708
+ }
2709
+ static update(key, field, value) {
2710
+ const data = _SessionStorage.get(key);
2711
+ if (data) {
2712
+ data[field] = value;
2713
+ _SessionStorage.set(key, data);
2714
+ } else {
2715
+ _SessionStorage.set(key, { [field]: value });
2716
+ }
2717
+ }
2718
+ static remove(key) {
2719
+ sessionStorage.removeItem(key);
2720
+ }
2721
+ static clear() {
2722
+ sessionStorage.clear();
2723
+ }
2724
+ };
2725
+
2726
+ // src/hooks/use-pagination.ts
2727
+ var DEFAULT_PAGE_SIZE = 20;
2728
+ var DEFAULT_PAGE = 1;
2729
+ function usePagination(config) {
2730
+ const { key, defaultPageSize = DEFAULT_PAGE_SIZE, defaultPage = DEFAULT_PAGE } = config;
2731
+ const [state, setState] = (0, import_react22.useState)(() => {
2732
+ const stored = SessionStorage.get(`pagination-${key}`);
2733
+ if (stored) {
2734
+ return {
2735
+ page: stored.page || defaultPage,
2736
+ pageSize: stored.pageSize || defaultPageSize,
2737
+ totalItems: stored.totalItems || 0
2738
+ };
2739
+ }
2740
+ return {
2741
+ page: defaultPage,
2742
+ pageSize: defaultPageSize,
2743
+ totalItems: 0
2744
+ };
2745
+ });
2746
+ (0, import_react22.useEffect)(() => {
2747
+ SessionStorage.set(`pagination-${key}`, state);
2748
+ }, [key, state]);
2749
+ const pages = (0, import_react22.useMemo)(() => {
2750
+ return state.totalItems > 0 ? Math.ceil(state.totalItems / state.pageSize) : 0;
2751
+ }, [state.totalItems, state.pageSize]);
2752
+ const hasNextPage = (0, import_react22.useMemo)(() => state.page < pages, [state.page, pages]);
2753
+ const hasPreviousPage = (0, import_react22.useMemo)(() => state.page > 1, [state.page]);
2754
+ const startItem = (0, import_react22.useMemo)(() => {
2755
+ return state.totalItems === 0 ? 0 : (state.page - 1) * state.pageSize + 1;
2756
+ }, [state.page, state.pageSize, state.totalItems]);
2757
+ const endItem = (0, import_react22.useMemo)(() => {
2758
+ return Math.min(state.page * state.pageSize, state.totalItems);
2759
+ }, [state.page, state.pageSize, state.totalItems]);
2760
+ const isEmpty = (0, import_react22.useMemo)(() => state.totalItems === 0, [state.totalItems]);
2761
+ const setPage = (0, import_react22.useCallback)(
2762
+ (page) => {
2763
+ const clampedPage = Math.max(1, Math.min(page, pages || 1));
2764
+ setState((prev) => ({ ...prev, page: clampedPage }));
2765
+ },
2766
+ [pages]
2767
+ );
2768
+ const setPageSize = (0, import_react22.useCallback)((pageSize) => {
2769
+ const validPageSize = Math.max(1, pageSize);
2770
+ setState((prev) => {
2771
+ const currentFirstItem = (prev.page - 1) * prev.pageSize + 1;
2772
+ const newPage = Math.max(1, Math.ceil(currentFirstItem / validPageSize));
2773
+ return {
2774
+ ...prev,
2775
+ pageSize: validPageSize,
2776
+ page: newPage
2777
+ };
2778
+ });
2779
+ }, []);
2780
+ const setTotalItems = (0, import_react22.useCallback)((totalItems) => {
2781
+ const validTotalItems = Math.max(0, totalItems);
2782
+ setState((prev) => {
2783
+ const newPages = validTotalItems > 0 ? Math.ceil(validTotalItems / prev.pageSize) : 0;
2784
+ const clampedPage = prev.page > newPages && newPages > 0 ? newPages : prev.page;
2785
+ return {
2786
+ ...prev,
2787
+ totalItems: validTotalItems,
2788
+ page: clampedPage
2789
+ };
2790
+ });
2791
+ }, []);
2792
+ const nextPage = (0, import_react22.useCallback)(() => {
2793
+ setPage(state.page + 1);
2794
+ }, [setPage, state.page]);
2795
+ const previousPage = (0, import_react22.useCallback)(() => {
2796
+ setPage(state.page - 1);
2797
+ }, [setPage, state.page]);
2798
+ const goToFirstPage = (0, import_react22.useCallback)(() => {
2799
+ setPage(1);
2800
+ }, [setPage]);
2801
+ const goToLastPage = (0, import_react22.useCallback)(() => {
2802
+ setPage(pages);
2803
+ }, [setPage, pages]);
2804
+ const reset = (0, import_react22.useCallback)(() => {
2805
+ setState({
2806
+ page: defaultPage,
2807
+ pageSize: defaultPageSize,
2808
+ totalItems: 0
2809
+ });
2810
+ }, [defaultPage, defaultPageSize]);
2811
+ return {
2812
+ page: state.page,
2813
+ pageSize: state.pageSize,
2814
+ totalItems: state.totalItems,
2815
+ pages,
2816
+ setPage,
2817
+ setPageSize,
2818
+ setTotalItems,
2819
+ nextPage,
2820
+ previousPage,
2821
+ goToFirstPage,
2822
+ goToLastPage,
2823
+ reset,
2824
+ hasNextPage,
2825
+ hasPreviousPage,
2826
+ startItem,
2827
+ endItem,
2828
+ isEmpty
2829
+ };
2830
+ }
2831
+
2832
+ // src/hooks/use-timer.ts
2833
+ var import_react23 = require("react");
2834
+ var useTimer = ({ seconds }) => {
2835
+ const [timeLeft, setTimeLeft] = (0, import_react23.useState)(seconds);
2836
+ const [isTimerRunning, setIsTimerRunning] = (0, import_react23.useState)(true);
2837
+ (0, import_react23.useEffect)(() => {
2838
+ if (!isTimerRunning) return;
2839
+ const timer = setInterval(() => {
2840
+ setTimeLeft((prev) => {
2841
+ if (prev <= 1) {
2842
+ clearInterval(timer);
2843
+ setIsTimerRunning(false);
2844
+ return 0;
2845
+ }
2846
+ return prev - 1;
2847
+ });
2848
+ }, 1e3);
2849
+ return () => clearInterval(timer);
2850
+ }, [isTimerRunning]);
2851
+ const resetTimer = () => {
2852
+ setTimeLeft(seconds);
2853
+ setIsTimerRunning(true);
2854
+ };
2855
+ return {
2856
+ timeLeft,
2857
+ isTimerRunning,
2858
+ resetTimer
2859
+ };
2860
+ };
2861
+
2862
+ // src/hooks/use-timeout.ts
2863
+ var import_react24 = require("react");
2864
+ function useTimeout() {
2865
+ const timeoutRef = (0, import_react24.useRef)();
2866
+ const clearTimeoutRef = (0, import_react24.useCallback)(() => {
2867
+ clearTimeout(timeoutRef.current);
2868
+ timeoutRef.current = void 0;
2869
+ }, []);
2870
+ const scheduleTimeout = (0, import_react24.useCallback)(
2871
+ (callback, delay) => {
2872
+ clearTimeoutRef();
2873
+ timeoutRef.current = setTimeout(callback, delay);
2874
+ },
2875
+ [clearTimeoutRef]
2876
+ );
2877
+ (0, import_react24.useEffect)(() => clearTimeoutRef, [clearTimeoutRef]);
2878
+ return { scheduleTimeout, clearTimeoutRef };
2879
+ }
2880
+
2881
+ // src/hooks/use-hover.ts
2882
+ var import_react25 = require("react");
2883
+ function useHover() {
2884
+ const [isHovering, setIsHovering] = (0, import_react25.useState)(false);
2885
+ const handleMouseEnter = (0, import_react25.useCallback)(() => {
2886
+ setIsHovering(true);
2887
+ }, []);
2888
+ const handleMouseLeave = (0, import_react25.useCallback)(() => {
2889
+ setIsHovering(false);
2890
+ }, []);
2891
+ return {
2892
+ isHovering,
2893
+ handleMouseEnter,
2894
+ handleMouseLeave
2895
+ };
2896
+ }
2897
+
2307
2898
  // src/dialog/Dialog.tsx
2308
2899
  var import_jsx_runtime31 = require("react/jsx-runtime");
2309
2900
  function useIframeTitleFix(titleRef) {
2310
- React10.useEffect(() => {
2901
+ React11.useEffect(() => {
2311
2902
  if (!window.chekinCustomDocument) {
2312
2903
  return;
2313
2904
  }
@@ -2336,7 +2927,7 @@ function DialogClose({ ...props }) {
2336
2927
  }
2337
2928
  var dialogOverlayClasses = "fixed inset-0 z-50 bg-[var(--dialog-overlay-bg)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0";
2338
2929
  var scrollableOverlayClasses = "fixed inset-0 z-50 flex flex-col items-center overflow-y-auto overscroll-none pb-[19px] pt-[20px]";
2339
- var DialogOverlay = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2930
+ var DialogOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2340
2931
  DialogPrimitive.Overlay,
2341
2932
  {
2342
2933
  ref,
@@ -2348,7 +2939,7 @@ var DialogOverlay = React10.forwardRef(({ className, ...props }, ref) => /* @__P
2348
2939
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
2349
2940
  var dialogContentClasses = "relative z-50 my-auto w-full max-w-[calc(100%-2rem)] rounded-[var(--dialog-content-radius)] border border-[var(--dialog-content-border)] bg-[var(--dialog-content-bg)] p-6 text-[var(--dialog-content-text)] shadow-lg duration-200 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 sm:max-w-2xl";
2350
2941
  var dialogCloseButtonClasses = "absolute right-4 top-4 rounded-[var(--dialog-close-radius)] opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:shadow-chekin-focus disabled:pointer-events-none [&_svg:not([class*=size-])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0";
2351
- var DialogContent = React10.forwardRef(
2942
+ var DialogContent = React11.forwardRef(
2352
2943
  ({ className, showCloseButton = true, children, container, lockScroll = true, ...props }, ref) => {
2353
2944
  const contentElement = /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2354
2945
  DialogPrimitive.Content,
@@ -2396,8 +2987,8 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_r
2396
2987
  }
2397
2988
  );
2398
2989
  DialogFooter.displayName = "DialogFooter";
2399
- var DialogTitle = React10.forwardRef(({ className, ...props }, ref) => {
2400
- const titleRef = React10.useRef(null);
2990
+ var DialogTitle = React11.forwardRef(({ className, ...props }, ref) => {
2991
+ const titleRef = React11.useRef(null);
2401
2992
  const combinedRef = useCombinedRef(titleRef, ref);
2402
2993
  useIframeTitleFix(titleRef);
2403
2994
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
@@ -2411,7 +3002,7 @@ var DialogTitle = React10.forwardRef(({ className, ...props }, ref) => {
2411
3002
  );
2412
3003
  });
2413
3004
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
2414
- var DialogDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3005
+ var DialogDescription = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2415
3006
  DialogPrimitive.Description,
2416
3007
  {
2417
3008
  ref,
@@ -2473,9 +3064,9 @@ function ConfirmationDialog({
2473
3064
  }
2474
3065
 
2475
3066
  // src/default-select-trigger/DefaultSelectTrigger.tsx
2476
- var React11 = __toESM(require("react"), 1);
3067
+ var React12 = __toESM(require("react"), 1);
2477
3068
  var import_jsx_runtime33 = require("react/jsx-runtime");
2478
- var DefaultSelectTrigger = React11.forwardRef(
3069
+ var DefaultSelectTrigger = React12.forwardRef(
2479
3070
  ({
2480
3071
  className,
2481
3072
  disabled,
@@ -2539,17 +3130,17 @@ function DownloadEntryFormsButton({
2539
3130
  }
2540
3131
 
2541
3132
  // src/dropdown-button/DropdownButton.tsx
2542
- var import_react9 = require("react");
3133
+ var import_react26 = require("react");
2543
3134
 
2544
3135
  // src/dropdown-menu/DropdownMenu.tsx
2545
- var React12 = __toESM(require("react"), 1);
3136
+ var React13 = __toESM(require("react"), 1);
2546
3137
  var RadixMenu = __toESM(require("@radix-ui/react-dropdown-menu"), 1);
2547
3138
  var import_jsx_runtime35 = require("react/jsx-runtime");
2548
3139
  var DropdownMenu = RadixMenu.Root;
2549
3140
  var DropdownMenuTrigger = RadixMenu.Trigger;
2550
3141
  var DropdownMenuPortal = RadixMenu.Portal;
2551
3142
  var DropdownMenuGroup = RadixMenu.Group;
2552
- var DropdownMenuContent = React12.forwardRef(({ className, sideOffset = 6, container, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixMenu.Portal, { container: container || getCustomContainer(), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3143
+ var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 6, container, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixMenu.Portal, { container: container || getCustomContainer(), children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2553
3144
  RadixMenu.Content,
2554
3145
  {
2555
3146
  ref,
@@ -2570,9 +3161,9 @@ var itemClasses = [
2570
3161
  "data-[highlighted]:bg-chekin-surface-pressed data-[highlighted]:text-chekin-blue",
2571
3162
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-30"
2572
3163
  ];
2573
- var DropdownMenuItem = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixMenu.Item, { ref, className: cn(itemClasses, className), ...props }));
3164
+ var DropdownMenuItem = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RadixMenu.Item, { ref, className: cn(itemClasses, className), ...props }));
2574
3165
  DropdownMenuItem.displayName = "DropdownMenuItem";
2575
- var DropdownMenuLabel = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3166
+ var DropdownMenuLabel = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2576
3167
  RadixMenu.Label,
2577
3168
  {
2578
3169
  ref,
@@ -2584,7 +3175,7 @@ var DropdownMenuLabel = React12.forwardRef(({ className, ...props }, ref) => /*
2584
3175
  }
2585
3176
  ));
2586
3177
  DropdownMenuLabel.displayName = "DropdownMenuLabel";
2587
- var DropdownMenuSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3178
+ var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2588
3179
  RadixMenu.Separator,
2589
3180
  {
2590
3181
  ref,
@@ -2603,7 +3194,7 @@ function DropdownButton({
2603
3194
  modal,
2604
3195
  className
2605
3196
  }) {
2606
- const [isOpen, setIsOpen] = (0, import_react9.useState)(false);
3197
+ const [isOpen, setIsOpen] = (0, import_react26.useState)(false);
2607
3198
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(DropdownMenu, { onOpenChange: setIsOpen, modal, children: [
2608
3199
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownMenuTrigger, { asChild: true, children: typeof trigger === "function" ? trigger(isOpen) : trigger }),
2609
3200
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
@@ -2730,7 +3321,7 @@ var import_lucide_react12 = require("lucide-react");
2730
3321
  var import_react_i18next7 = require("react-i18next");
2731
3322
 
2732
3323
  // src/halo-icon/HaloIcon.tsx
2733
- var import_react10 = require("react");
3324
+ var import_react27 = require("react");
2734
3325
 
2735
3326
  // src/halo-icon/constants.ts
2736
3327
  var HALO_ICON_STATUS = {
@@ -2760,7 +3351,7 @@ var statusStyles = {
2760
3351
  color: "text-chekin-red"
2761
3352
  }
2762
3353
  };
2763
- var HaloIcon = (0, import_react10.forwardRef)(
3354
+ var HaloIcon = (0, import_react27.forwardRef)(
2764
3355
  ({
2765
3356
  children,
2766
3357
  variant = "default",
@@ -2816,9 +3407,9 @@ function EmptySectionPlaceholder({
2816
3407
  }
2817
3408
 
2818
3409
  // src/external-link/ExternalLink.tsx
2819
- var React13 = __toESM(require("react"), 1);
3410
+ var React14 = __toESM(require("react"), 1);
2820
3411
  var import_jsx_runtime45 = require("react/jsx-runtime");
2821
- var ExternalLink = React13.forwardRef(
3412
+ var ExternalLink = React14.forwardRef(
2822
3413
  ({ className, children, showIcon = true, target = "_blank", rel, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
2823
3414
  "a",
2824
3415
  {
@@ -2863,33 +3454,8 @@ ExternalLink.displayName = "ExternalLink";
2863
3454
  var import_react_i18next9 = require("react-i18next");
2864
3455
  var import_lucide_react14 = require("lucide-react");
2865
3456
 
2866
- // src/lib/use-modal-controls.ts
2867
- var import_react11 = require("react");
2868
- function useModalControls(initState = false, { disabled } = {}) {
2869
- const [isOpen, setIsOpen] = (0, import_react11.useState)(initState);
2870
- const openModal = (0, import_react11.useCallback)(() => {
2871
- if (disabled) return;
2872
- setIsOpen(true);
2873
- }, [disabled]);
2874
- const closeModal = (0, import_react11.useCallback)(() => {
2875
- if (disabled) return;
2876
- setIsOpen(false);
2877
- }, [disabled]);
2878
- const toggleModal = (0, import_react11.useCallback)(() => {
2879
- if (disabled) return;
2880
- setIsOpen((value) => !value);
2881
- }, [disabled]);
2882
- return {
2883
- isOpen,
2884
- openModal,
2885
- closeModal,
2886
- toggleModal,
2887
- setIsOpen
2888
- };
2889
- }
2890
-
2891
3457
  // src/switch/Switch.tsx
2892
- var React14 = __toESM(require("react"), 1);
3458
+ var React15 = __toESM(require("react"), 1);
2893
3459
  var SwitchPrimitives = __toESM(require("@radix-ui/react-switch"), 1);
2894
3460
  var import_class_variance_authority7 = require("class-variance-authority");
2895
3461
  var import_jsx_runtime46 = require("react/jsx-runtime");
@@ -2931,9 +3497,9 @@ var switchThumbVariants = (0, import_class_variance_authority7.cva)(
2931
3497
  }
2932
3498
  }
2933
3499
  );
2934
- var Switch = React14.forwardRef(
3500
+ var Switch = React15.forwardRef(
2935
3501
  ({ className, size, readOnly, loading, onChange, value, id, label, error, ...props }, ref) => {
2936
- const generatedId = React14.useId();
3502
+ const generatedId = React15.useId();
2937
3503
  const fieldId = id || generatedId;
2938
3504
  const switchElement = /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
2939
3505
  SwitchPrimitives.Root,
@@ -2957,40 +3523,18 @@ var Switch = React14.forwardRef(
2957
3523
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
2958
3524
  /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex items-center gap-3", children: [
2959
3525
  switchElement,
2960
- label && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Label, { htmlFor: fieldId, className: "cursor-pointer font-medium", children: label })
2961
- ] }),
2962
- error && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ErrorMessage, { disabled: props.disabled, children: error })
2963
- ] });
2964
- }
2965
- );
2966
- Switch.displayName = SwitchPrimitives.Root.displayName;
2967
-
2968
- // src/video-player/VideoPlayer.tsx
2969
- var import_react13 = require("react");
2970
- var import_react_i18next8 = require("react-i18next");
2971
- var import_lucide_react13 = require("lucide-react");
2972
-
2973
- // src/lib/use-click-escape.ts
2974
- var import_react12 = require("react");
2975
- function useClickEscape({ enabled = true, onClick }) {
2976
- const onClickRef = (0, import_react12.useRef)(onClick);
2977
- (0, import_react12.useEffect)(() => {
2978
- onClickRef.current = onClick;
2979
- }, [onClick]);
2980
- (0, import_react12.useEffect)(() => {
2981
- const handleKeyDown = (event) => {
2982
- if (event.key === "Escape" && enabled) {
2983
- onClickRef.current?.();
2984
- }
2985
- };
2986
- window.addEventListener("keydown", handleKeyDown);
2987
- return () => {
2988
- window.removeEventListener("keydown", handleKeyDown);
2989
- };
2990
- }, [enabled]);
2991
- }
3526
+ label && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Label, { htmlFor: fieldId, className: "cursor-pointer font-medium", children: label })
3527
+ ] }),
3528
+ error && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(ErrorMessage, { disabled: props.disabled, children: error })
3529
+ ] });
3530
+ }
3531
+ );
3532
+ Switch.displayName = SwitchPrimitives.Root.displayName;
2992
3533
 
2993
3534
  // src/video-player/VideoPlayer.tsx
3535
+ var import_react28 = require("react");
3536
+ var import_react_i18next8 = require("react-i18next");
3537
+ var import_lucide_react13 = require("lucide-react");
2994
3538
  var import_jsx_runtime47 = require("react/jsx-runtime");
2995
3539
  function VideoPlayer({
2996
3540
  src,
@@ -3001,20 +3545,20 @@ function VideoPlayer({
3001
3545
  autoPlay = false
3002
3546
  }) {
3003
3547
  const { t } = (0, import_react_i18next8.useTranslation)();
3004
- const videoRef = (0, import_react13.useRef)(null);
3005
- const iframeRef = (0, import_react13.useRef)(null);
3006
- const containerRef = (0, import_react13.useRef)(null);
3007
- const [isPlaying, setIsPlaying] = (0, import_react13.useState)(false);
3008
- const [isMuted, setIsMuted] = (0, import_react13.useState)(false);
3009
- const [currentTime, setCurrentTime] = (0, import_react13.useState)(0);
3010
- const [duration, setDuration] = (0, import_react13.useState)(0);
3011
- const [isFullScreenMode, setIsFullScreenMode] = (0, import_react13.useState)(isFullScreen);
3012
- const [isLoading, setIsLoading] = (0, import_react13.useState)(true);
3013
- const [videoSource, setVideoSource] = (0, import_react13.useState)("file");
3014
- const [youtubeEmbedUrl, setYoutubeEmbedUrl] = (0, import_react13.useState)("");
3015
- const [vimeoEmbedUrl, setVimeoEmbedUrl] = (0, import_react13.useState)("");
3548
+ const videoRef = (0, import_react28.useRef)(null);
3549
+ const iframeRef = (0, import_react28.useRef)(null);
3550
+ const containerRef = (0, import_react28.useRef)(null);
3551
+ const [isPlaying, setIsPlaying] = (0, import_react28.useState)(false);
3552
+ const [isMuted, setIsMuted] = (0, import_react28.useState)(false);
3553
+ const [currentTime, setCurrentTime] = (0, import_react28.useState)(0);
3554
+ const [duration, setDuration] = (0, import_react28.useState)(0);
3555
+ const [isFullScreenMode, setIsFullScreenMode] = (0, import_react28.useState)(isFullScreen);
3556
+ const [isLoading, setIsLoading] = (0, import_react28.useState)(true);
3557
+ const [videoSource, setVideoSource] = (0, import_react28.useState)("file");
3558
+ const [youtubeEmbedUrl, setYoutubeEmbedUrl] = (0, import_react28.useState)("");
3559
+ const [vimeoEmbedUrl, setVimeoEmbedUrl] = (0, import_react28.useState)("");
3016
3560
  useClickEscape({ enabled: isFullScreenMode, onClick: onClose });
3017
- (0, import_react13.useEffect)(() => {
3561
+ (0, import_react28.useEffect)(() => {
3018
3562
  const youtubeRegex = /(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/;
3019
3563
  const vimeoRegex = /(?:vimeo\.com\/|vimeo\.com\/video\/)(\d+)/;
3020
3564
  const youtubeMatch = src.match(youtubeRegex);
@@ -3043,7 +3587,7 @@ function VideoPlayer({
3043
3587
  setYoutubeEmbedUrl("");
3044
3588
  setVimeoEmbedUrl("");
3045
3589
  }, [src, autoPlay]);
3046
- (0, import_react13.useEffect)(() => {
3590
+ (0, import_react28.useEffect)(() => {
3047
3591
  if (videoSource !== "file") return;
3048
3592
  const video = videoRef.current;
3049
3593
  if (!video) return;
@@ -3071,7 +3615,7 @@ function VideoPlayer({
3071
3615
  video.removeEventListener("canplay", handleCanPlay);
3072
3616
  };
3073
3617
  }, [videoSource]);
3074
- (0, import_react13.useEffect)(() => {
3618
+ (0, import_react28.useEffect)(() => {
3075
3619
  if (isFullScreenMode && videoRef.current && videoSource === "file") {
3076
3620
  void videoRef.current.play();
3077
3621
  setIsPlaying(true);
@@ -3348,10 +3892,10 @@ function FeatureCard({
3348
3892
  }
3349
3893
 
3350
3894
  // src/file-input-button/FileInputButton.tsx
3351
- var import_react14 = require("react");
3895
+ var import_react29 = require("react");
3352
3896
  var import_lucide_react15 = require("lucide-react");
3353
3897
  var import_jsx_runtime49 = require("react/jsx-runtime");
3354
- var FileInputButton = (0, import_react14.forwardRef)(
3898
+ var FileInputButton = (0, import_react29.forwardRef)(
3355
3899
  ({
3356
3900
  label,
3357
3901
  onChange,
@@ -3363,7 +3907,7 @@ var FileInputButton = (0, import_react14.forwardRef)(
3363
3907
  size = "default",
3364
3908
  ...props
3365
3909
  }, ref) => {
3366
- const handleChange = (0, import_react14.useCallback)(
3910
+ const handleChange = (0, import_react29.useCallback)(
3367
3911
  (event) => {
3368
3912
  onChange?.(event);
3369
3913
  event.target.value = "";
@@ -3443,7 +3987,7 @@ var FormBox = {
3443
3987
  };
3444
3988
 
3445
3989
  // src/free-text-field/FreeTextField.tsx
3446
- var import_react15 = require("react");
3990
+ var import_react30 = require("react");
3447
3991
  var import_react_i18next10 = require("react-i18next");
3448
3992
 
3449
3993
  // src/free-text-field/styles.module.css
@@ -3451,7 +3995,7 @@ var styles_default3 = {};
3451
3995
 
3452
3996
  // src/free-text-field/FreeTextField.tsx
3453
3997
  var import_jsx_runtime54 = require("react/jsx-runtime");
3454
- var FreeTextField = (0, import_react15.forwardRef)(
3998
+ var FreeTextField = (0, import_react30.forwardRef)(
3455
3999
  ({
3456
4000
  label,
3457
4001
  error,
@@ -3473,9 +4017,9 @@ var FreeTextField = (0, import_react15.forwardRef)(
3473
4017
  ...inputProps
3474
4018
  }, ref) => {
3475
4019
  const { t } = (0, import_react_i18next10.useTranslation)();
3476
- const inputId = (0, import_react15.useId)();
3477
- const [internalValue, setInternalValue] = (0, import_react15.useState)(defaultValue ?? "");
3478
- const [isFocused, setIsFocused] = (0, import_react15.useState)(false);
4020
+ const inputId = (0, import_react30.useId)();
4021
+ const [internalValue, setInternalValue] = (0, import_react30.useState)(defaultValue ?? "");
4022
+ const [isFocused, setIsFocused] = (0, import_react30.useState)(false);
3479
4023
  const currentValue = value !== void 0 ? value : internalValue;
3480
4024
  const isEmpty = !currentValue || String(currentValue).length === 0;
3481
4025
  const hasError = Boolean(error);
@@ -3559,7 +4103,7 @@ var FreeTextField = (0, import_react15.forwardRef)(
3559
4103
  FreeTextField.displayName = "FreeTextField";
3560
4104
 
3561
4105
  // src/framed-icon/FramedIcon.tsx
3562
- var React15 = __toESM(require("react"), 1);
4106
+ var React16 = __toESM(require("react"), 1);
3563
4107
  var import_class_variance_authority8 = require("class-variance-authority");
3564
4108
  var import_jsx_runtime55 = require("react/jsx-runtime");
3565
4109
  var framedIconVariants = (0, import_class_variance_authority8.cva)("inline-flex items-center justify-center shrink-0", {
@@ -3583,7 +4127,7 @@ var framedIconVariants = (0, import_class_variance_authority8.cva)("inline-flex
3583
4127
  },
3584
4128
  defaultVariants: { size: "m", shape: "rounded", tone: "info" }
3585
4129
  });
3586
- var FramedIcon = React15.forwardRef(
4130
+ var FramedIcon = React16.forwardRef(
3587
4131
  ({ className, size, shape, tone, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3588
4132
  "span",
3589
4133
  {
@@ -3598,9 +4142,9 @@ var FramedIcon = React15.forwardRef(
3598
4142
  FramedIcon.displayName = "FramedIcon";
3599
4143
 
3600
4144
  // src/grid-items/GridItems.tsx
3601
- var import_react16 = require("react");
4145
+ var import_react31 = require("react");
3602
4146
  var import_jsx_runtime56 = require("react/jsx-runtime");
3603
- var GridItems = (0, import_react16.forwardRef)(
4147
+ var GridItems = (0, import_react31.forwardRef)(
3604
4148
  ({ children, title, placeholder, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
3605
4149
  "div",
3606
4150
  {
@@ -3677,9 +4221,9 @@ function HelpTooltip({
3677
4221
  }
3678
4222
 
3679
4223
  // src/icon/Icon.tsx
3680
- var import_react17 = require("react");
4224
+ var import_react32 = require("react");
3681
4225
  var import_jsx_runtime58 = require("react/jsx-runtime");
3682
- var MissingIcon = (0, import_react17.forwardRef)(
4226
+ var MissingIcon = (0, import_react32.forwardRef)(
3683
4227
  ({ size = 24, className = "", fallback = null, color, ...props }, ref) => {
3684
4228
  if (fallback) {
3685
4229
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: fallback });
@@ -3708,8 +4252,8 @@ var MissingIcon = (0, import_react17.forwardRef)(
3708
4252
  }
3709
4253
  );
3710
4254
  MissingIcon.displayName = "MissingIcon";
3711
- var Icon = (0, import_react17.memo)(
3712
- (0, import_react17.forwardRef)(
4255
+ var Icon = (0, import_react32.memo)(
4256
+ (0, import_react32.forwardRef)(
3713
4257
  ({ name: _name, size = 24, className = "", fallback = null, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
3714
4258
  MissingIcon,
3715
4259
  {
@@ -3745,7 +4289,7 @@ var IconRegistry = class {
3745
4289
  var RegistryIcon = Icon;
3746
4290
 
3747
4291
  // src/icon-button/IconButton.tsx
3748
- var React16 = __toESM(require("react"), 1);
4292
+ var React17 = __toESM(require("react"), 1);
3749
4293
  var import_class_variance_authority9 = require("class-variance-authority");
3750
4294
  var import_jsx_runtime59 = require("react/jsx-runtime");
3751
4295
  var iconButtonVariants = (0, import_class_variance_authority9.cva)(
@@ -3776,7 +4320,7 @@ var iconButtonVariants = (0, import_class_variance_authority9.cva)(
3776
4320
  defaultVariants: { size: "m", shape: "rounded", variant: "secondary" }
3777
4321
  }
3778
4322
  );
3779
- var IconButton = React16.forwardRef(
4323
+ var IconButton = React17.forwardRef(
3780
4324
  ({ className, size, shape, variant, label, children, type = "button", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
3781
4325
  "button",
3782
4326
  {
@@ -3807,7 +4351,7 @@ function InfoBox({ className, children }) {
3807
4351
  }
3808
4352
 
3809
4353
  // src/image/Image.tsx
3810
- var import_react18 = require("react");
4354
+ var import_react33 = require("react");
3811
4355
  var import_jsx_runtime61 = require("react/jsx-runtime");
3812
4356
  function Image2({
3813
4357
  src,
@@ -3816,7 +4360,7 @@ function Image2({
3816
4360
  fallbackSrc = "https://placehold.co/600x400?text=Image",
3817
4361
  ...props
3818
4362
  }) {
3819
- const [error, setError] = (0, import_react18.useState)(false);
4363
+ const [error, setError] = (0, import_react33.useState)(false);
3820
4364
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
3821
4365
  "img",
3822
4366
  {
@@ -3831,9 +4375,9 @@ function Image2({
3831
4375
  }
3832
4376
 
3833
4377
  // src/input/Input.tsx
3834
- var React17 = __toESM(require("react"), 1);
4378
+ var React18 = __toESM(require("react"), 1);
3835
4379
  var import_jsx_runtime62 = require("react/jsx-runtime");
3836
- var Input = React17.forwardRef(
4380
+ var Input = React18.forwardRef(
3837
4381
  ({ className, type, readOnly, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
3838
4382
  "input",
3839
4383
  {
@@ -3857,13 +4401,13 @@ var Input = React17.forwardRef(
3857
4401
  Input.displayName = "Input";
3858
4402
 
3859
4403
  // src/input-otp/InputOTP.tsx
3860
- var React18 = __toESM(require("react"), 1);
4404
+ var React19 = __toESM(require("react"), 1);
3861
4405
 
3862
4406
  // src/input-otp/InputOTPContext.ts
3863
- var import_react19 = require("react");
3864
- var InputOTPContext = (0, import_react19.createContext)(null);
4407
+ var import_react34 = require("react");
4408
+ var InputOTPContext = (0, import_react34.createContext)(null);
3865
4409
  function useInputOTPContext() {
3866
- const ctx = (0, import_react19.useContext)(InputOTPContext);
4410
+ const ctx = (0, import_react34.useContext)(InputOTPContext);
3867
4411
  if (!ctx) {
3868
4412
  throw new Error("InputOTP compound components must be used within <InputOTP>");
3869
4413
  }
@@ -3875,7 +4419,7 @@ function extractDigits(str) {
3875
4419
  }
3876
4420
 
3877
4421
  // src/input-otp/useInputOTP.ts
3878
- var import_react20 = require("react");
4422
+ var import_react35 = require("react");
3879
4423
  function useInputOTP({
3880
4424
  maxLength,
3881
4425
  value,
@@ -3884,12 +4428,12 @@ function useInputOTP({
3884
4428
  autoFocus,
3885
4429
  error
3886
4430
  }) {
3887
- const [activeIndex, setActiveIndex] = (0, import_react20.useState)(-1);
3888
- const inputRefs = (0, import_react20.useRef)([]);
3889
- const containerRef = (0, import_react20.useRef)(null);
3890
- const blurTimeoutRef = (0, import_react20.useRef)();
3891
- const slotsRef = (0, import_react20.useRef)(Array.from({ length: maxLength }, () => ""));
3892
- const slots = (0, import_react20.useMemo)(() => {
4431
+ const [activeIndex, setActiveIndex] = (0, import_react35.useState)(-1);
4432
+ const inputRefs = (0, import_react35.useRef)([]);
4433
+ const containerRef = (0, import_react35.useRef)(null);
4434
+ const blurTimeoutRef = (0, import_react35.useRef)();
4435
+ const slotsRef = (0, import_react35.useRef)(Array.from({ length: maxLength }, () => ""));
4436
+ const slots = (0, import_react35.useMemo)(() => {
3893
4437
  const nextSlots = Array.from({ length: maxLength }, () => "");
3894
4438
  for (let index = 0; index < Math.min(value.length, maxLength); index += 1) {
3895
4439
  const char = value[index];
@@ -3900,7 +4444,7 @@ function useInputOTP({
3900
4444
  return nextSlots;
3901
4445
  }, [value, maxLength]);
3902
4446
  slotsRef.current = slots;
3903
- const emitValue = (0, import_react20.useCallback)(
4447
+ const emitValue = (0, import_react35.useCallback)(
3904
4448
  (newSlots) => {
3905
4449
  let lastFilledIndex = -1;
3906
4450
  for (let index = newSlots.length - 1; index >= 0; index -= 1) {
@@ -3921,12 +4465,12 @@ function useInputOTP({
3921
4465
  },
3922
4466
  [onChange]
3923
4467
  );
3924
- (0, import_react20.useEffect)(() => {
4468
+ (0, import_react35.useEffect)(() => {
3925
4469
  if (autoFocus && inputRefs.current[0]) {
3926
4470
  inputRefs.current[0].focus();
3927
4471
  }
3928
4472
  }, [autoFocus]);
3929
- const handleContainerFocusIn = (0, import_react20.useCallback)((event) => {
4473
+ const handleContainerFocusIn = (0, import_react35.useCallback)((event) => {
3930
4474
  clearTimeout(blurTimeoutRef.current);
3931
4475
  const target = event.target;
3932
4476
  const slotIndex = inputRefs.current.indexOf(target);
@@ -3934,7 +4478,7 @@ function useInputOTP({
3934
4478
  setActiveIndex(slotIndex);
3935
4479
  }
3936
4480
  }, []);
3937
- const handleContainerFocusOut = (0, import_react20.useCallback)(() => {
4481
+ const handleContainerFocusOut = (0, import_react35.useCallback)(() => {
3938
4482
  clearTimeout(blurTimeoutRef.current);
3939
4483
  blurTimeoutRef.current = setTimeout(() => {
3940
4484
  if (!containerRef.current?.contains(document.activeElement)) {
@@ -3942,8 +4486,8 @@ function useInputOTP({
3942
4486
  }
3943
4487
  }, 0);
3944
4488
  }, []);
3945
- (0, import_react20.useEffect)(() => () => clearTimeout(blurTimeoutRef.current), []);
3946
- const handleDigitInput = (0, import_react20.useCallback)(
4489
+ (0, import_react35.useEffect)(() => () => clearTimeout(blurTimeoutRef.current), []);
4490
+ const handleDigitInput = (0, import_react35.useCallback)(
3947
4491
  (index, digit) => {
3948
4492
  if (!DIGIT_REGEX.test(digit)) return;
3949
4493
  const newSlots = [...slotsRef.current];
@@ -3957,7 +4501,7 @@ function useInputOTP({
3957
4501
  },
3958
4502
  [maxLength, emitValue]
3959
4503
  );
3960
- const handleDelete = (0, import_react20.useCallback)(
4504
+ const handleDelete = (0, import_react35.useCallback)(
3961
4505
  (index) => {
3962
4506
  const newSlots = [...slotsRef.current];
3963
4507
  if (newSlots[index]) {
@@ -3972,7 +4516,7 @@ function useInputOTP({
3972
4516
  },
3973
4517
  [emitValue]
3974
4518
  );
3975
- const handlePaste = (0, import_react20.useCallback)(
4519
+ const handlePaste = (0, import_react35.useCallback)(
3976
4520
  (text) => {
3977
4521
  const digits = extractDigits(text).slice(0, maxLength);
3978
4522
  if (digits.length > 0) {
@@ -3988,7 +4532,7 @@ function useInputOTP({
3988
4532
  },
3989
4533
  [maxLength, emitValue]
3990
4534
  );
3991
- const contextValue = (0, import_react20.useMemo)(
4535
+ const contextValue = (0, import_react35.useMemo)(
3992
4536
  () => ({
3993
4537
  slots,
3994
4538
  activeIndex,
@@ -4021,7 +4565,7 @@ function useInputOTP({
4021
4565
  }
4022
4566
 
4023
4567
  // src/input-otp/useInputOTPSlot.ts
4024
- var import_react21 = require("react");
4568
+ var import_react36 = require("react");
4025
4569
  function useInputOTPSlot(index) {
4026
4570
  const {
4027
4571
  slots,
@@ -4091,13 +4635,13 @@ function useInputOTPSlot(index) {
4091
4635
  event.preventDefault();
4092
4636
  handlePaste(event.clipboardData.getData("text/plain"));
4093
4637
  };
4094
- const setInputRef = (0, import_react21.useCallback)(
4638
+ const setInputRef = (0, import_react36.useCallback)(
4095
4639
  (element) => {
4096
4640
  inputRefs.current[index] = element;
4097
4641
  },
4098
4642
  [index, inputRefs]
4099
4643
  );
4100
- const focusSlot = (0, import_react21.useCallback)(() => {
4644
+ const focusSlot = (0, import_react36.useCallback)(() => {
4101
4645
  inputRefs.current[index]?.focus();
4102
4646
  }, [index, inputRefs]);
4103
4647
  return {
@@ -4140,11 +4684,11 @@ function InputOTP({
4140
4684
  }
4141
4685
  ) });
4142
4686
  }
4143
- var InputOTPGroup = React18.forwardRef(
4687
+ var InputOTPGroup = React19.forwardRef(
4144
4688
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { ref, className: cn("flex items-center", className), ...props })
4145
4689
  );
4146
4690
  InputOTPGroup.displayName = "InputOTPGroup";
4147
- var InputOTPSlot = React18.forwardRef(
4691
+ var InputOTPSlot = React19.forwardRef(
4148
4692
  ({ index, className, ...props }, ref) => {
4149
4693
  const {
4150
4694
  char,
@@ -4193,13 +4737,13 @@ var InputOTPSlot = React18.forwardRef(
4193
4737
  }
4194
4738
  );
4195
4739
  InputOTPSlot.displayName = "InputOTPSlot";
4196
- var InputOTPSeparator = React18.forwardRef(
4740
+ var InputOTPSeparator = React19.forwardRef(
4197
4741
  (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { ref, role: "separator", ...props })
4198
4742
  );
4199
4743
  InputOTPSeparator.displayName = "InputOTPSeparator";
4200
4744
 
4201
4745
  // src/icons-dropdown/IconsDropdown.tsx
4202
- var import_react22 = require("react");
4746
+ var import_react37 = require("react");
4203
4747
  var import_jsx_runtime64 = require("react/jsx-runtime");
4204
4748
  function IconsDropdown({
4205
4749
  icons,
@@ -4211,7 +4755,7 @@ function IconsDropdown({
4211
4755
  defaultOpen,
4212
4756
  onOpenChange: onOpenChangeProp
4213
4757
  }) {
4214
- const [open, setOpen] = (0, import_react22.useState)(defaultOpen ?? false);
4758
+ const [open, setOpen] = (0, import_react37.useState)(defaultOpen ?? false);
4215
4759
  function handleOpenChange(value) {
4216
4760
  setOpen(value);
4217
4761
  onOpenChangeProp?.(value);
@@ -4794,9 +5338,9 @@ function LearnMoreButton({ label, ...props }) {
4794
5338
  }
4795
5339
 
4796
5340
  // src/link/Link.tsx
4797
- var import_react23 = require("react");
5341
+ var import_react38 = require("react");
4798
5342
  var import_jsx_runtime68 = require("react/jsx-runtime");
4799
- var LinkInternal = (0, import_react23.forwardRef)(
5343
+ var LinkInternal = (0, import_react38.forwardRef)(
4800
5344
  ({ disabled = false, className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4801
5345
  "a",
4802
5346
  {
@@ -4815,17 +5359,17 @@ var LinkInternal = (0, import_react23.forwardRef)(
4815
5359
  )
4816
5360
  );
4817
5361
  LinkInternal.displayName = "Link";
4818
- var Link = (0, import_react23.memo)(LinkInternal);
5362
+ var Link = (0, import_react38.memo)(LinkInternal);
4819
5363
 
4820
5364
  // src/image-full-screen-view/ImageFullScreenView.tsx
4821
- var import_react24 = require("react");
5365
+ var import_react39 = require("react");
4822
5366
  var import_lucide_react20 = require("lucide-react");
4823
5367
  var import_react_i18next13 = require("react-i18next");
4824
5368
  var import_jsx_runtime69 = require("react/jsx-runtime");
4825
5369
  function ImageFullScreenView({ src, alt, onClose }) {
4826
5370
  const { t } = (0, import_react_i18next13.useTranslation)();
4827
- const [scale, setScale] = (0, import_react24.useState)(1);
4828
- const [rotation, setRotation] = (0, import_react24.useState)(0);
5371
+ const [scale, setScale] = (0, import_react39.useState)(1);
5372
+ const [rotation, setRotation] = (0, import_react39.useState)(0);
4829
5373
  useClickEscape({ onClick: onClose });
4830
5374
  const zoomIn = () => setScale((value) => Math.min(value + 0.25, 3));
4831
5375
  const zoomOut = () => setScale((value) => Math.max(value - 0.25, 0.5));
@@ -5023,55 +5567,9 @@ var METRIC_CARD_VARIANTS = {
5023
5567
  };
5024
5568
 
5025
5569
  // src/modal/Modal.tsx
5026
- var import_react26 = require("react");
5570
+ var import_react40 = require("react");
5027
5571
  var import_lucide_react23 = require("lucide-react");
5028
5572
 
5029
- // src/lib/use-scroll-frame-into-view.ts
5030
- var import_react25 = require("react");
5031
-
5032
- // src/lib/runtimeSettings.ts
5033
- function getChekinRuntimeSettings() {
5034
- return window.ChekinProSettings || window.ChekinHousingsSDKSettings || {};
5035
- }
5036
- function isMobileModalModeAvailable() {
5037
- const settings = getChekinRuntimeSettings();
5038
- return !settings.autoHeight;
5039
- }
5040
-
5041
- // src/lib/use-scroll-frame-into-view.ts
5042
- function useScrollFrameIntoView(active, options = {}) {
5043
- const { behavior = "smooth", elementRef } = options;
5044
- (0, import_react25.useEffect)(() => {
5045
- const sdkWindow = window;
5046
- if (!active || !getChekinRuntimeSettings()?.autoHeight) {
5047
- return;
5048
- }
5049
- const frame = sdkWindow.chekinCustomFrame;
5050
- if (!frame) {
5051
- return;
5052
- }
5053
- const parentWindow = window.parent;
5054
- const scrollToElement = () => {
5055
- const frameRect = frame.getBoundingClientRect();
5056
- if (elementRef?.current) {
5057
- const elementRect = elementRef.current.getBoundingClientRect();
5058
- const elementCenterInFrame = elementRect.top + elementRect.height / 2;
5059
- const elementCenterInParent = frameRect.top + elementCenterInFrame;
5060
- const targetScroll = parentWindow.scrollY + elementCenterInParent - parentWindow.innerHeight / 2;
5061
- parentWindow.scrollTo({
5062
- top: Math.max(0, targetScroll),
5063
- behavior
5064
- });
5065
- return;
5066
- }
5067
- frame.scrollIntoView({ behavior, block: "start" });
5068
- };
5069
- requestAnimationFrame(() => {
5070
- requestAnimationFrame(scrollToElement);
5071
- });
5072
- }, [active, behavior, elementRef]);
5073
- }
5074
-
5075
5573
  // src/modal/styles.module.css
5076
5574
  var styles_default4 = {};
5077
5575
 
@@ -5100,7 +5598,7 @@ function Modal({
5100
5598
  container,
5101
5599
  modal
5102
5600
  }) {
5103
- const contentRef = (0, import_react26.useRef)(null);
5601
+ const contentRef = (0, import_react40.useRef)(null);
5104
5602
  useScrollFrameIntoView(open, { elementRef: contentRef });
5105
5603
  const handleClose = () => {
5106
5604
  onOpenChange?.(false);
@@ -5142,7 +5640,7 @@ function Modal({
5142
5640
  }
5143
5641
  ) });
5144
5642
  }
5145
- var ModalButton = (0, import_react26.forwardRef)(
5643
+ var ModalButton = (0, import_react40.forwardRef)(
5146
5644
  ({ children, size, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5147
5645
  Button,
5148
5646
  {
@@ -5158,9 +5656,9 @@ ModalButton.displayName = "ModalButton";
5158
5656
  Modal.displayName = "Modal";
5159
5657
 
5160
5658
  // src/modal-loader/ModalLoader.tsx
5161
- var import_react27 = require("react");
5659
+ var import_react41 = require("react");
5162
5660
  var import_jsx_runtime73 = require("react/jsx-runtime");
5163
- var ModalLoader = (0, import_react27.memo)(({ visible, className }) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5661
+ var ModalLoader = (0, import_react41.memo)(({ visible, className }) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5164
5662
  "div",
5165
5663
  {
5166
5664
  className: cn(
@@ -5230,14 +5728,14 @@ var import_react_i18next16 = require("react-i18next");
5230
5728
  var import_lucide_react24 = require("lucide-react");
5231
5729
 
5232
5730
  // src/select/Select.tsx
5233
- var React19 = __toESM(require("react"), 1);
5731
+ var React20 = __toESM(require("react"), 1);
5234
5732
  var RadixSelect = __toESM(require("@radix-ui/react-select"), 1);
5235
5733
  var import_jsx_runtime76 = require("react/jsx-runtime");
5236
5734
  var SelectRoot = RadixSelect.Root;
5237
5735
  var SelectValue = RadixSelect.Value;
5238
5736
  var SelectGroup = RadixSelect.Group;
5239
5737
  var SelectPortal = RadixSelect.Portal;
5240
- var SelectTrigger = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
5738
+ var SelectTrigger = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
5241
5739
  RadixSelect.Trigger,
5242
5740
  {
5243
5741
  ref,
@@ -5278,7 +5776,7 @@ var SelectTrigger = React19.forwardRef(({ className, children, ...props }, ref)
5278
5776
  }
5279
5777
  ));
5280
5778
  SelectTrigger.displayName = "SelectTrigger";
5281
- var SelectContent = React19.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(RadixSelect.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5779
+ var SelectContent = React20.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(RadixSelect.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5282
5780
  RadixSelect.Content,
5283
5781
  {
5284
5782
  ref,
@@ -5297,7 +5795,7 @@ var SelectContent = React19.forwardRef(({ className, children, position = "poppe
5297
5795
  }
5298
5796
  ) }));
5299
5797
  SelectContent.displayName = "SelectContent";
5300
- var SelectItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
5798
+ var SelectItem = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
5301
5799
  RadixSelect.Item,
5302
5800
  {
5303
5801
  ref,
@@ -5332,7 +5830,7 @@ var SelectItem = React19.forwardRef(({ className, children, ...props }, ref) =>
5332
5830
  }
5333
5831
  ));
5334
5832
  SelectItem.displayName = "SelectItem";
5335
- var SelectSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5833
+ var SelectSeparator = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5336
5834
  RadixSelect.Separator,
5337
5835
  {
5338
5836
  ref,
@@ -5341,7 +5839,7 @@ var SelectSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @_
5341
5839
  }
5342
5840
  ));
5343
5841
  SelectSeparator.displayName = "SelectSeparator";
5344
- var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5842
+ var SelectLabel = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5345
5843
  RadixSelect.Label,
5346
5844
  {
5347
5845
  ref,
@@ -5353,7 +5851,7 @@ var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
5353
5851
  }
5354
5852
  ));
5355
5853
  SelectLabel.displayName = "SelectLabel";
5356
- var Select = React19.forwardRef(
5854
+ var Select = React20.forwardRef(
5357
5855
  ({
5358
5856
  placeholder,
5359
5857
  label,
@@ -5364,9 +5862,9 @@ var Select = React19.forwardRef(
5364
5862
  children,
5365
5863
  ...props
5366
5864
  }, ref) => {
5367
- const reactId = React19.useId();
5865
+ const reactId = React20.useId();
5368
5866
  const triggerId = props.name ?? reactId;
5369
- const internalRef = React19.useRef(null);
5867
+ const internalRef = React20.useRef(null);
5370
5868
  const combinedRef = useCombinedRef(ref, internalRef);
5371
5869
  return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: cn("flex flex-col gap-chekin-1 w-[300px]", containerClassName), children: [
5372
5870
  label && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
@@ -5523,7 +6021,7 @@ function Pagination({
5523
6021
  }
5524
6022
 
5525
6023
  // src/popover/Popover.tsx
5526
- var React20 = __toESM(require("react"), 1);
6024
+ var React21 = __toESM(require("react"), 1);
5527
6025
  var RadixPopover = __toESM(require("@radix-ui/react-popover"), 1);
5528
6026
  var import_jsx_runtime78 = require("react/jsx-runtime");
5529
6027
  var Popover = RadixPopover.Root;
@@ -5531,7 +6029,7 @@ var PopoverTrigger = RadixPopover.Trigger;
5531
6029
  var PopoverAnchor = RadixPopover.Anchor;
5532
6030
  var PopoverPortal = RadixPopover.Portal;
5533
6031
  var PopoverClose = RadixPopover.Close;
5534
- var PopoverContent = React20.forwardRef(({ className, sideOffset = 8, align = "start", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
6032
+ var PopoverContent = React21.forwardRef(({ className, sideOffset = 8, align = "start", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(RadixPopover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5535
6033
  RadixPopover.Content,
5536
6034
  {
5537
6035
  ref,
@@ -5548,14 +6046,14 @@ var PopoverContent = React20.forwardRef(({ className, sideOffset = 8, align = "s
5548
6046
  PopoverContent.displayName = "PopoverContent";
5549
6047
 
5550
6048
  // src/radio/Radio.tsx
5551
- var import_react29 = require("react");
6049
+ var import_react43 = require("react");
5552
6050
 
5553
6051
  // src/radio-group/RadioGroup.tsx
5554
- var React21 = __toESM(require("react"), 1);
6052
+ var React22 = __toESM(require("react"), 1);
5555
6053
  var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
5556
6054
  var import_lucide_react25 = require("lucide-react");
5557
6055
  var import_jsx_runtime79 = require("react/jsx-runtime");
5558
- var RadioGroup = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
6056
+ var RadioGroup = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5559
6057
  RadioGroupPrimitive.Root,
5560
6058
  {
5561
6059
  ref,
@@ -5564,7 +6062,7 @@ var RadioGroup = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE
5564
6062
  }
5565
6063
  ));
5566
6064
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
5567
- var RadioGroupItem = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
6065
+ var RadioGroupItem = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5568
6066
  RadioGroupPrimitive.Item,
5569
6067
  {
5570
6068
  ref,
@@ -5581,11 +6079,11 @@ var RadioGroupItem = React21.forwardRef(({ className, ...props }, ref) => /* @__
5581
6079
  RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
5582
6080
 
5583
6081
  // src/radio/useRadioOptions.ts
5584
- var import_react28 = require("react");
6082
+ var import_react42 = require("react");
5585
6083
  function useRadioOptions({ options, defaultValue, onChange }) {
5586
6084
  const initialValue = (typeof defaultValue === "string" ? options.find((option) => option.value === defaultValue) : defaultValue) || "";
5587
- const [selectedValue, setSelectedValue] = (0, import_react28.useState)(initialValue);
5588
- const handleValueChange = (0, import_react28.useCallback)(
6085
+ const [selectedValue, setSelectedValue] = (0, import_react42.useState)(initialValue);
6086
+ const handleValueChange = (0, import_react42.useCallback)(
5589
6087
  (value) => {
5590
6088
  setSelectedValue(value);
5591
6089
  const selectedOption = options.find((option) => option.value === value) || "";
@@ -5606,7 +6104,7 @@ var styles_default5 = {};
5606
6104
 
5607
6105
  // src/radio/Radio.tsx
5608
6106
  var import_jsx_runtime80 = require("react/jsx-runtime");
5609
- var Radio = (0, import_react29.forwardRef)(
6107
+ var Radio = (0, import_react43.forwardRef)(
5610
6108
  ({ options, value, onChange, error, className = "", disabled = false, renderOption }, ref) => {
5611
6109
  const { selectedValue, handleValueChange } = useRadioOptions({
5612
6110
  options,
@@ -5793,7 +6291,7 @@ function RatingRadioGroup({
5793
6291
  }
5794
6292
 
5795
6293
  // src/rating-stars/RatingStars.tsx
5796
- var React22 = __toESM(require("react"), 1);
6294
+ var React23 = __toESM(require("react"), 1);
5797
6295
  var import_lucide_react27 = require("lucide-react");
5798
6296
  var import_react_i18next17 = require("react-i18next");
5799
6297
  var import_jsx_runtime84 = require("react/jsx-runtime");
@@ -5813,7 +6311,7 @@ function RatingStars({
5813
6311
  const { t } = (0, import_react_i18next17.useTranslation)();
5814
6312
  const normalizedRating = Math.max(0, Math.min(maxRating, rating));
5815
6313
  const stars = Array.from({ length: maxRating }, (_, index) => index + 1);
5816
- const componentId = React22.useId();
6314
+ const componentId = React23.useId();
5817
6315
  const decimal = normalizedRating - Math.floor(normalizedRating);
5818
6316
  const partialStarIndex = decimal > 0 ? Math.ceil(normalizedRating) : -1;
5819
6317
  const gradientId = `star-gradient-${componentId.replace(/:/g, "")}`;
@@ -5996,7 +6494,7 @@ var SectionTagColors = /* @__PURE__ */ ((SectionTagColors2) => {
5996
6494
  })(SectionTagColors || {});
5997
6495
 
5998
6496
  // src/section/Section.tsx
5999
- var import_react30 = require("react");
6497
+ var import_react44 = require("react");
6000
6498
  var import_lucide_react31 = require("lucide-react");
6001
6499
 
6002
6500
  // src/section/constants.ts
@@ -6023,7 +6521,7 @@ function TooltipInfo({ content, className }) {
6023
6521
  }
6024
6522
  ) });
6025
6523
  }
6026
- var Section = (0, import_react30.forwardRef)(
6524
+ var Section = (0, import_react44.forwardRef)(
6027
6525
  ({
6028
6526
  children,
6029
6527
  title,
@@ -6075,17 +6573,17 @@ var Section = (0, import_react30.forwardRef)(
6075
6573
  )
6076
6574
  );
6077
6575
  Section.displayName = "Section";
6078
- var SubSection = (0, import_react30.forwardRef)(
6576
+ var SubSection = (0, import_react44.forwardRef)(
6079
6577
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Section, { ref, className: cn(Section_default.section_sub, className), ...props })
6080
6578
  );
6081
6579
  SubSection.displayName = "SubSection";
6082
- var DividingSubsection = (0, import_react30.forwardRef)(
6580
+ var DividingSubsection = (0, import_react44.forwardRef)(
6083
6581
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(SubSection, { ref, className: cn(Section_default.section_dividing, className), ...props })
6084
6582
  );
6085
6583
  DividingSubsection.displayName = "DividingSubsection";
6086
6584
 
6087
6585
  // src/selectors/Selectors.tsx
6088
- var import_react31 = require("react");
6586
+ var import_react45 = require("react");
6089
6587
 
6090
6588
  // src/selector-button/styles.module.css
6091
6589
  var styles_default7 = {};
@@ -6157,8 +6655,8 @@ var getValueArray = (value) => {
6157
6655
  return [];
6158
6656
  };
6159
6657
  function getSelectorContent(label, disabled, readOnly, active) {
6160
- if ((0, import_react31.isValidElement)(label)) {
6161
- return (0, import_react31.cloneElement)(label, {
6658
+ if ((0, import_react45.isValidElement)(label)) {
6659
+ return (0, import_react45.cloneElement)(label, {
6162
6660
  disabled,
6163
6661
  readOnly,
6164
6662
  active
@@ -6203,7 +6701,7 @@ function SelectorsInternal({
6203
6701
  }
6204
6702
  };
6205
6703
  const isAnyActive = getValueArray(value).length > 0;
6206
- (0, import_react31.useEffect)(() => {
6704
+ (0, import_react45.useEffect)(() => {
6207
6705
  onAnySelectorActive?.(isAnyActive);
6208
6706
  }, [isAnyActive, onAnySelectorActive]);
6209
6707
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
@@ -6246,7 +6744,7 @@ function SelectorsInternal({
6246
6744
  )
6247
6745
  ] });
6248
6746
  }
6249
- var Selectors = (0, import_react31.forwardRef)(SelectorsInternal);
6747
+ var Selectors = (0, import_react45.forwardRef)(SelectorsInternal);
6250
6748
 
6251
6749
  // src/separator/Separator.tsx
6252
6750
  var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
@@ -6384,30 +6882,11 @@ function SheetDescription({
6384
6882
  }
6385
6883
 
6386
6884
  // src/sidebar/Sidebar.tsx
6387
- var React23 = __toESM(require("react"), 1);
6885
+ var React24 = __toESM(require("react"), 1);
6388
6886
  var import_react_slot4 = require("@radix-ui/react-slot");
6389
6887
  var import_class_variance_authority11 = require("class-variance-authority");
6390
6888
  var import_lucide_react33 = require("lucide-react");
6391
6889
 
6392
- // src/lib/use-is-mobile.ts
6393
- var import_react32 = require("react");
6394
- var MOBILE_BREAKPOINT = 768;
6395
- function useIsMobile({ breakpoint = MOBILE_BREAKPOINT } = {}) {
6396
- const [isMobile, setIsMobile] = (0, import_react32.useState)(void 0);
6397
- (0, import_react32.useEffect)(() => {
6398
- const mediaQuery = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
6399
- const onChange = () => {
6400
- setIsMobile(window.innerWidth < breakpoint);
6401
- };
6402
- mediaQuery.addEventListener("change", onChange);
6403
- setIsMobile(window.innerWidth < breakpoint);
6404
- return () => {
6405
- mediaQuery.removeEventListener("change", onChange);
6406
- };
6407
- }, [breakpoint]);
6408
- return !!isMobile;
6409
- }
6410
-
6411
6890
  // src/skeleton/Skeleton.tsx
6412
6891
  var import_jsx_runtime94 = require("react/jsx-runtime");
6413
6892
  function Skeleton({ className, ...props }) {
@@ -6425,19 +6904,19 @@ function Skeleton({ className, ...props }) {
6425
6904
  }
6426
6905
 
6427
6906
  // src/sidebar/SidebarContext.ts
6428
- var import_react33 = require("react");
6429
- var SidebarContext = (0, import_react33.createContext)(null);
6907
+ var import_react46 = require("react");
6908
+ var SidebarContext = (0, import_react46.createContext)(null);
6430
6909
 
6431
6910
  // src/sidebar/useSidebarMenuButton.ts
6432
- var import_react35 = require("react");
6911
+ var import_react48 = require("react");
6433
6912
 
6434
6913
  // src/sidebar/SidebarMenuButtonContext.ts
6435
- var import_react34 = require("react");
6436
- var SidebarMenuButtonContext = (0, import_react34.createContext)(null);
6914
+ var import_react47 = require("react");
6915
+ var SidebarMenuButtonContext = (0, import_react47.createContext)(null);
6437
6916
 
6438
6917
  // src/sidebar/useSidebarMenuButton.ts
6439
6918
  function useSidebarMenuButton() {
6440
- return (0, import_react35.useContext)(SidebarMenuButtonContext);
6919
+ return (0, import_react48.useContext)(SidebarMenuButtonContext);
6441
6920
  }
6442
6921
 
6443
6922
  // src/sidebar/SidebarIcon.tsx
@@ -6478,16 +6957,16 @@ var SidebarIcon = ({
6478
6957
  };
6479
6958
 
6480
6959
  // src/sidebar/useSidebar.ts
6481
- var import_react36 = require("react");
6960
+ var import_react49 = require("react");
6482
6961
  function useSidebar() {
6483
- const context = (0, import_react36.useContext)(SidebarContext);
6962
+ const context = (0, import_react49.useContext)(SidebarContext);
6484
6963
  if (!context) {
6485
6964
  throw new Error("useSidebar must be used within a SidebarProvider.");
6486
6965
  }
6487
6966
  return context;
6488
6967
  }
6489
6968
  function useSidebarSafe() {
6490
- return (0, import_react36.useContext)(SidebarContext);
6969
+ return (0, import_react49.useContext)(SidebarContext);
6491
6970
  }
6492
6971
 
6493
6972
  // src/sidebar/Sidebar.tsx
@@ -6496,7 +6975,7 @@ var SIDEBAR_COOKIE_NAME_DEFAULT = "sidebar_state";
6496
6975
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
6497
6976
  var SIDEBAR_WIDTH_MOBILE = "18rem";
6498
6977
  var SIDEBAR_KEYBOARD_SHORTCUT = "b";
6499
- var SidebarProvider = React23.forwardRef(
6978
+ var SidebarProvider = React24.forwardRef(
6500
6979
  ({
6501
6980
  defaultOpen = true,
6502
6981
  open: openProp,
@@ -6508,10 +6987,10 @@ var SidebarProvider = React23.forwardRef(
6508
6987
  ...props
6509
6988
  }, ref) => {
6510
6989
  const isMobile = useIsMobile({ breakpoint: 641 });
6511
- const [openMobile, setOpenMobile] = React23.useState(false);
6512
- const [_open, _setOpen] = React23.useState(defaultOpen);
6990
+ const [openMobile, setOpenMobile] = React24.useState(false);
6991
+ const [_open, _setOpen] = React24.useState(defaultOpen);
6513
6992
  const open = openProp ?? _open;
6514
- const setOpen = React23.useCallback(
6993
+ const setOpen = React24.useCallback(
6515
6994
  (value) => {
6516
6995
  const openState = typeof value === "function" ? value(open) : value;
6517
6996
  if (setOpenProp) {
@@ -6523,10 +7002,10 @@ var SidebarProvider = React23.forwardRef(
6523
7002
  },
6524
7003
  [setOpenProp, open, stateName]
6525
7004
  );
6526
- const toggleSidebar = React23.useCallback(() => {
7005
+ const toggleSidebar = React24.useCallback(() => {
6527
7006
  return isMobile ? setOpenMobile((value) => !value) : setOpen((value) => !value);
6528
7007
  }, [isMobile, setOpen]);
6529
- React23.useEffect(() => {
7008
+ React24.useEffect(() => {
6530
7009
  const handleKeyDown = (event) => {
6531
7010
  if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
6532
7011
  event.preventDefault();
@@ -6537,7 +7016,7 @@ var SidebarProvider = React23.forwardRef(
6537
7016
  return () => window.removeEventListener("keydown", handleKeyDown);
6538
7017
  }, [toggleSidebar]);
6539
7018
  const state = open ? "expanded" : "collapsed";
6540
- const contextValue = React23.useMemo(
7019
+ const contextValue = React24.useMemo(
6541
7020
  () => ({
6542
7021
  state,
6543
7022
  open,
@@ -6562,7 +7041,7 @@ var SidebarProvider = React23.forwardRef(
6562
7041
  }
6563
7042
  );
6564
7043
  SidebarProvider.displayName = "SidebarProvider";
6565
- var Sidebar = React23.forwardRef(
7044
+ var Sidebar = React24.forwardRef(
6566
7045
  ({
6567
7046
  side = "left",
6568
7047
  variant = "sidebar",
@@ -6656,7 +7135,7 @@ var Sidebar = React23.forwardRef(
6656
7135
  }
6657
7136
  );
6658
7137
  Sidebar.displayName = "Sidebar";
6659
- var SidebarTrigger = React23.forwardRef(({ className, onClick, icon, ...props }, ref) => {
7138
+ var SidebarTrigger = React24.forwardRef(({ className, onClick, icon, ...props }, ref) => {
6660
7139
  const { toggleSidebar, open, isMobile, openMobile } = useSidebar();
6661
7140
  return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
6662
7141
  Button,
@@ -6683,7 +7162,7 @@ var SidebarTrigger = React23.forwardRef(({ className, onClick, icon, ...props },
6683
7162
  );
6684
7163
  });
6685
7164
  SidebarTrigger.displayName = "SidebarTrigger";
6686
- var SidebarRail = React23.forwardRef(
7165
+ var SidebarRail = React24.forwardRef(
6687
7166
  ({ className, ...props }, ref) => {
6688
7167
  const { toggleSidebar } = useSidebar();
6689
7168
  return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
@@ -6709,7 +7188,7 @@ var SidebarRail = React23.forwardRef(
6709
7188
  }
6710
7189
  );
6711
7190
  SidebarRail.displayName = "SidebarRail";
6712
- var SidebarInset = React23.forwardRef(
7191
+ var SidebarInset = React24.forwardRef(
6713
7192
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6714
7193
  "main",
6715
7194
  {
@@ -6724,7 +7203,7 @@ var SidebarInset = React23.forwardRef(
6724
7203
  )
6725
7204
  );
6726
7205
  SidebarInset.displayName = "SidebarInset";
6727
- var SidebarInput = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7206
+ var SidebarInput = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6728
7207
  Input,
6729
7208
  {
6730
7209
  ref,
@@ -6734,7 +7213,7 @@ var SidebarInput = React23.forwardRef(({ className, ...props }, ref) => /* @__PU
6734
7213
  }
6735
7214
  ));
6736
7215
  SidebarInput.displayName = "SidebarInput";
6737
- var SidebarHeader = React23.forwardRef(
7216
+ var SidebarHeader = React24.forwardRef(
6738
7217
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6739
7218
  "div",
6740
7219
  {
@@ -6746,7 +7225,7 @@ var SidebarHeader = React23.forwardRef(
6746
7225
  )
6747
7226
  );
6748
7227
  SidebarHeader.displayName = "SidebarHeader";
6749
- var SidebarFooter = React23.forwardRef(
7228
+ var SidebarFooter = React24.forwardRef(
6750
7229
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6751
7230
  "div",
6752
7231
  {
@@ -6758,7 +7237,7 @@ var SidebarFooter = React23.forwardRef(
6758
7237
  )
6759
7238
  );
6760
7239
  SidebarFooter.displayName = "SidebarFooter";
6761
- var SidebarSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7240
+ var SidebarSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6762
7241
  Separator3,
6763
7242
  {
6764
7243
  ref,
@@ -6768,7 +7247,7 @@ var SidebarSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @
6768
7247
  }
6769
7248
  ));
6770
7249
  SidebarSeparator.displayName = "SidebarSeparator";
6771
- var SidebarContent = React23.forwardRef(
7250
+ var SidebarContent = React24.forwardRef(
6772
7251
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6773
7252
  "div",
6774
7253
  {
@@ -6783,7 +7262,7 @@ var SidebarContent = React23.forwardRef(
6783
7262
  )
6784
7263
  );
6785
7264
  SidebarContent.displayName = "SidebarContent";
6786
- var SidebarGroup = React23.forwardRef(
7265
+ var SidebarGroup = React24.forwardRef(
6787
7266
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6788
7267
  "div",
6789
7268
  {
@@ -6795,7 +7274,7 @@ var SidebarGroup = React23.forwardRef(
6795
7274
  )
6796
7275
  );
6797
7276
  SidebarGroup.displayName = "SidebarGroup";
6798
- var SidebarGroupLabel = React23.forwardRef(({ className, asChild = false, ...props }, ref) => {
7277
+ var SidebarGroupLabel = React24.forwardRef(({ className, asChild = false, ...props }, ref) => {
6799
7278
  const Comp = asChild ? import_react_slot4.Slot : "div";
6800
7279
  return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6801
7280
  Comp,
@@ -6812,7 +7291,7 @@ var SidebarGroupLabel = React23.forwardRef(({ className, asChild = false, ...pro
6812
7291
  );
6813
7292
  });
6814
7293
  SidebarGroupLabel.displayName = "SidebarGroupLabel";
6815
- var SidebarGroupAction = React23.forwardRef(({ className, asChild = false, ...props }, ref) => {
7294
+ var SidebarGroupAction = React24.forwardRef(({ className, asChild = false, ...props }, ref) => {
6816
7295
  const Comp = asChild ? import_react_slot4.Slot : "button";
6817
7296
  return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6818
7297
  Comp,
@@ -6828,7 +7307,7 @@ var SidebarGroupAction = React23.forwardRef(({ className, asChild = false, ...pr
6828
7307
  );
6829
7308
  });
6830
7309
  SidebarGroupAction.displayName = "SidebarGroupAction";
6831
- var SidebarGroupContent = React23.forwardRef(
7310
+ var SidebarGroupContent = React24.forwardRef(
6832
7311
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6833
7312
  "div",
6834
7313
  {
@@ -6840,7 +7319,7 @@ var SidebarGroupContent = React23.forwardRef(
6840
7319
  )
6841
7320
  );
6842
7321
  SidebarGroupContent.displayName = "SidebarGroupContent";
6843
- var SidebarMenu = React23.forwardRef(
7322
+ var SidebarMenu = React24.forwardRef(
6844
7323
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6845
7324
  "ul",
6846
7325
  {
@@ -6852,7 +7331,7 @@ var SidebarMenu = React23.forwardRef(
6852
7331
  )
6853
7332
  );
6854
7333
  SidebarMenu.displayName = "SidebarMenu";
6855
- var SidebarMenuItem = React23.forwardRef(
7334
+ var SidebarMenuItem = React24.forwardRef(
6856
7335
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6857
7336
  "li",
6858
7337
  {
@@ -6884,7 +7363,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority11.cva)(
6884
7363
  }
6885
7364
  }
6886
7365
  );
6887
- var SidebarMenuButton = React23.forwardRef(
7366
+ var SidebarMenuButton = React24.forwardRef(
6888
7367
  ({
6889
7368
  asChild = false,
6890
7369
  isActive = false,
@@ -6930,7 +7409,7 @@ var SidebarMenuButton = React23.forwardRef(
6930
7409
  }
6931
7410
  );
6932
7411
  SidebarMenuButton.displayName = "SidebarMenuButton";
6933
- var SidebarMenuAction = React23.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
7412
+ var SidebarMenuAction = React24.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
6934
7413
  const Comp = asChild ? import_react_slot4.Slot : "button";
6935
7414
  return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6936
7415
  Comp,
@@ -6947,7 +7426,7 @@ var SidebarMenuAction = React23.forwardRef(({ className, asChild = false, showOn
6947
7426
  );
6948
7427
  });
6949
7428
  SidebarMenuAction.displayName = "SidebarMenuAction";
6950
- var SidebarMenuBadge = React23.forwardRef(
7429
+ var SidebarMenuBadge = React24.forwardRef(
6951
7430
  ({ className, ...props }, ref) => {
6952
7431
  const { open, isMobile, openMobile } = useSidebar();
6953
7432
  const isOpen = isMobile ? openMobile : open;
@@ -6967,8 +7446,8 @@ var SidebarMenuBadge = React23.forwardRef(
6967
7446
  }
6968
7447
  );
6969
7448
  SidebarMenuBadge.displayName = "SidebarMenuBadge";
6970
- var SidebarMenuSkeleton = React23.forwardRef(({ className, showIcon = false, ...props }, ref) => {
6971
- const width = React23.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
7449
+ var SidebarMenuSkeleton = React24.forwardRef(({ className, showIcon = false, ...props }, ref) => {
7450
+ const width = React24.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
6972
7451
  return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
6973
7452
  "div",
6974
7453
  {
@@ -6991,7 +7470,7 @@ var SidebarMenuSkeleton = React23.forwardRef(({ className, showIcon = false, ...
6991
7470
  );
6992
7471
  });
6993
7472
  SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
6994
- var SidebarMenuSub = React23.forwardRef(
7473
+ var SidebarMenuSub = React24.forwardRef(
6995
7474
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6996
7475
  "ul",
6997
7476
  {
@@ -7006,7 +7485,7 @@ var SidebarMenuSub = React23.forwardRef(
7006
7485
  )
7007
7486
  );
7008
7487
  SidebarMenuSub.displayName = "SidebarMenuSub";
7009
- var SidebarMenuSubItem = React23.forwardRef(
7488
+ var SidebarMenuSubItem = React24.forwardRef(
7010
7489
  ({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("li", { ref, ...props })
7011
7490
  );
7012
7491
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
@@ -7030,7 +7509,7 @@ var sidebarMenuSubButtonVariants = (0, import_class_variance_authority11.cva)(
7030
7509
  }
7031
7510
  }
7032
7511
  );
7033
- var SidebarMenuSubButton = React23.forwardRef(
7512
+ var SidebarMenuSubButton = React24.forwardRef(
7034
7513
  ({
7035
7514
  asChild = false,
7036
7515
  isActive,
@@ -7060,9 +7539,9 @@ var VALUE_PART = 1;
7060
7539
  var getSidebarState = (stateName) => document.cookie.split("; ").find((row) => row.startsWith(`${stateName}=`))?.split("=")[VALUE_PART] === "true";
7061
7540
 
7062
7541
  // src/circular-loader/CircularLoader.tsx
7063
- var import_react37 = __toESM(require("react"), 1);
7542
+ var import_react50 = __toESM(require("react"), 1);
7064
7543
  var import_jsx_runtime97 = require("react/jsx-runtime");
7065
- var CircularLoader = import_react37.default.memo(
7544
+ var CircularLoader = import_react50.default.memo(
7066
7545
  ({ visible = true, height, width, position, label, className }) => {
7067
7546
  if (!visible) return null;
7068
7547
  return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
@@ -7156,10 +7635,10 @@ var CircularLoader = import_react37.default.memo(
7156
7635
  CircularLoader.displayName = "CircularLoader";
7157
7636
 
7158
7637
  // src/small-grid-single-item/SmallGridSingleItem.tsx
7159
- var import_react38 = require("react");
7638
+ var import_react51 = require("react");
7160
7639
  var import_lucide_react34 = require("lucide-react");
7161
7640
  var import_jsx_runtime98 = require("react/jsx-runtime");
7162
- var SmallGridSingleItem = (0, import_react38.memo)(
7641
+ var SmallGridSingleItem = (0, import_react51.memo)(
7163
7642
  ({
7164
7643
  title,
7165
7644
  subtitle,
@@ -7280,7 +7759,7 @@ function SortingAction({
7280
7759
  }
7281
7760
 
7282
7761
  // src/status-button/StatusButton.tsx
7283
- var import_react39 = require("react");
7762
+ var import_react52 = require("react");
7284
7763
  var import_react_i18next20 = require("react-i18next");
7285
7764
  var import_lucide_react36 = require("lucide-react");
7286
7765
  var import_jsx_runtime100 = require("react/jsx-runtime");
@@ -7298,7 +7777,7 @@ function StatusButton({
7298
7777
  ...props
7299
7778
  }) {
7300
7779
  const { t } = (0, import_react_i18next20.useTranslation)();
7301
- const configMap = (0, import_react39.useMemo)(() => {
7780
+ const configMap = (0, import_react52.useMemo)(() => {
7302
7781
  const defaultLoadingConfig = {
7303
7782
  text: loadingText ?? `${t("saving")}...`,
7304
7783
  icon: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_lucide_react36.Loader2, { className: "h-4 w-4 animate-spin" }),
@@ -7423,9 +7902,9 @@ function Stepper({
7423
7902
  }
7424
7903
 
7425
7904
  // src/switch-blocks/SwitchBlocks.tsx
7426
- var import_react40 = require("react");
7905
+ var import_react53 = require("react");
7427
7906
  var import_jsx_runtime103 = require("react/jsx-runtime");
7428
- var SwitchBlocksInternal = (0, import_react40.forwardRef)(
7907
+ var SwitchBlocksInternal = (0, import_react53.forwardRef)(
7429
7908
  ({ options, value, onChange, disabled, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7430
7909
  "div",
7431
7910
  {
@@ -7449,12 +7928,12 @@ var SwitchBlocksInternal = (0, import_react40.forwardRef)(
7449
7928
  )
7450
7929
  );
7451
7930
  SwitchBlocksInternal.displayName = "SwitchBlocks";
7452
- var SwitchBlocks = (0, import_react40.memo)(SwitchBlocksInternal);
7931
+ var SwitchBlocks = (0, import_react53.memo)(SwitchBlocksInternal);
7453
7932
 
7454
7933
  // src/switch-group/SwitchGroup.tsx
7455
- var React25 = __toESM(require("react"), 1);
7934
+ var React26 = __toESM(require("react"), 1);
7456
7935
  var import_jsx_runtime104 = require("react/jsx-runtime");
7457
- var SwitchGroup = React25.forwardRef(
7936
+ var SwitchGroup = React26.forwardRef(
7458
7937
  ({ options, value = [], onChange, disabled = false, className, error, ...props }, ref) => {
7459
7938
  const handleOptionChange = (optionValue, checked) => {
7460
7939
  if (!onChange) return;
@@ -7509,7 +7988,7 @@ var SwitchGroup = React25.forwardRef(
7509
7988
  SwitchGroup.displayName = "SwitchGroup";
7510
7989
 
7511
7990
  // src/tabs/Tabs.tsx
7512
- var import_react41 = require("react");
7991
+ var import_react54 = require("react");
7513
7992
  var TabsPrimitive2 = __toESM(require("@radix-ui/react-tabs"), 1);
7514
7993
  var import_class_variance_authority12 = require("class-variance-authority");
7515
7994
  var import_jsx_runtime105 = require("react/jsx-runtime");
@@ -7525,7 +8004,7 @@ var tabsListVariants = (0, import_class_variance_authority12.cva)("inline-flex i
7525
8004
  variant: "default"
7526
8005
  }
7527
8006
  });
7528
- var TabsList = (0, import_react41.forwardRef)(
8007
+ var TabsList = (0, import_react54.forwardRef)(
7529
8008
  ({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
7530
8009
  TabsPrimitive2.List,
7531
8010
  {
@@ -7550,7 +8029,7 @@ var tabsTriggerVariants = (0, import_class_variance_authority12.cva)(
7550
8029
  }
7551
8030
  }
7552
8031
  );
7553
- var TabsTrigger = (0, import_react41.forwardRef)(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8032
+ var TabsTrigger = (0, import_react54.forwardRef)(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
7554
8033
  TabsPrimitive2.Trigger,
7555
8034
  {
7556
8035
  ref,
@@ -7559,7 +8038,7 @@ var TabsTrigger = (0, import_react41.forwardRef)(({ className, variant, ...props
7559
8038
  }
7560
8039
  ));
7561
8040
  TabsTrigger.displayName = TabsPrimitive2.Trigger.displayName;
7562
- var TabsContent = (0, import_react41.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TabsPrimitive2.Content, { ref, className, tabIndex: -1, ...props }));
8041
+ var TabsContent = (0, import_react54.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TabsPrimitive2.Content, { ref, className, tabIndex: -1, ...props }));
7563
8042
  TabsContent.displayName = TabsPrimitive2.Content.displayName;
7564
8043
 
7565
8044
  // src/tabbed-section/TabbedSection.tsx
@@ -7700,11 +8179,11 @@ var TASK_VARIANTS = {
7700
8179
  var import_sonner2 = require("sonner");
7701
8180
 
7702
8181
  // src/toaster/useUpdateToast.ts
7703
- var import_react42 = require("react");
8182
+ var import_react55 = require("react");
7704
8183
  var import_sonner = require("sonner");
7705
8184
  function useUpdateToast({ id }) {
7706
- const toastIdRef = (0, import_react42.useRef)("");
7707
- const getToastOptions = (0, import_react42.useCallback)(
8185
+ const toastIdRef = (0, import_react55.useRef)("");
8186
+ const getToastOptions = (0, import_react55.useCallback)(
7708
8187
  (options) => ({
7709
8188
  id: toastIdRef.current,
7710
8189
  dismissible: false,
@@ -7736,7 +8215,7 @@ function useUpdateToast({ id }) {
7736
8215
  }
7737
8216
 
7738
8217
  // src/toggle-group/ToggleGroup.tsx
7739
- var React26 = __toESM(require("react"), 1);
8218
+ var React27 = __toESM(require("react"), 1);
7740
8219
  var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
7741
8220
 
7742
8221
  // src/toggle-group/style.ts
@@ -7770,12 +8249,12 @@ var toggleVariants = (0, import_class_variance_authority13.cva)(
7770
8249
 
7771
8250
  // src/toggle-group/ToggleGroup.tsx
7772
8251
  var import_jsx_runtime109 = require("react/jsx-runtime");
7773
- var ToggleGroupContext = React26.createContext({
8252
+ var ToggleGroupContext = React27.createContext({
7774
8253
  size: "default",
7775
8254
  variant: "default",
7776
8255
  theme: "default"
7777
8256
  });
7778
- var ToggleGroup = React26.forwardRef(({ className, variant, size, theme, children, ...props }, ref) => {
8257
+ var ToggleGroup = React27.forwardRef(({ className, variant, size, theme, children, ...props }, ref) => {
7779
8258
  const isTabVariant = variant === "tab";
7780
8259
  return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
7781
8260
  ToggleGroupPrimitive.Root,
@@ -7792,8 +8271,8 @@ var ToggleGroup = React26.forwardRef(({ className, variant, size, theme, childre
7792
8271
  );
7793
8272
  });
7794
8273
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
7795
- var ToggleGroupItem = React26.forwardRef(({ className, children, variant, size, theme, ...props }, ref) => {
7796
- const context = React26.useContext(ToggleGroupContext);
8274
+ var ToggleGroupItem = React27.forwardRef(({ className, children, variant, size, theme, ...props }, ref) => {
8275
+ const context = React27.useContext(ToggleGroupContext);
7797
8276
  const resolvedVariant = context.variant || variant;
7798
8277
  const isTabVariant = resolvedVariant === "tab";
7799
8278
  return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
@@ -7819,7 +8298,7 @@ var ToggleGroupItem = React26.forwardRef(({ className, children, variant, size,
7819
8298
  ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
7820
8299
 
7821
8300
  // src/toggle-group/Toggles.tsx
7822
- var import_react43 = require("react");
8301
+ var import_react56 = require("react");
7823
8302
  var import_jsx_runtime110 = require("react/jsx-runtime");
7824
8303
  var getValueArray2 = (value) => {
7825
8304
  if (value) {
@@ -7894,7 +8373,7 @@ function TogglesInternal({
7894
8373
  }
7895
8374
  };
7896
8375
  const isAnyActive = getValueArray2(value).length > 0;
7897
- (0, import_react43.useEffect)(() => {
8376
+ (0, import_react56.useEffect)(() => {
7898
8377
  onAnySelectorActive?.(isAnyActive);
7899
8378
  }, [isAnyActive, onAnySelectorActive]);
7900
8379
  const currentValue = getValueArray2(value).map((item) => String(item));
@@ -7925,10 +8404,10 @@ function TogglesInternal({
7925
8404
  }) })
7926
8405
  ] });
7927
8406
  }
7928
- var Toggles = (0, import_react43.forwardRef)(TogglesInternal);
8407
+ var Toggles = (0, import_react56.forwardRef)(TogglesInternal);
7929
8408
 
7930
8409
  // src/text-field/TextField.tsx
7931
- var React27 = __toESM(require("react"), 1);
8410
+ var React28 = __toESM(require("react"), 1);
7932
8411
  var LabelPrimitive2 = __toESM(require("@radix-ui/react-label"), 1);
7933
8412
  var import_class_variance_authority14 = require("class-variance-authority");
7934
8413
  var import_react_i18next21 = require("react-i18next");
@@ -8022,7 +8501,7 @@ var floatingLabelClasses = [
8022
8501
  "peer-focus:to-[var(--text-field-bg-filled)]",
8023
8502
  "peer-focus:to-50%"
8024
8503
  ];
8025
- var TextField = React27.forwardRef(
8504
+ var TextField = React28.forwardRef(
8026
8505
  ({
8027
8506
  className,
8028
8507
  wrapperClassName,
@@ -8041,7 +8520,7 @@ var TextField = React27.forwardRef(
8041
8520
  }, ref) => {
8042
8521
  const { t } = (0, import_react_i18next21.useTranslation)();
8043
8522
  const hasError = Boolean(error);
8044
- const autoId = React27.useId();
8523
+ const autoId = React28.useId();
8045
8524
  const inputId = props.id || autoId;
8046
8525
  const inputClasses = cn(
8047
8526
  inputVariants({ variant, error: hasError, readOnly: Boolean(readOnly) }),
@@ -8136,16 +8615,16 @@ var TextField = React27.forwardRef(
8136
8615
  TextField.displayName = "TextField";
8137
8616
 
8138
8617
  // src/textarea/Textarea.tsx
8139
- var import_react44 = require("react");
8618
+ var import_react57 = require("react");
8140
8619
 
8141
8620
  // src/textarea/styles.module.css
8142
8621
  var styles_default9 = {};
8143
8622
 
8144
8623
  // src/textarea/Textarea.tsx
8145
8624
  var import_jsx_runtime115 = require("react/jsx-runtime");
8146
- var Textarea = (0, import_react44.forwardRef)(
8625
+ var Textarea = (0, import_react57.forwardRef)(
8147
8626
  ({ className, textareaClassName, label, disabled, name, invalid, ...textareaProps }, ref) => {
8148
- const inputId = (0, import_react44.useId)();
8627
+ const inputId = (0, import_react57.useId)();
8149
8628
  return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: cn(styles_default9.container, className), children: [
8150
8629
  /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
8151
8630
  "textarea",
@@ -8274,11 +8753,11 @@ function WideButton({ className, disabled, ...props }) {
8274
8753
  }
8275
8754
 
8276
8755
  // src/datepicker/DatePicker.tsx
8277
- var React31 = __toESM(require("react"), 1);
8756
+ var React32 = __toESM(require("react"), 1);
8278
8757
  var import_lucide_react42 = require("lucide-react");
8279
8758
 
8280
8759
  // src/drawer/Drawer.tsx
8281
- var React28 = __toESM(require("react"), 1);
8760
+ var React29 = __toESM(require("react"), 1);
8282
8761
  var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
8283
8762
  var import_react_draggable = __toESM(require("react-draggable"), 1);
8284
8763
  var import_jsx_runtime119 = require("react/jsx-runtime");
@@ -8296,7 +8775,7 @@ function DrawerPortal({ ...props }) {
8296
8775
  function DrawerClose({ ...props }) {
8297
8776
  return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(DialogPrimitive2.Close, { "data-slot": "drawer-close", ...props });
8298
8777
  }
8299
- var DrawerOverlay = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
8778
+ var DrawerOverlay = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
8300
8779
  DialogPrimitive2.Overlay,
8301
8780
  {
8302
8781
  ref,
@@ -8310,7 +8789,7 @@ var DrawerOverlay = React28.forwardRef(({ className, ...props }, ref) => /* @__P
8310
8789
  ));
8311
8790
  DrawerOverlay.displayName = DialogPrimitive2.Overlay.displayName;
8312
8791
  var DrawerOverlayClasses = "fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0";
8313
- var DrawerContent = React28.forwardRef(
8792
+ var DrawerContent = React29.forwardRef(
8314
8793
  ({
8315
8794
  className,
8316
8795
  children,
@@ -8322,19 +8801,19 @@ var DrawerContent = React28.forwardRef(
8322
8801
  ...props
8323
8802
  }, ref) => {
8324
8803
  const finalContainer = container || getCustomContainer() || void 0;
8325
- const nodeRef = React28.useRef(null);
8326
- const [dragOffsetY, setDragOffsetY] = React28.useState(0);
8804
+ const nodeRef = React29.useRef(null);
8805
+ const [dragOffsetY, setDragOffsetY] = React29.useState(0);
8327
8806
  const overlayOpacity = Math.max(
8328
8807
  DRAWER_MIN_OVERLAY_OPACITY,
8329
8808
  1 - dragOffsetY / (DRAWER_CLOSE_THRESHOLD * 2)
8330
8809
  );
8331
- const handleDrag = React28.useCallback(
8810
+ const handleDrag = React29.useCallback(
8332
8811
  (_event, data) => {
8333
8812
  setDragOffsetY(Math.max(0, data.y));
8334
8813
  },
8335
8814
  []
8336
8815
  );
8337
- const handleStop = React28.useCallback(
8816
+ const handleStop = React29.useCallback(
8338
8817
  (_event, data) => {
8339
8818
  if (data.y > DRAWER_CLOSE_THRESHOLD) {
8340
8819
  setDragOffsetY(0);
@@ -8425,7 +8904,7 @@ var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_r
8425
8904
  DrawerHeader.displayName = "DrawerHeader";
8426
8905
  var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: cn("flex flex-col gap-2 p-5", className), ...props });
8427
8906
  DrawerFooter.displayName = "DrawerFooter";
8428
- var DrawerTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
8907
+ var DrawerTitle = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
8429
8908
  DialogPrimitive2.Title,
8430
8909
  {
8431
8910
  ref,
@@ -8435,7 +8914,7 @@ var DrawerTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
8435
8914
  }
8436
8915
  ));
8437
8916
  DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
8438
- var DrawerDescription = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
8917
+ var DrawerDescription = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
8439
8918
  DialogPrimitive2.Description,
8440
8919
  {
8441
8920
  ref,
@@ -8447,7 +8926,7 @@ var DrawerDescription = React28.forwardRef(({ className, ...props }, ref) => /*
8447
8926
  DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
8448
8927
 
8449
8928
  // src/datepicker/useDatePickerWheel.ts
8450
- var React29 = __toESM(require("react"), 1);
8929
+ var React30 = __toESM(require("react"), 1);
8451
8930
 
8452
8931
  // src/datepicker/datePicker.utils.ts
8453
8932
  var DISPLAY_PAD_LENGTH = 2;
@@ -8598,21 +9077,21 @@ function useDatePickerWheel({
8598
9077
  minDate,
8599
9078
  maxDate
8600
9079
  }) {
8601
- const years = React29.useMemo(() => getYearRange(minDate, maxDate), [maxDate, minDate]);
8602
- const [draftDate, setDraftDate] = React29.useState(
9080
+ const years = React30.useMemo(() => getYearRange(minDate, maxDate), [maxDate, minDate]);
9081
+ const [draftDate, setDraftDate] = React30.useState(
8603
9082
  () => resolveInitialDate({ value, defaultValue, minDate, maxDate })
8604
9083
  );
8605
9084
  const draftYear = draftDate.getFullYear();
8606
9085
  const draftMonth = draftDate.getMonth();
8607
- const [monthScrollTop, setMonthScrollTop] = React29.useState(0);
8608
- const [dayScrollTop, setDayScrollTop] = React29.useState(0);
8609
- const [yearScrollTop, setYearScrollTop] = React29.useState(0);
8610
- const monthListRef = React29.useRef(null);
8611
- const dayListRef = React29.useRef(null);
8612
- const yearListRef = React29.useRef(null);
8613
- const settleTimeoutsRef = React29.useRef({});
8614
- const animationFramesRef = React29.useRef({});
8615
- const columnRefs = React29.useMemo(
9086
+ const [monthScrollTop, setMonthScrollTop] = React30.useState(0);
9087
+ const [dayScrollTop, setDayScrollTop] = React30.useState(0);
9088
+ const [yearScrollTop, setYearScrollTop] = React30.useState(0);
9089
+ const monthListRef = React30.useRef(null);
9090
+ const dayListRef = React30.useRef(null);
9091
+ const yearListRef = React30.useRef(null);
9092
+ const settleTimeoutsRef = React30.useRef({});
9093
+ const animationFramesRef = React30.useRef({});
9094
+ const columnRefs = React30.useMemo(
8616
9095
  () => ({
8617
9096
  month: monthListRef,
8618
9097
  day: dayListRef,
@@ -8620,7 +9099,7 @@ function useDatePickerWheel({
8620
9099
  }),
8621
9100
  []
8622
9101
  );
8623
- const setColumnScrollTop = React29.useCallback(
9102
+ const setColumnScrollTop = React30.useCallback(
8624
9103
  (column, nextScrollTop) => {
8625
9104
  if (column === "month") {
8626
9105
  setMonthScrollTop(nextScrollTop);
@@ -8634,19 +9113,19 @@ function useDatePickerWheel({
8634
9113
  },
8635
9114
  []
8636
9115
  );
8637
- const clearSettleTimeout = React29.useCallback((column) => {
9116
+ const clearSettleTimeout = React30.useCallback((column) => {
8638
9117
  const timeoutId = settleTimeoutsRef.current[column];
8639
9118
  if (timeoutId === void 0) return;
8640
9119
  window.clearTimeout(timeoutId);
8641
9120
  delete settleTimeoutsRef.current[column];
8642
9121
  }, []);
8643
- const clearAnimationFrame = React29.useCallback((column) => {
9122
+ const clearAnimationFrame = React30.useCallback((column) => {
8644
9123
  const frameId = animationFramesRef.current[column];
8645
9124
  if (frameId === void 0) return;
8646
9125
  window.cancelAnimationFrame(frameId);
8647
9126
  delete animationFramesRef.current[column];
8648
9127
  }, []);
8649
- React29.useEffect(
9128
+ React30.useEffect(
8650
9129
  () => () => {
8651
9130
  ["month", "day", "year"].forEach((column) => {
8652
9131
  clearSettleTimeout(column);
@@ -8655,22 +9134,22 @@ function useDatePickerWheel({
8655
9134
  },
8656
9135
  [clearAnimationFrame, clearSettleTimeout]
8657
9136
  );
8658
- React29.useEffect(() => {
9137
+ React30.useEffect(() => {
8659
9138
  if (isOpen) return;
8660
9139
  setDraftDate(resolveInitialDate({ value, defaultValue, minDate, maxDate }));
8661
9140
  }, [defaultValue, isOpen, maxDate, minDate, value]);
8662
- const months = React29.useMemo(
9141
+ const months = React30.useMemo(
8663
9142
  () => getAllowedMonths(draftYear, minDate, maxDate),
8664
9143
  [draftYear, maxDate, minDate]
8665
9144
  );
8666
- const days = React29.useMemo(
9145
+ const days = React30.useMemo(
8667
9146
  () => getAllowedDays(draftYear, draftMonth, minDate, maxDate),
8668
9147
  [draftMonth, draftYear, maxDate, minDate]
8669
9148
  );
8670
9149
  const monthIndex = months.findIndex((month) => month === draftMonth);
8671
9150
  const dayIndex = days.findIndex((day) => day === draftDate.getDate());
8672
9151
  const yearIndex = years.findIndex((year) => year === draftYear);
8673
- const syncScrollPositions = React29.useCallback(
9152
+ const syncScrollPositions = React30.useCallback(
8674
9153
  (nextDate, behavior = "auto") => {
8675
9154
  const nextMonths = getAllowedMonths(nextDate.getFullYear(), minDate, maxDate);
8676
9155
  const nextMonthIndex = nextMonths.findIndex((month) => month === nextDate.getMonth());
@@ -8694,7 +9173,7 @@ function useDatePickerWheel({
8694
9173
  },
8695
9174
  [maxDate, minDate, years]
8696
9175
  );
8697
- React29.useLayoutEffect(() => {
9176
+ React30.useLayoutEffect(() => {
8698
9177
  if (!isOpen) return;
8699
9178
  const nextDate = resolveInitialDate({ value, defaultValue, minDate, maxDate });
8700
9179
  setDraftDate(nextDate);
@@ -8705,7 +9184,7 @@ function useDatePickerWheel({
8705
9184
  window.cancelAnimationFrame(frameId);
8706
9185
  };
8707
9186
  }, [defaultValue, isOpen, maxDate, minDate, syncScrollPositions, value]);
8708
- const updateDraftDate = React29.useCallback(
9187
+ const updateDraftDate = React30.useCallback(
8709
9188
  (column, targetIndex, behavior = "smooth") => {
8710
9189
  const currentDate = stripTime(draftDate);
8711
9190
  const currentYear = currentDate.getFullYear();
@@ -8750,7 +9229,7 @@ function useDatePickerWheel({
8750
9229
  },
8751
9230
  [days, draftDate, maxDate, minDate, months, syncScrollPositions, years]
8752
9231
  );
8753
- const settleColumnScroll = React29.useCallback(
9232
+ const settleColumnScroll = React30.useCallback(
8754
9233
  (column) => {
8755
9234
  const list = columnRefs[column].current;
8756
9235
  if (!list) return;
@@ -8763,7 +9242,7 @@ function useDatePickerWheel({
8763
9242
  },
8764
9243
  [columnRefs, days.length, months.length, updateDraftDate, years.length]
8765
9244
  );
8766
- const scheduleScrollSettle = React29.useCallback(
9245
+ const scheduleScrollSettle = React30.useCallback(
8767
9246
  (column) => {
8768
9247
  clearSettleTimeout(column);
8769
9248
  settleTimeoutsRef.current[column] = window.setTimeout(() => {
@@ -8772,7 +9251,7 @@ function useDatePickerWheel({
8772
9251
  },
8773
9252
  [clearSettleTimeout, settleColumnScroll]
8774
9253
  );
8775
- const handleColumnScroll = React29.useCallback(
9254
+ const handleColumnScroll = React30.useCallback(
8776
9255
  (column) => {
8777
9256
  const list = columnRefs[column].current;
8778
9257
  if (!list) return;
@@ -8786,13 +9265,13 @@ function useDatePickerWheel({
8786
9265
  },
8787
9266
  [clearAnimationFrame, columnRefs, scheduleScrollSettle, setColumnScrollTop]
8788
9267
  );
8789
- const handleOptionSelect = React29.useCallback(
9268
+ const handleOptionSelect = React30.useCallback(
8790
9269
  (column, targetIndex) => {
8791
9270
  updateDraftDate(column, targetIndex, "smooth");
8792
9271
  },
8793
9272
  [updateDraftDate]
8794
9273
  );
8795
- const focusAdjacentColumn = React29.useCallback(
9274
+ const focusAdjacentColumn = React30.useCallback(
8796
9275
  (column, direction) => {
8797
9276
  const order = ["month", "day", "year"];
8798
9277
  const currentIndex = order.indexOf(column);
@@ -8802,7 +9281,7 @@ function useDatePickerWheel({
8802
9281
  },
8803
9282
  [columnRefs]
8804
9283
  );
8805
- const handleColumnKeyDown = React29.useCallback(
9284
+ const handleColumnKeyDown = React30.useCallback(
8806
9285
  (column, event) => {
8807
9286
  const currentIndex = column === "month" ? monthIndex : column === "day" ? dayIndex : yearIndex;
8808
9287
  const maxIndex = column === "month" ? months.length - 1 : column === "day" ? days.length - 1 : years.length - 1;
@@ -9090,28 +9569,6 @@ function DatePickerContent({
9090
9569
  ) });
9091
9570
  }
9092
9571
 
9093
- // src/lib/use-screen-resize.ts
9094
- var import_react45 = require("react");
9095
- var eventName = "resize";
9096
- function useScreenResize(maxWidth) {
9097
- const [isInitialized, setIsInitialized] = (0, import_react45.useState)(false);
9098
- const [isMatch, setIsMatch] = (0, import_react45.useState)(false);
9099
- const handleResizeEvent = (0, import_react45.useCallback)(() => {
9100
- const adjustedMaxWidth = `${parseInt(maxWidth, 10) - 1}px`;
9101
- const media = getWindow().matchMedia(`(max-width: ${adjustedMaxWidth})`);
9102
- setIsInitialized(true);
9103
- setIsMatch(!!media?.matches);
9104
- }, [maxWidth]);
9105
- (0, import_react45.useLayoutEffect)(() => {
9106
- handleResizeEvent();
9107
- getWindow().addEventListener(eventName, handleResizeEvent);
9108
- return () => {
9109
- getWindow().removeEventListener(eventName, handleResizeEvent);
9110
- };
9111
- }, [handleResizeEvent]);
9112
- return { isMatch, isInitialized };
9113
- }
9114
-
9115
9572
  // src/lib/device.ts
9116
9573
  var DEVICE = {
9117
9574
  mobileS: "320px",
@@ -9128,7 +9585,7 @@ var DEVICE = {
9128
9585
  };
9129
9586
 
9130
9587
  // src/field-trigger/FieldTrigger.tsx
9131
- var React30 = __toESM(require("react"), 1);
9588
+ var React31 = __toESM(require("react"), 1);
9132
9589
  var import_lucide_react41 = require("lucide-react");
9133
9590
  var import_react_i18next22 = require("react-i18next");
9134
9591
 
@@ -9172,7 +9629,7 @@ function FieldErrorMessage({
9172
9629
 
9173
9630
  // src/field-trigger/FieldTrigger.tsx
9174
9631
  var import_jsx_runtime123 = require("react/jsx-runtime");
9175
- var FieldTrigger = React30.forwardRef(
9632
+ var FieldTrigger = React31.forwardRef(
9176
9633
  ({
9177
9634
  as = "button",
9178
9635
  variant = "airbnb",
@@ -9339,7 +9796,7 @@ FieldTrigger.displayName = "FieldTrigger";
9339
9796
  // src/datepicker/DatePicker.tsx
9340
9797
  var import_jsx_runtime124 = require("react/jsx-runtime");
9341
9798
  var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
9342
- var DatePicker = React31.forwardRef(
9799
+ var DatePicker = React32.forwardRef(
9343
9800
  ({
9344
9801
  variant = "default",
9345
9802
  label,
@@ -9365,24 +9822,24 @@ var DatePicker = React31.forwardRef(
9365
9822
  formatValue = formatDateValue
9366
9823
  }, ref) => {
9367
9824
  const { isMatch: isMobile } = useScreenResize(DEVICE.mobileXL);
9368
- const [isOpen, setIsOpen] = React31.useState(false);
9369
- const triggerId = React31.useId();
9370
- const pickerId = React31.useId();
9371
- const labelId = React31.useId();
9372
- const valueId = React31.useId();
9373
- const helperTextId = React31.useId();
9374
- const errorId = React31.useId();
9375
- const internalRef = React31.useRef(null);
9825
+ const [isOpen, setIsOpen] = React32.useState(false);
9826
+ const triggerId = React32.useId();
9827
+ const pickerId = React32.useId();
9828
+ const labelId = React32.useId();
9829
+ const valueId = React32.useId();
9830
+ const helperTextId = React32.useId();
9831
+ const errorId = React32.useId();
9832
+ const internalRef = React32.useRef(null);
9376
9833
  const combinedRef = useCombinedRef(ref, internalRef);
9377
- const monthLabels = React31.useMemo(() => getMonthLabels(locale), [locale]);
9378
- const resolvedMinDate = React31.useMemo(() => minDate ?? DEFAULT_MIN_DATE, [minDate]);
9379
- const resolvedMaxDate = React31.useMemo(() => maxDate ?? /* @__PURE__ */ new Date(), [maxDate]);
9380
- const normalizedValue = React31.useMemo(() => normalizeDateValue(value), [value]);
9381
- const normalizedDefaultValue = React31.useMemo(
9834
+ const monthLabels = React32.useMemo(() => getMonthLabels(locale), [locale]);
9835
+ const resolvedMinDate = React32.useMemo(() => minDate ?? DEFAULT_MIN_DATE, [minDate]);
9836
+ const resolvedMaxDate = React32.useMemo(() => maxDate ?? /* @__PURE__ */ new Date(), [maxDate]);
9837
+ const normalizedValue = React32.useMemo(() => normalizeDateValue(value), [value]);
9838
+ const normalizedDefaultValue = React32.useMemo(
9382
9839
  () => normalizeDateValue(defaultValue),
9383
9840
  [defaultValue]
9384
9841
  );
9385
- const resolvedValue = React31.useMemo(
9842
+ const resolvedValue = React32.useMemo(
9386
9843
  () => normalizedValue ? clampDate(normalizedValue, resolvedMinDate, resolvedMaxDate) : null,
9387
9844
  [normalizedValue, resolvedMaxDate, resolvedMinDate]
9388
9845
  );
@@ -9413,7 +9870,7 @@ var DatePicker = React31.forwardRef(
9413
9870
  minDate: resolvedMinDate,
9414
9871
  maxDate: resolvedMaxDate
9415
9872
  });
9416
- const handleOpenChange = React31.useCallback(
9873
+ const handleOpenChange = React32.useCallback(
9417
9874
  (nextOpen) => {
9418
9875
  if (isBlocked && nextOpen) return;
9419
9876
  setIsOpen(nextOpen);
@@ -9423,7 +9880,7 @@ var DatePicker = React31.forwardRef(
9423
9880
  },
9424
9881
  [isBlocked]
9425
9882
  );
9426
- const handleDone = React31.useCallback(() => {
9883
+ const handleDone = React32.useCallback(() => {
9427
9884
  if (isBlocked) return;
9428
9885
  onChange(clampDate(draftDate, resolvedMinDate, resolvedMaxDate));
9429
9886
  handleOpenChange(false);
@@ -9435,11 +9892,11 @@ var DatePicker = React31.forwardRef(
9435
9892
  resolvedMaxDate,
9436
9893
  resolvedMinDate
9437
9894
  ]);
9438
- const handleTriggerClick = React31.useCallback(() => {
9895
+ const handleTriggerClick = React32.useCallback(() => {
9439
9896
  if (isBlocked) return;
9440
9897
  setIsOpen(true);
9441
9898
  }, [isBlocked]);
9442
- const handleTriggerKeyDown = React31.useCallback(
9899
+ const handleTriggerKeyDown = React32.useCallback(
9443
9900
  (event) => {
9444
9901
  if (isBlocked) return;
9445
9902
  if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
@@ -9449,7 +9906,7 @@ var DatePicker = React31.forwardRef(
9449
9906
  },
9450
9907
  [isBlocked]
9451
9908
  );
9452
- React31.useEffect(() => {
9909
+ React32.useEffect(() => {
9453
9910
  if (isBlocked) {
9454
9911
  setIsOpen(false);
9455
9912
  }
@@ -9631,10 +10088,10 @@ function ResponsiveSheet({
9631
10088
  }
9632
10089
 
9633
10090
  // src/airbnb/input/Input.tsx
9634
- var React32 = __toESM(require("react"), 1);
10091
+ var React33 = __toESM(require("react"), 1);
9635
10092
  var import_jsx_runtime126 = require("react/jsx-runtime");
9636
10093
  var getInputValue = (value) => value != null ? String(value) : "";
9637
- var AirbnbInput = React32.forwardRef(
10094
+ var AirbnbInput = React33.forwardRef(
9638
10095
  ({
9639
10096
  variant = "default",
9640
10097
  label,
@@ -9663,15 +10120,15 @@ var AirbnbInput = React32.forwardRef(
9663
10120
  placeholder,
9664
10121
  ...props
9665
10122
  }, ref) => {
9666
- const generatedId = React32.useId();
9667
- const inputRef = React32.useRef(null);
10123
+ const generatedId = React33.useId();
10124
+ const inputRef = React33.useRef(null);
9668
10125
  const inputId = id ?? generatedId;
9669
10126
  const fieldId = `${inputId}-field`;
9670
10127
  const labelId = `${inputId}-label`;
9671
10128
  const errorId = `${inputId}-error`;
9672
10129
  const accessibleLabel = placeholder ?? label;
9673
- const [isFocused, setIsFocused] = React32.useState(false);
9674
- const [currentValue, setCurrentValue] = React32.useState(
10130
+ const [isFocused, setIsFocused] = React33.useState(false);
10131
+ const [currentValue, setCurrentValue] = React33.useState(
9675
10132
  () => value != null ? getInputValue(value) : getInputValue(defaultValue)
9676
10133
  );
9677
10134
  const resolvedValue = value != null ? getInputValue(value) : currentValue;
@@ -9681,11 +10138,11 @@ var AirbnbInput = React32.forwardRef(
9681
10138
  const triggerError = error ?? invalid;
9682
10139
  const hasLabelMeta = Boolean(optional) || Boolean(tooltip);
9683
10140
  const isBlocked = Boolean(disabled) || Boolean(loading);
9684
- React32.useLayoutEffect(() => {
10141
+ React33.useLayoutEffect(() => {
9685
10142
  const nextValue = value != null ? getInputValue(value) : getInputValue(inputRef.current?.value);
9686
10143
  setCurrentValue((prevValue) => prevValue === nextValue ? prevValue : nextValue);
9687
10144
  }, [value]);
9688
- const setRefs = React32.useCallback(
10145
+ const setRefs = React33.useCallback(
9689
10146
  (node) => {
9690
10147
  inputRef.current = node;
9691
10148
  if (node && value == null) {
@@ -9783,11 +10240,11 @@ var AirbnbInput = React32.forwardRef(
9783
10240
  AirbnbInput.displayName = "Input";
9784
10241
 
9785
10242
  // src/airbnb/phone-field/PhoneField.tsx
9786
- var React38 = __toESM(require("react"), 1);
10243
+ var React39 = __toESM(require("react"), 1);
9787
10244
  var import_lucide_react44 = require("lucide-react");
9788
10245
 
9789
10246
  // src/airbnb/select/Select.tsx
9790
- var React37 = __toESM(require("react"), 1);
10247
+ var React38 = __toESM(require("react"), 1);
9791
10248
 
9792
10249
  // src/airbnb/select/SelectDesktopMenu.tsx
9793
10250
  var import_jsx_runtime127 = require("react/jsx-runtime");
@@ -10132,10 +10589,10 @@ function SelectMobileContent({
10132
10589
  }
10133
10590
 
10134
10591
  // src/airbnb/select/SelectTrigger.tsx
10135
- var React33 = __toESM(require("react"), 1);
10592
+ var React34 = __toESM(require("react"), 1);
10136
10593
  var import_lucide_react43 = require("lucide-react");
10137
10594
  var import_jsx_runtime131 = require("react/jsx-runtime");
10138
- var SelectTrigger2 = React33.forwardRef(
10595
+ var SelectTrigger2 = React34.forwardRef(
10139
10596
  ({
10140
10597
  id,
10141
10598
  open,
@@ -10202,7 +10659,7 @@ var SelectTrigger2 = React33.forwardRef(
10202
10659
  SelectTrigger2.displayName = "SelectTrigger";
10203
10660
 
10204
10661
  // src/airbnb/select/useDesktopSelect.ts
10205
- var React34 = __toESM(require("react"), 1);
10662
+ var React35 = __toESM(require("react"), 1);
10206
10663
  function useDesktopSelect({
10207
10664
  isMobile,
10208
10665
  isOpen,
@@ -10211,12 +10668,12 @@ function useDesktopSelect({
10211
10668
  disabled,
10212
10669
  onChange
10213
10670
  }) {
10214
- const [highlightedIndex, setHighlightedIndex] = React34.useState(-1);
10215
- const triggerRef = React34.useRef(null);
10216
- const listRef = React34.useRef(null);
10217
- const optionRefs = React34.useRef([]);
10671
+ const [highlightedIndex, setHighlightedIndex] = React35.useState(-1);
10672
+ const triggerRef = React35.useRef(null);
10673
+ const listRef = React35.useRef(null);
10674
+ const optionRefs = React35.useRef([]);
10218
10675
  const selectedIndex = getOptionIndex(options, value);
10219
- React34.useEffect(() => {
10676
+ React35.useEffect(() => {
10220
10677
  if (!isOpen || isMobile) return;
10221
10678
  setHighlightedIndex((currentIndex) => {
10222
10679
  if (currentIndex >= 0) {
@@ -10231,34 +10688,34 @@ function useDesktopSelect({
10231
10688
  window.cancelAnimationFrame(frameId);
10232
10689
  };
10233
10690
  }, [isMobile, isOpen, options, selectedIndex]);
10234
- React34.useEffect(() => {
10691
+ React35.useEffect(() => {
10235
10692
  if (!isOpen || isMobile || highlightedIndex < 0) return;
10236
10693
  optionRefs.current[highlightedIndex]?.scrollIntoView({
10237
10694
  block: "nearest"
10238
10695
  });
10239
10696
  }, [highlightedIndex, isMobile, isOpen]);
10240
- React34.useEffect(() => {
10697
+ React35.useEffect(() => {
10241
10698
  if (isOpen) return;
10242
10699
  setHighlightedIndex(-1);
10243
10700
  }, [isOpen]);
10244
- const focusTrigger = React34.useCallback(() => {
10701
+ const focusTrigger = React35.useCallback(() => {
10245
10702
  triggerRef.current?.focus();
10246
10703
  }, []);
10247
- const handleSelect = React34.useCallback(
10704
+ const handleSelect = React35.useCallback(
10248
10705
  (option) => {
10249
10706
  if (option.isDisabled || disabled) return;
10250
10707
  onChange(option);
10251
10708
  },
10252
10709
  [disabled, onChange]
10253
10710
  );
10254
- const openMenu = React34.useCallback(
10711
+ const openMenu = React35.useCallback(
10255
10712
  (targetIndex) => {
10256
10713
  const fallbackIndex = selectedIndex >= 0 ? selectedIndex : getFirstEnabledOptionIndex(options);
10257
10714
  setHighlightedIndex(targetIndex ?? fallbackIndex);
10258
10715
  },
10259
10716
  [options, selectedIndex]
10260
10717
  );
10261
- const handleTriggerKeyDown = React34.useCallback(
10718
+ const handleTriggerKeyDown = React35.useCallback(
10262
10719
  (event, onOpen) => {
10263
10720
  if (disabled) return;
10264
10721
  if (event.key === "ArrowDown") {
@@ -10283,7 +10740,7 @@ function useDesktopSelect({
10283
10740
  },
10284
10741
  [disabled, openMenu, options, selectedIndex]
10285
10742
  );
10286
- const handleMenuKeyDown = React34.useCallback(
10743
+ const handleMenuKeyDown = React35.useCallback(
10287
10744
  (event, onClose) => {
10288
10745
  if (event.key === "Escape") {
10289
10746
  event.preventDefault();
@@ -10333,7 +10790,7 @@ function useDesktopSelect({
10333
10790
  },
10334
10791
  [focusTrigger, highlightedIndex, onChange, options]
10335
10792
  );
10336
- const setOptionRef = React34.useCallback(
10793
+ const setOptionRef = React35.useCallback(
10337
10794
  (index, node) => {
10338
10795
  optionRefs.current[index] = node;
10339
10796
  },
@@ -10353,23 +10810,23 @@ function useDesktopSelect({
10353
10810
  }
10354
10811
 
10355
10812
  // src/airbnb/select/useMobileSelectWheel.ts
10356
- var React35 = __toESM(require("react"), 1);
10813
+ var React36 = __toESM(require("react"), 1);
10357
10814
  function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10358
- const [pendingValue, setPendingValue] = React35.useState(
10815
+ const [pendingValue, setPendingValue] = React36.useState(
10359
10816
  value ?? null
10360
10817
  );
10361
- const [mobileScrollTop, setMobileScrollTop] = React35.useState(0);
10362
- const mobileListRef = React35.useRef(null);
10363
- const scrollSettleTimeoutRef = React35.useRef(null);
10364
- const scrollAnimationFrameRef = React35.useRef(null);
10365
- const getTargetIndex = React35.useCallback(
10818
+ const [mobileScrollTop, setMobileScrollTop] = React36.useState(0);
10819
+ const mobileListRef = React36.useRef(null);
10820
+ const scrollSettleTimeoutRef = React36.useRef(null);
10821
+ const scrollAnimationFrameRef = React36.useRef(null);
10822
+ const getTargetIndex = React36.useCallback(
10366
10823
  (targetValue) => {
10367
10824
  const selectedIndex = getOptionIndex(options, targetValue);
10368
10825
  return selectedIndex >= 0 ? selectedIndex : getFirstEnabledOptionIndex(options);
10369
10826
  },
10370
10827
  [options]
10371
10828
  );
10372
- const syncScrollPosition = React35.useCallback(
10829
+ const syncScrollPosition = React36.useCallback(
10373
10830
  (targetValue, behavior = "instant") => {
10374
10831
  const targetIndex = getTargetIndex(targetValue);
10375
10832
  if (targetIndex < 0) return;
@@ -10388,27 +10845,27 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10388
10845
  },
10389
10846
  [getTargetIndex, options]
10390
10847
  );
10391
- const clearScrollSettleTimeout = React35.useCallback(() => {
10848
+ const clearScrollSettleTimeout = React36.useCallback(() => {
10392
10849
  if (scrollSettleTimeoutRef.current === null) return;
10393
10850
  window.clearTimeout(scrollSettleTimeoutRef.current);
10394
10851
  scrollSettleTimeoutRef.current = null;
10395
10852
  }, []);
10396
- const clearScrollAnimationFrame = React35.useCallback(() => {
10853
+ const clearScrollAnimationFrame = React36.useCallback(() => {
10397
10854
  if (scrollAnimationFrameRef.current === null) return;
10398
10855
  window.cancelAnimationFrame(scrollAnimationFrameRef.current);
10399
10856
  scrollAnimationFrameRef.current = null;
10400
10857
  }, []);
10401
- React35.useEffect(
10858
+ React36.useEffect(
10402
10859
  () => () => {
10403
10860
  clearScrollSettleTimeout();
10404
10861
  clearScrollAnimationFrame();
10405
10862
  },
10406
10863
  [clearScrollAnimationFrame, clearScrollSettleTimeout]
10407
10864
  );
10408
- React35.useEffect(() => {
10865
+ React36.useEffect(() => {
10409
10866
  setPendingValue(value ?? null);
10410
10867
  }, [value]);
10411
- React35.useLayoutEffect(() => {
10868
+ React36.useLayoutEffect(() => {
10412
10869
  if (!isMobile || !isOpen) return;
10413
10870
  const frameId = window.requestAnimationFrame(() => {
10414
10871
  syncScrollPosition(value ?? null, "instant");
@@ -10417,7 +10874,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10417
10874
  window.cancelAnimationFrame(frameId);
10418
10875
  };
10419
10876
  }, [isMobile, isOpen, syncScrollPosition, value]);
10420
- const settleScroll = React35.useCallback(() => {
10877
+ const settleScroll = React36.useCallback(() => {
10421
10878
  if (!mobileListRef.current) return;
10422
10879
  const nextIndex = Math.round(mobileListRef.current.scrollTop / MOBILE_OPTION_HEIGHT);
10423
10880
  const nextOption = options[nextIndex];
@@ -10429,13 +10886,13 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10429
10886
  }
10430
10887
  setPendingValue(nextOption);
10431
10888
  }, [options, pendingValue]);
10432
- const scheduleScrollSettle = React35.useCallback(() => {
10889
+ const scheduleScrollSettle = React36.useCallback(() => {
10433
10890
  clearScrollSettleTimeout();
10434
10891
  scrollSettleTimeoutRef.current = window.setTimeout(() => {
10435
10892
  settleScroll();
10436
10893
  }, MOBILE_SCROLL_SETTLE_DELAY);
10437
10894
  }, [clearScrollSettleTimeout, settleScroll]);
10438
- const handleScroll = React35.useCallback(() => {
10895
+ const handleScroll = React36.useCallback(() => {
10439
10896
  if (!mobileListRef.current) return;
10440
10897
  const nextScrollTop = mobileListRef.current.scrollTop;
10441
10898
  clearScrollAnimationFrame();
@@ -10445,7 +10902,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10445
10902
  });
10446
10903
  scheduleScrollSettle();
10447
10904
  }, [clearScrollAnimationFrame, scheduleScrollSettle]);
10448
- const focusOptionByIndex = React35.useCallback(
10905
+ const focusOptionByIndex = React36.useCallback(
10449
10906
  (index, behavior = "instant", updatePendingImmediately = behavior === "instant") => {
10450
10907
  if (!mobileListRef.current || index < 0 || index >= options.length) return;
10451
10908
  const option = options[index];
@@ -10463,7 +10920,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10463
10920
  },
10464
10921
  [options, scheduleScrollSettle]
10465
10922
  );
10466
- const handleOptionClick = React35.useCallback(
10923
+ const handleOptionClick = React36.useCallback(
10467
10924
  (option) => {
10468
10925
  if (!mobileListRef.current || disabled || option.isDisabled) return;
10469
10926
  const optionIndex = getOptionIndex(options, option);
@@ -10472,7 +10929,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10472
10929
  },
10473
10930
  [disabled, focusOptionByIndex, options]
10474
10931
  );
10475
- const moveByStep = React35.useCallback(
10932
+ const moveByStep = React36.useCallback(
10476
10933
  (step) => {
10477
10934
  const currentIndex = getOptionIndex(options, pendingValue);
10478
10935
  const fallbackIndex = step === 1 ? getFirstEnabledOptionIndex(options) : getLastEnabledOptionIndex(options);
@@ -10484,7 +10941,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10484
10941
  },
10485
10942
  [focusOptionByIndex, options, pendingValue]
10486
10943
  );
10487
- const moveToBoundary = React35.useCallback(
10944
+ const moveToBoundary = React36.useCallback(
10488
10945
  (boundary) => {
10489
10946
  const targetIndex = boundary === "start" ? getFirstEnabledOptionIndex(options) : getLastEnabledOptionIndex(options);
10490
10947
  if (targetIndex >= 0) {
@@ -10493,7 +10950,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10493
10950
  },
10494
10951
  [focusOptionByIndex, options]
10495
10952
  );
10496
- const syncPendingValue = React35.useCallback(
10953
+ const syncPendingValue = React36.useCallback(
10497
10954
  (nextValue) => {
10498
10955
  const normalizedValue = nextValue ?? null;
10499
10956
  const matchedIndex = getOptionIndex(options, normalizedValue);
@@ -10521,9 +10978,9 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10521
10978
  }
10522
10979
 
10523
10980
  // src/airbnb/select/useSelectIds.ts
10524
- var React36 = __toESM(require("react"), 1);
10981
+ var React37 = __toESM(require("react"), 1);
10525
10982
  function useSelectIds({ name, hasValue, error, hideErrorMessage }) {
10526
- const reactId = React36.useId().replace(/:/g, "");
10983
+ const reactId = React37.useId().replace(/:/g, "");
10527
10984
  const baseId = name ? `select-${name}` : `select-${reactId}`;
10528
10985
  const triggerId = `${baseId}-trigger`;
10529
10986
  const labelId = `${baseId}-label`;
@@ -10533,7 +10990,7 @@ function useSelectIds({ name, hasValue, error, hideErrorMessage }) {
10533
10990
  const listboxId = `${baseId}-listbox`;
10534
10991
  const describedErrorId = error && !hideErrorMessage ? errorId : void 0;
10535
10992
  const describedBy = [!hasValue ? helperTextId : null, describedErrorId].filter(Boolean).join(" ") || void 0;
10536
- const getOptionId2 = React36.useCallback(
10993
+ const getOptionId2 = React37.useCallback(
10537
10994
  (index) => `${baseId}-option-${index}`,
10538
10995
  [baseId]
10539
10996
  );
@@ -10550,61 +11007,9 @@ function useSelectIds({ name, hasValue, error, hideErrorMessage }) {
10550
11007
  };
10551
11008
  }
10552
11009
 
10553
- // src/lib/use-outside-click.ts
10554
- var import_react46 = require("react");
10555
- function useOutsideClick(elementRef, onOutsideClick, nested) {
10556
- const handleOutsideClick = (0, import_react46.useRef)(onOutsideClick);
10557
- handleOutsideClick.current = onOutsideClick;
10558
- const checkNestedElements = (0, import_react46.useCallback)(
10559
- (event) => {
10560
- const checkIsElementClickedBySelector = (selector) => {
10561
- const nestedElement = getDocument().querySelector(selector);
10562
- return nestedElement?.contains(event.target);
10563
- };
10564
- const checkDataAttribute = () => {
10565
- const target = event.target;
10566
- if (!target || !(target instanceof HTMLElement)) {
10567
- return false;
10568
- }
10569
- let current = target;
10570
- while (current) {
10571
- if (current.hasAttribute("data-exclude-from-outside-click")) {
10572
- return true;
10573
- }
10574
- current = current.parentElement;
10575
- }
10576
- return false;
10577
- };
10578
- if (nested) {
10579
- if (typeof nested === "string") {
10580
- if (checkIsElementClickedBySelector(nested)) return true;
10581
- } else {
10582
- if (nested.some(checkIsElementClickedBySelector)) return true;
10583
- }
10584
- }
10585
- return checkDataAttribute();
10586
- },
10587
- [nested]
10588
- );
10589
- (0, import_react46.useEffect)(() => {
10590
- function handleClickOutside(event) {
10591
- const isNestedElement = checkNestedElements(event);
10592
- if (elementRef?.current && !elementRef.current.contains(event.target) && !isNestedElement) {
10593
- handleOutsideClick.current?.(event);
10594
- }
10595
- }
10596
- getDocument().addEventListener("mousedown", handleClickOutside, true);
10597
- getDocument().addEventListener("touchstart", handleClickOutside, true);
10598
- return () => {
10599
- getDocument().removeEventListener("mousedown", handleClickOutside, true);
10600
- getDocument().removeEventListener("touchstart", handleClickOutside, true);
10601
- };
10602
- }, [checkNestedElements, elementRef]);
10603
- }
10604
-
10605
11010
  // src/airbnb/select/Select.tsx
10606
11011
  var import_jsx_runtime132 = require("react/jsx-runtime");
10607
- var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
11012
+ var AirbnbSelect = React38.forwardRef(function AirbnbSelect2({
10608
11013
  options = [],
10609
11014
  value,
10610
11015
  onChange,
@@ -10631,8 +11036,8 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10631
11036
  noOptionsMessage
10632
11037
  }, ref) {
10633
11038
  const { isMatch: isMobile } = useScreenResize(DEVICE.mobileXL);
10634
- const [isOpen, setIsOpen] = React37.useState(false);
10635
- const containerRef = React37.useRef(null);
11039
+ const [isOpen, setIsOpen] = React38.useState(false);
11040
+ const containerRef = React38.useRef(null);
10636
11041
  const hasValue = Boolean(value);
10637
11042
  const helperText = placeholder ?? label;
10638
11043
  const isBlocked = Boolean(disabled) || Boolean(loading);
@@ -10686,12 +11091,12 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10686
11091
  const activeMobileIndex = getOptionIndex(options, pendingValue);
10687
11092
  const valueLabel = value ? getValueLabel?.(value) ?? String(value.label) : void 0;
10688
11093
  useOutsideClick(containerRef, isOpen && !isMobile ? () => setIsOpen(false) : null);
10689
- React37.useEffect(() => {
11094
+ React38.useEffect(() => {
10690
11095
  if (isBlocked) {
10691
11096
  setIsOpen(false);
10692
11097
  }
10693
11098
  }, [isBlocked]);
10694
- React37.useEffect(
11099
+ React38.useEffect(
10695
11100
  function setCorrectOptionIfThereIsOnlyValue() {
10696
11101
  if (value?.value === void 0 || value.value === null || value.label !== "") {
10697
11102
  return;
@@ -10703,7 +11108,7 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10703
11108
  },
10704
11109
  [onChange, options, value]
10705
11110
  );
10706
- const handleMobileOpenChange = React37.useCallback(
11111
+ const handleMobileOpenChange = React38.useCallback(
10707
11112
  (nextOpen) => {
10708
11113
  if (isBlocked && nextOpen) return;
10709
11114
  setIsOpen(nextOpen);
@@ -10714,7 +11119,7 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10714
11119
  },
10715
11120
  [focusTrigger, isBlocked, syncPendingValue, value]
10716
11121
  );
10717
- const handleMobileDone = React37.useCallback(() => {
11122
+ const handleMobileDone = React38.useCallback(() => {
10718
11123
  if (isBlocked) return;
10719
11124
  const finalOption = pendingValue;
10720
11125
  if (finalOption && finalOption.value !== value?.value) {
@@ -10723,7 +11128,7 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10723
11128
  setIsOpen(false);
10724
11129
  focusTrigger();
10725
11130
  }, [focusTrigger, isBlocked, onChange, pendingValue, value]);
10726
- const handleTriggerClick = React37.useCallback(() => {
11131
+ const handleTriggerClick = React38.useCallback(() => {
10727
11132
  if (isBlocked) return;
10728
11133
  setIsOpen((prev) => {
10729
11134
  const nextOpen = !prev;
@@ -10892,7 +11297,7 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10892
11297
 
10893
11298
  // src/airbnb/phone-field/PhoneField.tsx
10894
11299
  var import_jsx_runtime133 = require("react/jsx-runtime");
10895
- var PhoneField = React38.forwardRef(
11300
+ var PhoneField = React39.forwardRef(
10896
11301
  ({
10897
11302
  variant = "default",
10898
11303
  label,
@@ -10916,8 +11321,8 @@ var PhoneField = React38.forwardRef(
10916
11321
  mobileTitle,
10917
11322
  codePlaceholder = "+00"
10918
11323
  }, ref) => {
10919
- const inputId = React38.useId();
10920
- const codeOptions = React38.useMemo(
11324
+ const inputId = React39.useId();
11325
+ const codeOptions = React39.useMemo(
10921
11326
  () => options.map((option) => ({
10922
11327
  value: option.value,
10923
11328
  label: `${option.label} (${option.value})`,
@@ -10925,7 +11330,7 @@ var PhoneField = React38.forwardRef(
10925
11330
  })),
10926
11331
  [options]
10927
11332
  );
10928
- const selectedCodeOption = React38.useMemo(
11333
+ const selectedCodeOption = React39.useMemo(
10929
11334
  () => codeOptions.find((option) => option.value === value?.code) ?? null,
10930
11335
  [codeOptions, value?.code]
10931
11336
  );
@@ -11067,11 +11472,11 @@ var PhoneField = React38.forwardRef(
11067
11472
  PhoneField.displayName = "PhoneField";
11068
11473
 
11069
11474
  // src/airbnb/search-input/SearchInput.tsx
11070
- var React39 = __toESM(require("react"), 1);
11475
+ var React40 = __toESM(require("react"), 1);
11071
11476
  var import_react_i18next23 = require("react-i18next");
11072
11477
  var import_lucide_react45 = require("lucide-react");
11073
11478
  var import_jsx_runtime134 = require("react/jsx-runtime");
11074
- var AirbnbSearchInput = React39.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
11479
+ var AirbnbSearchInput = React40.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
11075
11480
  const { t } = (0, import_react_i18next23.useTranslation)();
11076
11481
  const placeholderText = placeholder || t("search_property") + "...";
11077
11482
  return /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
@@ -11109,28 +11514,10 @@ var AirbnbSearchInput = React39.forwardRef(({ onReset, placeholder, wrapperClass
11109
11514
  AirbnbSearchInput.displayName = "SearchInput";
11110
11515
 
11111
11516
  // src/searchable-select/SearchableSelect.tsx
11112
- var React40 = __toESM(require("react"), 1);
11517
+ var React41 = __toESM(require("react"), 1);
11113
11518
  var import_lucide_react46 = require("lucide-react");
11114
11519
  var import_react_virtual = require("@tanstack/react-virtual");
11115
- var import_react48 = require("react");
11116
-
11117
- // src/lib/use-event.ts
11118
- var import_react47 = require("react");
11119
- function useEvent(fn) {
11120
- const fnRef = (0, import_react47.useRef)(fn);
11121
- (0, import_react47.useLayoutEffect)(() => {
11122
- fnRef.current = fn;
11123
- }, [fn]);
11124
- const eventCb = (0, import_react47.useCallback)(
11125
- (...args) => {
11126
- return fnRef.current?.apply(null, args);
11127
- },
11128
- [fnRef]
11129
- );
11130
- return eventCb;
11131
- }
11132
-
11133
- // src/searchable-select/SearchableSelect.tsx
11520
+ var import_react58 = require("react");
11134
11521
  var import_jsx_runtime135 = require("react/jsx-runtime");
11135
11522
  var ROW_HEIGHT = 48;
11136
11523
  var DESKTOP_LIST_HEIGHT = 280;
@@ -11172,13 +11559,13 @@ var SearchableSelectInternal = ({
11172
11559
  loadingMessage
11173
11560
  }, ref) => {
11174
11561
  const { isMatch: isMobile } = useScreenResize(DEVICE.mobileXL);
11175
- const reactId = React40.useId();
11176
- const [open, setOpen] = React40.useState(false);
11177
- const [internalSearchValue, setInternalSearchValue] = React40.useState("");
11178
- const [highlightedIndex, setHighlightedIndex] = React40.useState(-1);
11179
- const containerRef = React40.useRef(null);
11180
- const triggerRef = React40.useRef(null);
11181
- const inputRef = React40.useRef(null);
11562
+ const reactId = React41.useId();
11563
+ const [open, setOpen] = React41.useState(false);
11564
+ const [internalSearchValue, setInternalSearchValue] = React41.useState("");
11565
+ const [highlightedIndex, setHighlightedIndex] = React41.useState(-1);
11566
+ const containerRef = React41.useRef(null);
11567
+ const triggerRef = React41.useRef(null);
11568
+ const inputRef = React41.useRef(null);
11182
11569
  const listboxId = `${reactId}-listbox`;
11183
11570
  const labelId = `${reactId}-label`;
11184
11571
  const valueId = `${reactId}-value`;
@@ -11187,13 +11574,13 @@ var SearchableSelectInternal = ({
11187
11574
  const searchInputId = `${reactId}-search`;
11188
11575
  const effectiveSearchValue = searchValue ?? internalSearchValue;
11189
11576
  const shouldFilterLocally = !onSearchChange && filterOption !== null;
11190
- const visibleOptions = React40.useMemo(() => {
11577
+ const visibleOptions = React41.useMemo(() => {
11191
11578
  if (!shouldFilterLocally || !effectiveSearchValue) {
11192
11579
  return options;
11193
11580
  }
11194
11581
  return options.filter((option) => filterOption(option, effectiveSearchValue));
11195
11582
  }, [effectiveSearchValue, filterOption, options, shouldFilterLocally]);
11196
- const selectedIndex = React40.useMemo(
11583
+ const selectedIndex = React41.useMemo(
11197
11584
  () => visibleOptions.findIndex((option) => option.value === value?.value),
11198
11585
  [value?.value, visibleOptions]
11199
11586
  );
@@ -11205,7 +11592,7 @@ var SearchableSelectInternal = ({
11205
11592
  const activeOptionId = highlightedIndex >= 0 ? getOptionId(reactId, highlightedIndex) : void 0;
11206
11593
  useOutsideClick(containerRef, open && !isMobile ? () => closeSelect() : null);
11207
11594
  const handleOnOpenChange = useEvent(onOpenChange);
11208
- const setSelectOpen = (0, import_react48.useCallback)(
11595
+ const setSelectOpen = (0, import_react58.useCallback)(
11209
11596
  (nextOpen, options2) => {
11210
11597
  setOpen(nextOpen);
11211
11598
  handleOnOpenChange?.(nextOpen);
@@ -11215,7 +11602,7 @@ var SearchableSelectInternal = ({
11215
11602
  },
11216
11603
  [handleOnOpenChange]
11217
11604
  );
11218
- React40.useEffect(() => {
11605
+ React41.useEffect(() => {
11219
11606
  if (isBlocked) {
11220
11607
  setSelectOpen(false);
11221
11608
  return;
@@ -11228,7 +11615,7 @@ var SearchableSelectInternal = ({
11228
11615
  window.cancelAnimationFrame(frameId);
11229
11616
  };
11230
11617
  }, [isBlocked, open, setSelectOpen]);
11231
- React40.useEffect(() => {
11618
+ React41.useEffect(() => {
11232
11619
  if (!open) {
11233
11620
  setHighlightedIndex(-1);
11234
11621
  return;
@@ -11323,7 +11710,7 @@ var SearchableSelectInternal = ({
11323
11710
  onOptionHover: setHighlightedIndex
11324
11711
  }
11325
11712
  );
11326
- React40.useImperativeHandle(ref, () => triggerRef.current, []);
11713
+ React41.useImperativeHandle(ref, () => triggerRef.current, []);
11327
11714
  return /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(
11328
11715
  "div",
11329
11716
  {
@@ -11409,7 +11796,7 @@ var SearchableSelectInternal = ({
11409
11796
  }
11410
11797
  );
11411
11798
  };
11412
- var SearchableSelect = React40.forwardRef(
11799
+ var SearchableSelect = React41.forwardRef(
11413
11800
  SearchableSelectInternal
11414
11801
  );
11415
11802
  function SearchableSelectContent({
@@ -11436,9 +11823,9 @@ function SearchableSelectContent({
11436
11823
  onOptionClick,
11437
11824
  onOptionHover
11438
11825
  }) {
11439
- const listRef = React40.useRef(null);
11440
- const lastLoadMoreOptionsLengthRef = React40.useRef(null);
11441
- const previousHighlightedIndexRef = React40.useRef(highlightedIndex);
11826
+ const listRef = React41.useRef(null);
11827
+ const lastLoadMoreOptionsLengthRef = React41.useRef(null);
11828
+ const previousHighlightedIndexRef = React41.useRef(highlightedIndex);
11442
11829
  const rowCount = options.length + (loading && options.length > 0 ? 1 : 0);
11443
11830
  const virtualizer = (0, import_react_virtual.useVirtualizer)({
11444
11831
  count: rowCount,
@@ -11449,7 +11836,7 @@ function SearchableSelectContent({
11449
11836
  const virtualItems = virtualizer.getVirtualItems();
11450
11837
  const emptyMessage = noOptionsMessage?.() ?? "No matches found";
11451
11838
  const loadingText = loadingMessage?.() ?? "Loading...";
11452
- React40.useEffect(() => {
11839
+ React41.useEffect(() => {
11453
11840
  const lastItem = virtualItems[virtualItems.length - 1];
11454
11841
  const shouldLoadMore = !!lastItem && hasNextPage && !loading && lastItem.index >= options.length - LOAD_MORE_THRESHOLD;
11455
11842
  if (shouldLoadMore && lastLoadMoreOptionsLengthRef.current !== options.length) {
@@ -11457,7 +11844,7 @@ function SearchableSelectContent({
11457
11844
  onLoadMore?.();
11458
11845
  }
11459
11846
  }, [hasNextPage, loading, onLoadMore, options.length, virtualItems]);
11460
- React40.useEffect(() => {
11847
+ React41.useEffect(() => {
11461
11848
  const hasHighlightedIndexChanged = previousHighlightedIndexRef.current !== highlightedIndex;
11462
11849
  previousHighlightedIndexRef.current = highlightedIndex;
11463
11850
  if (highlightedIndex >= 0 && hasHighlightedIndexChanged) {
@@ -11573,6 +11960,39 @@ function getNextEnabledIndex(options, startIndex, step) {
11573
11960
  }
11574
11961
  return -1;
11575
11962
  }
11963
+
11964
+ // src/lib/copy-to-clipboard.ts
11965
+ function copyToClipboardFallback(value) {
11966
+ const targetDocument = getDocument();
11967
+ const targetBody = targetDocument.body;
11968
+ if (!targetBody) {
11969
+ return;
11970
+ }
11971
+ const el = targetDocument.createElement("textarea");
11972
+ el.value = value;
11973
+ el.setAttribute("readonly", "");
11974
+ el.style.position = "fixed";
11975
+ el.style.opacity = "0";
11976
+ el.style.pointerEvents = "none";
11977
+ el.style.left = "-9999px";
11978
+ targetBody.appendChild(el);
11979
+ el.focus();
11980
+ el.select();
11981
+ targetDocument.execCommand("copy");
11982
+ targetBody.removeChild(el);
11983
+ }
11984
+ function copyToClipboard2(value) {
11985
+ const text = typeof value === "number" ? value.toString() : value;
11986
+ const targetDocument = getDocument();
11987
+ const clipboard = targetDocument.defaultView?.navigator?.clipboard ?? globalThis.navigator?.clipboard;
11988
+ if (!clipboard?.writeText) {
11989
+ copyToClipboardFallback(text);
11990
+ return;
11991
+ }
11992
+ void clipboard.writeText(text).catch(() => {
11993
+ copyToClipboardFallback(text);
11994
+ });
11995
+ }
11576
11996
  // Annotate the CommonJS export names for ESM import in node:
11577
11997
  0 && (module.exports = {
11578
11998
  Accordion,
@@ -11825,6 +12245,7 @@ function getNextEnabledIndex(options, startIndex, step) {
11825
12245
  buttonVariants,
11826
12246
  calendarClassNames,
11827
12247
  cn,
12248
+ copyToClipboard,
11828
12249
  emptyMediaVariants,
11829
12250
  getSidebarState,
11830
12251
  inputVariants,
@@ -11838,10 +12259,28 @@ function getNextEnabledIndex(options, startIndex, step) {
11838
12259
  toggleVariants,
11839
12260
  uiKitI18nResources,
11840
12261
  uiKitTranslations,
12262
+ useAbortController,
12263
+ useClickEscape,
12264
+ useCombinedRef,
12265
+ useDebounce,
12266
+ useDebouncedFunction,
12267
+ useEvent,
12268
+ useHover,
12269
+ useIsMobile,
12270
+ useIsMounted,
12271
+ useModalControls,
12272
+ useOutsideClick,
12273
+ usePagination,
12274
+ usePrevious,
11841
12275
  useRadioOptions,
12276
+ useScreenResize,
12277
+ useScrollFrameIntoView,
12278
+ useScrollToTop,
11842
12279
  useSidebar,
11843
12280
  useSidebarMenuButton,
11844
12281
  useSidebarSafe,
12282
+ useTimeout,
12283
+ useTimer,
11845
12284
  useUpdateToast
11846
12285
  });
11847
12286
  //# sourceMappingURL=index.cjs.map