@chekinapp/ui 0.0.24 → 0.0.26

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
@@ -297,6 +297,7 @@ __export(index_exports, {
297
297
  useAbortController: () => useAbortController,
298
298
  useClickEscape: () => useClickEscape,
299
299
  useCombinedRef: () => useCombinedRef,
300
+ useCopyToClipboard: () => useCopyToClipboard,
300
301
  useDebounce: () => useDebounce,
301
302
  useDebouncedFunction: () => useDebouncedFunction,
302
303
  useEvent: () => useEvent,
@@ -307,6 +308,7 @@ __export(index_exports, {
307
308
  useOutsideClick: () => useOutsideClick,
308
309
  usePagination: () => usePagination,
309
310
  usePrevious: () => usePrevious,
311
+ usePromisedModalControls: () => usePromisedModalControls,
310
312
  useRadioOptions: () => useRadioOptions,
311
313
  useScreenResize: () => useScreenResize,
312
314
  useScrollFrameIntoView: () => useScrollFrameIntoView,
@@ -2829,12 +2831,76 @@ function usePagination(config) {
2829
2831
  };
2830
2832
  }
2831
2833
 
2832
- // src/hooks/use-timer.ts
2834
+ // src/hooks/use-copy-to-clipboard.ts
2833
2835
  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);
2836
+
2837
+ // src/lib/copy-to-clipboard.ts
2838
+ function copyToClipboardFallback(value) {
2839
+ const targetDocument = getDocument();
2840
+ const targetBody = targetDocument.body;
2841
+ if (!targetBody) {
2842
+ return;
2843
+ }
2844
+ const el = targetDocument.createElement("textarea");
2845
+ el.value = value;
2846
+ el.setAttribute("readonly", "");
2847
+ el.style.position = "fixed";
2848
+ el.style.opacity = "0";
2849
+ el.style.pointerEvents = "none";
2850
+ el.style.left = "-9999px";
2851
+ targetBody.appendChild(el);
2852
+ el.focus();
2853
+ el.select();
2854
+ targetDocument.execCommand("copy");
2855
+ targetBody.removeChild(el);
2856
+ }
2857
+ function copyToClipboard2(value) {
2858
+ const text = typeof value === "number" ? value.toString() : value;
2859
+ const targetDocument = getDocument();
2860
+ const clipboard = targetDocument.defaultView?.navigator?.clipboard ?? globalThis.navigator?.clipboard;
2861
+ if (!clipboard?.writeText) {
2862
+ copyToClipboardFallback(text);
2863
+ return;
2864
+ }
2865
+ void clipboard.writeText(text).catch(() => {
2866
+ copyToClipboardFallback(text);
2867
+ });
2868
+ }
2869
+
2870
+ // src/hooks/use-copy-to-clipboard.ts
2871
+ var COPIED_TIMEOUT_S = 1.5;
2872
+ function useCopyToClipboard({ value, onCopiedLink, onReset }) {
2873
+ const [isCopied, setIsLinkCopied] = (0, import_react23.useState)(false);
2874
+ const timeoutRef = (0, import_react23.useRef)();
2837
2875
  (0, import_react23.useEffect)(() => {
2876
+ return () => {
2877
+ if (timeoutRef.current) {
2878
+ clearTimeout(timeoutRef.current);
2879
+ }
2880
+ };
2881
+ }, []);
2882
+ const copy = () => {
2883
+ if (!value) return;
2884
+ if (timeoutRef.current) {
2885
+ clearTimeout(timeoutRef.current);
2886
+ }
2887
+ copyToClipboard2(value);
2888
+ setIsLinkCopied(true);
2889
+ timeoutRef.current = setTimeout(() => {
2890
+ setIsLinkCopied(false);
2891
+ onReset?.();
2892
+ }, COPIED_TIMEOUT_S * 1e3);
2893
+ onCopiedLink?.();
2894
+ };
2895
+ return { isCopied, copy };
2896
+ }
2897
+
2898
+ // src/hooks/use-timer.ts
2899
+ var import_react24 = require("react");
2900
+ var useTimer = ({ seconds }) => {
2901
+ const [timeLeft, setTimeLeft] = (0, import_react24.useState)(seconds);
2902
+ const [isTimerRunning, setIsTimerRunning] = (0, import_react24.useState)(true);
2903
+ (0, import_react24.useEffect)(() => {
2838
2904
  if (!isTimerRunning) return;
2839
2905
  const timer = setInterval(() => {
2840
2906
  setTimeLeft((prev) => {
@@ -2860,32 +2926,32 @@ var useTimer = ({ seconds }) => {
2860
2926
  };
2861
2927
 
2862
2928
  // src/hooks/use-timeout.ts
2863
- var import_react24 = require("react");
2929
+ var import_react25 = require("react");
2864
2930
  function useTimeout() {
2865
- const timeoutRef = (0, import_react24.useRef)();
2866
- const clearTimeoutRef = (0, import_react24.useCallback)(() => {
2931
+ const timeoutRef = (0, import_react25.useRef)();
2932
+ const clearTimeoutRef = (0, import_react25.useCallback)(() => {
2867
2933
  clearTimeout(timeoutRef.current);
2868
2934
  timeoutRef.current = void 0;
2869
2935
  }, []);
2870
- const scheduleTimeout = (0, import_react24.useCallback)(
2936
+ const scheduleTimeout = (0, import_react25.useCallback)(
2871
2937
  (callback, delay) => {
2872
2938
  clearTimeoutRef();
2873
2939
  timeoutRef.current = setTimeout(callback, delay);
2874
2940
  },
2875
2941
  [clearTimeoutRef]
2876
2942
  );
2877
- (0, import_react24.useEffect)(() => clearTimeoutRef, [clearTimeoutRef]);
2943
+ (0, import_react25.useEffect)(() => clearTimeoutRef, [clearTimeoutRef]);
2878
2944
  return { scheduleTimeout, clearTimeoutRef };
2879
2945
  }
2880
2946
 
2881
2947
  // src/hooks/use-hover.ts
2882
- var import_react25 = require("react");
2948
+ var import_react26 = require("react");
2883
2949
  function useHover() {
2884
- const [isHovering, setIsHovering] = (0, import_react25.useState)(false);
2885
- const handleMouseEnter = (0, import_react25.useCallback)(() => {
2950
+ const [isHovering, setIsHovering] = (0, import_react26.useState)(false);
2951
+ const handleMouseEnter = (0, import_react26.useCallback)(() => {
2886
2952
  setIsHovering(true);
2887
2953
  }, []);
2888
- const handleMouseLeave = (0, import_react25.useCallback)(() => {
2954
+ const handleMouseLeave = (0, import_react26.useCallback)(() => {
2889
2955
  setIsHovering(false);
2890
2956
  }, []);
2891
2957
  return {
@@ -2895,6 +2961,25 @@ function useHover() {
2895
2961
  };
2896
2962
  }
2897
2963
 
2964
+ // src/hooks/use-promised-modal-controls.ts
2965
+ var import_react27 = require("react");
2966
+ var usePromisedModalControls = () => {
2967
+ const { closeModal, isOpen, openModal } = useModalControls();
2968
+ const resolveRef = (0, import_react27.useRef)();
2969
+ const openModalWithPromise = async () => {
2970
+ openModal();
2971
+ return new Promise((resolve) => {
2972
+ resolveRef.current = resolve;
2973
+ });
2974
+ };
2975
+ return {
2976
+ isOpen,
2977
+ openModal: openModalWithPromise,
2978
+ closeModal,
2979
+ resolveRef
2980
+ };
2981
+ };
2982
+
2898
2983
  // src/dialog/Dialog.tsx
2899
2984
  var import_jsx_runtime31 = require("react/jsx-runtime");
2900
2985
  function useIframeTitleFix(titleRef) {
@@ -3130,7 +3215,7 @@ function DownloadEntryFormsButton({
3130
3215
  }
3131
3216
 
3132
3217
  // src/dropdown-button/DropdownButton.tsx
3133
- var import_react26 = require("react");
3218
+ var import_react28 = require("react");
3134
3219
 
3135
3220
  // src/dropdown-menu/DropdownMenu.tsx
3136
3221
  var React13 = __toESM(require("react"), 1);
@@ -3194,7 +3279,7 @@ function DropdownButton({
3194
3279
  modal,
3195
3280
  className
3196
3281
  }) {
3197
- const [isOpen, setIsOpen] = (0, import_react26.useState)(false);
3282
+ const [isOpen, setIsOpen] = (0, import_react28.useState)(false);
3198
3283
  return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(DropdownMenu, { onOpenChange: setIsOpen, modal, children: [
3199
3284
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownMenuTrigger, { asChild: true, children: typeof trigger === "function" ? trigger(isOpen) : trigger }),
3200
3285
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
@@ -3321,7 +3406,7 @@ var import_lucide_react12 = require("lucide-react");
3321
3406
  var import_react_i18next7 = require("react-i18next");
3322
3407
 
3323
3408
  // src/halo-icon/HaloIcon.tsx
3324
- var import_react27 = require("react");
3409
+ var import_react29 = require("react");
3325
3410
 
3326
3411
  // src/halo-icon/constants.ts
3327
3412
  var HALO_ICON_STATUS = {
@@ -3351,7 +3436,7 @@ var statusStyles = {
3351
3436
  color: "text-chekin-red"
3352
3437
  }
3353
3438
  };
3354
- var HaloIcon = (0, import_react27.forwardRef)(
3439
+ var HaloIcon = (0, import_react29.forwardRef)(
3355
3440
  ({
3356
3441
  children,
3357
3442
  variant = "default",
@@ -3532,7 +3617,7 @@ var Switch = React15.forwardRef(
3532
3617
  Switch.displayName = SwitchPrimitives.Root.displayName;
3533
3618
 
3534
3619
  // src/video-player/VideoPlayer.tsx
3535
- var import_react28 = require("react");
3620
+ var import_react30 = require("react");
3536
3621
  var import_react_i18next8 = require("react-i18next");
3537
3622
  var import_lucide_react13 = require("lucide-react");
3538
3623
  var import_jsx_runtime47 = require("react/jsx-runtime");
@@ -3545,20 +3630,20 @@ function VideoPlayer({
3545
3630
  autoPlay = false
3546
3631
  }) {
3547
3632
  const { t } = (0, import_react_i18next8.useTranslation)();
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)("");
3633
+ const videoRef = (0, import_react30.useRef)(null);
3634
+ const iframeRef = (0, import_react30.useRef)(null);
3635
+ const containerRef = (0, import_react30.useRef)(null);
3636
+ const [isPlaying, setIsPlaying] = (0, import_react30.useState)(false);
3637
+ const [isMuted, setIsMuted] = (0, import_react30.useState)(false);
3638
+ const [currentTime, setCurrentTime] = (0, import_react30.useState)(0);
3639
+ const [duration, setDuration] = (0, import_react30.useState)(0);
3640
+ const [isFullScreenMode, setIsFullScreenMode] = (0, import_react30.useState)(isFullScreen);
3641
+ const [isLoading, setIsLoading] = (0, import_react30.useState)(true);
3642
+ const [videoSource, setVideoSource] = (0, import_react30.useState)("file");
3643
+ const [youtubeEmbedUrl, setYoutubeEmbedUrl] = (0, import_react30.useState)("");
3644
+ const [vimeoEmbedUrl, setVimeoEmbedUrl] = (0, import_react30.useState)("");
3560
3645
  useClickEscape({ enabled: isFullScreenMode, onClick: onClose });
3561
- (0, import_react28.useEffect)(() => {
3646
+ (0, import_react30.useEffect)(() => {
3562
3647
  const youtubeRegex = /(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/;
3563
3648
  const vimeoRegex = /(?:vimeo\.com\/|vimeo\.com\/video\/)(\d+)/;
3564
3649
  const youtubeMatch = src.match(youtubeRegex);
@@ -3587,7 +3672,7 @@ function VideoPlayer({
3587
3672
  setYoutubeEmbedUrl("");
3588
3673
  setVimeoEmbedUrl("");
3589
3674
  }, [src, autoPlay]);
3590
- (0, import_react28.useEffect)(() => {
3675
+ (0, import_react30.useEffect)(() => {
3591
3676
  if (videoSource !== "file") return;
3592
3677
  const video = videoRef.current;
3593
3678
  if (!video) return;
@@ -3615,7 +3700,7 @@ function VideoPlayer({
3615
3700
  video.removeEventListener("canplay", handleCanPlay);
3616
3701
  };
3617
3702
  }, [videoSource]);
3618
- (0, import_react28.useEffect)(() => {
3703
+ (0, import_react30.useEffect)(() => {
3619
3704
  if (isFullScreenMode && videoRef.current && videoSource === "file") {
3620
3705
  void videoRef.current.play();
3621
3706
  setIsPlaying(true);
@@ -3892,10 +3977,10 @@ function FeatureCard({
3892
3977
  }
3893
3978
 
3894
3979
  // src/file-input-button/FileInputButton.tsx
3895
- var import_react29 = require("react");
3980
+ var import_react31 = require("react");
3896
3981
  var import_lucide_react15 = require("lucide-react");
3897
3982
  var import_jsx_runtime49 = require("react/jsx-runtime");
3898
- var FileInputButton = (0, import_react29.forwardRef)(
3983
+ var FileInputButton = (0, import_react31.forwardRef)(
3899
3984
  ({
3900
3985
  label,
3901
3986
  onChange,
@@ -3907,7 +3992,7 @@ var FileInputButton = (0, import_react29.forwardRef)(
3907
3992
  size = "default",
3908
3993
  ...props
3909
3994
  }, ref) => {
3910
- const handleChange = (0, import_react29.useCallback)(
3995
+ const handleChange = (0, import_react31.useCallback)(
3911
3996
  (event) => {
3912
3997
  onChange?.(event);
3913
3998
  event.target.value = "";
@@ -3987,7 +4072,7 @@ var FormBox = {
3987
4072
  };
3988
4073
 
3989
4074
  // src/free-text-field/FreeTextField.tsx
3990
- var import_react30 = require("react");
4075
+ var import_react32 = require("react");
3991
4076
  var import_react_i18next10 = require("react-i18next");
3992
4077
 
3993
4078
  // src/free-text-field/styles.module.css
@@ -3995,7 +4080,7 @@ var styles_default3 = {};
3995
4080
 
3996
4081
  // src/free-text-field/FreeTextField.tsx
3997
4082
  var import_jsx_runtime54 = require("react/jsx-runtime");
3998
- var FreeTextField = (0, import_react30.forwardRef)(
4083
+ var FreeTextField = (0, import_react32.forwardRef)(
3999
4084
  ({
4000
4085
  label,
4001
4086
  error,
@@ -4017,9 +4102,9 @@ var FreeTextField = (0, import_react30.forwardRef)(
4017
4102
  ...inputProps
4018
4103
  }, ref) => {
4019
4104
  const { t } = (0, import_react_i18next10.useTranslation)();
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);
4105
+ const inputId = (0, import_react32.useId)();
4106
+ const [internalValue, setInternalValue] = (0, import_react32.useState)(defaultValue ?? "");
4107
+ const [isFocused, setIsFocused] = (0, import_react32.useState)(false);
4023
4108
  const currentValue = value !== void 0 ? value : internalValue;
4024
4109
  const isEmpty = !currentValue || String(currentValue).length === 0;
4025
4110
  const hasError = Boolean(error);
@@ -4142,9 +4227,9 @@ var FramedIcon = React16.forwardRef(
4142
4227
  FramedIcon.displayName = "FramedIcon";
4143
4228
 
4144
4229
  // src/grid-items/GridItems.tsx
4145
- var import_react31 = require("react");
4230
+ var import_react33 = require("react");
4146
4231
  var import_jsx_runtime56 = require("react/jsx-runtime");
4147
- var GridItems = (0, import_react31.forwardRef)(
4232
+ var GridItems = (0, import_react33.forwardRef)(
4148
4233
  ({ children, title, placeholder, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
4149
4234
  "div",
4150
4235
  {
@@ -4221,9 +4306,9 @@ function HelpTooltip({
4221
4306
  }
4222
4307
 
4223
4308
  // src/icon/Icon.tsx
4224
- var import_react32 = require("react");
4309
+ var import_react34 = require("react");
4225
4310
  var import_jsx_runtime58 = require("react/jsx-runtime");
4226
- var MissingIcon = (0, import_react32.forwardRef)(
4311
+ var MissingIcon = (0, import_react34.forwardRef)(
4227
4312
  ({ size = 24, className = "", fallback = null, color, ...props }, ref) => {
4228
4313
  if (fallback) {
4229
4314
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: fallback });
@@ -4252,8 +4337,8 @@ var MissingIcon = (0, import_react32.forwardRef)(
4252
4337
  }
4253
4338
  );
4254
4339
  MissingIcon.displayName = "MissingIcon";
4255
- var Icon = (0, import_react32.memo)(
4256
- (0, import_react32.forwardRef)(
4340
+ var Icon = (0, import_react34.memo)(
4341
+ (0, import_react34.forwardRef)(
4257
4342
  ({ name: _name, size = 24, className = "", fallback = null, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4258
4343
  MissingIcon,
4259
4344
  {
@@ -4351,7 +4436,7 @@ function InfoBox({ className, children }) {
4351
4436
  }
4352
4437
 
4353
4438
  // src/image/Image.tsx
4354
- var import_react33 = require("react");
4439
+ var import_react35 = require("react");
4355
4440
  var import_jsx_runtime61 = require("react/jsx-runtime");
4356
4441
  function Image2({
4357
4442
  src,
@@ -4360,7 +4445,7 @@ function Image2({
4360
4445
  fallbackSrc = "https://placehold.co/600x400?text=Image",
4361
4446
  ...props
4362
4447
  }) {
4363
- const [error, setError] = (0, import_react33.useState)(false);
4448
+ const [error, setError] = (0, import_react35.useState)(false);
4364
4449
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4365
4450
  "img",
4366
4451
  {
@@ -4404,10 +4489,10 @@ Input.displayName = "Input";
4404
4489
  var React19 = __toESM(require("react"), 1);
4405
4490
 
4406
4491
  // src/input-otp/InputOTPContext.ts
4407
- var import_react34 = require("react");
4408
- var InputOTPContext = (0, import_react34.createContext)(null);
4492
+ var import_react36 = require("react");
4493
+ var InputOTPContext = (0, import_react36.createContext)(null);
4409
4494
  function useInputOTPContext() {
4410
- const ctx = (0, import_react34.useContext)(InputOTPContext);
4495
+ const ctx = (0, import_react36.useContext)(InputOTPContext);
4411
4496
  if (!ctx) {
4412
4497
  throw new Error("InputOTP compound components must be used within <InputOTP>");
4413
4498
  }
@@ -4419,7 +4504,7 @@ function extractDigits(str) {
4419
4504
  }
4420
4505
 
4421
4506
  // src/input-otp/useInputOTP.ts
4422
- var import_react35 = require("react");
4507
+ var import_react37 = require("react");
4423
4508
  function useInputOTP({
4424
4509
  maxLength,
4425
4510
  value,
@@ -4428,12 +4513,12 @@ function useInputOTP({
4428
4513
  autoFocus,
4429
4514
  error
4430
4515
  }) {
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)(() => {
4516
+ const [activeIndex, setActiveIndex] = (0, import_react37.useState)(-1);
4517
+ const inputRefs = (0, import_react37.useRef)([]);
4518
+ const containerRef = (0, import_react37.useRef)(null);
4519
+ const blurTimeoutRef = (0, import_react37.useRef)();
4520
+ const slotsRef = (0, import_react37.useRef)(Array.from({ length: maxLength }, () => ""));
4521
+ const slots = (0, import_react37.useMemo)(() => {
4437
4522
  const nextSlots = Array.from({ length: maxLength }, () => "");
4438
4523
  for (let index = 0; index < Math.min(value.length, maxLength); index += 1) {
4439
4524
  const char = value[index];
@@ -4444,7 +4529,7 @@ function useInputOTP({
4444
4529
  return nextSlots;
4445
4530
  }, [value, maxLength]);
4446
4531
  slotsRef.current = slots;
4447
- const emitValue = (0, import_react35.useCallback)(
4532
+ const emitValue = (0, import_react37.useCallback)(
4448
4533
  (newSlots) => {
4449
4534
  let lastFilledIndex = -1;
4450
4535
  for (let index = newSlots.length - 1; index >= 0; index -= 1) {
@@ -4465,12 +4550,12 @@ function useInputOTP({
4465
4550
  },
4466
4551
  [onChange]
4467
4552
  );
4468
- (0, import_react35.useEffect)(() => {
4553
+ (0, import_react37.useEffect)(() => {
4469
4554
  if (autoFocus && inputRefs.current[0]) {
4470
4555
  inputRefs.current[0].focus();
4471
4556
  }
4472
4557
  }, [autoFocus]);
4473
- const handleContainerFocusIn = (0, import_react35.useCallback)((event) => {
4558
+ const handleContainerFocusIn = (0, import_react37.useCallback)((event) => {
4474
4559
  clearTimeout(blurTimeoutRef.current);
4475
4560
  const target = event.target;
4476
4561
  const slotIndex = inputRefs.current.indexOf(target);
@@ -4478,7 +4563,7 @@ function useInputOTP({
4478
4563
  setActiveIndex(slotIndex);
4479
4564
  }
4480
4565
  }, []);
4481
- const handleContainerFocusOut = (0, import_react35.useCallback)(() => {
4566
+ const handleContainerFocusOut = (0, import_react37.useCallback)(() => {
4482
4567
  clearTimeout(blurTimeoutRef.current);
4483
4568
  blurTimeoutRef.current = setTimeout(() => {
4484
4569
  if (!containerRef.current?.contains(document.activeElement)) {
@@ -4486,8 +4571,8 @@ function useInputOTP({
4486
4571
  }
4487
4572
  }, 0);
4488
4573
  }, []);
4489
- (0, import_react35.useEffect)(() => () => clearTimeout(blurTimeoutRef.current), []);
4490
- const handleDigitInput = (0, import_react35.useCallback)(
4574
+ (0, import_react37.useEffect)(() => () => clearTimeout(blurTimeoutRef.current), []);
4575
+ const handleDigitInput = (0, import_react37.useCallback)(
4491
4576
  (index, digit) => {
4492
4577
  if (!DIGIT_REGEX.test(digit)) return;
4493
4578
  const newSlots = [...slotsRef.current];
@@ -4501,7 +4586,7 @@ function useInputOTP({
4501
4586
  },
4502
4587
  [maxLength, emitValue]
4503
4588
  );
4504
- const handleDelete = (0, import_react35.useCallback)(
4589
+ const handleDelete = (0, import_react37.useCallback)(
4505
4590
  (index) => {
4506
4591
  const newSlots = [...slotsRef.current];
4507
4592
  if (newSlots[index]) {
@@ -4516,7 +4601,7 @@ function useInputOTP({
4516
4601
  },
4517
4602
  [emitValue]
4518
4603
  );
4519
- const handlePaste = (0, import_react35.useCallback)(
4604
+ const handlePaste = (0, import_react37.useCallback)(
4520
4605
  (text) => {
4521
4606
  const digits = extractDigits(text).slice(0, maxLength);
4522
4607
  if (digits.length > 0) {
@@ -4532,7 +4617,7 @@ function useInputOTP({
4532
4617
  },
4533
4618
  [maxLength, emitValue]
4534
4619
  );
4535
- const contextValue = (0, import_react35.useMemo)(
4620
+ const contextValue = (0, import_react37.useMemo)(
4536
4621
  () => ({
4537
4622
  slots,
4538
4623
  activeIndex,
@@ -4565,7 +4650,7 @@ function useInputOTP({
4565
4650
  }
4566
4651
 
4567
4652
  // src/input-otp/useInputOTPSlot.ts
4568
- var import_react36 = require("react");
4653
+ var import_react38 = require("react");
4569
4654
  function useInputOTPSlot(index) {
4570
4655
  const {
4571
4656
  slots,
@@ -4635,13 +4720,13 @@ function useInputOTPSlot(index) {
4635
4720
  event.preventDefault();
4636
4721
  handlePaste(event.clipboardData.getData("text/plain"));
4637
4722
  };
4638
- const setInputRef = (0, import_react36.useCallback)(
4723
+ const setInputRef = (0, import_react38.useCallback)(
4639
4724
  (element) => {
4640
4725
  inputRefs.current[index] = element;
4641
4726
  },
4642
4727
  [index, inputRefs]
4643
4728
  );
4644
- const focusSlot = (0, import_react36.useCallback)(() => {
4729
+ const focusSlot = (0, import_react38.useCallback)(() => {
4645
4730
  inputRefs.current[index]?.focus();
4646
4731
  }, [index, inputRefs]);
4647
4732
  return {
@@ -4743,7 +4828,7 @@ var InputOTPSeparator = React19.forwardRef(
4743
4828
  InputOTPSeparator.displayName = "InputOTPSeparator";
4744
4829
 
4745
4830
  // src/icons-dropdown/IconsDropdown.tsx
4746
- var import_react37 = require("react");
4831
+ var import_react39 = require("react");
4747
4832
  var import_jsx_runtime64 = require("react/jsx-runtime");
4748
4833
  function IconsDropdown({
4749
4834
  icons,
@@ -4755,7 +4840,7 @@ function IconsDropdown({
4755
4840
  defaultOpen,
4756
4841
  onOpenChange: onOpenChangeProp
4757
4842
  }) {
4758
- const [open, setOpen] = (0, import_react37.useState)(defaultOpen ?? false);
4843
+ const [open, setOpen] = (0, import_react39.useState)(defaultOpen ?? false);
4759
4844
  function handleOpenChange(value) {
4760
4845
  setOpen(value);
4761
4846
  onOpenChangeProp?.(value);
@@ -5338,9 +5423,9 @@ function LearnMoreButton({ label, ...props }) {
5338
5423
  }
5339
5424
 
5340
5425
  // src/link/Link.tsx
5341
- var import_react38 = require("react");
5426
+ var import_react40 = require("react");
5342
5427
  var import_jsx_runtime68 = require("react/jsx-runtime");
5343
- var LinkInternal = (0, import_react38.forwardRef)(
5428
+ var LinkInternal = (0, import_react40.forwardRef)(
5344
5429
  ({ disabled = false, className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5345
5430
  "a",
5346
5431
  {
@@ -5359,17 +5444,17 @@ var LinkInternal = (0, import_react38.forwardRef)(
5359
5444
  )
5360
5445
  );
5361
5446
  LinkInternal.displayName = "Link";
5362
- var Link = (0, import_react38.memo)(LinkInternal);
5447
+ var Link = (0, import_react40.memo)(LinkInternal);
5363
5448
 
5364
5449
  // src/image-full-screen-view/ImageFullScreenView.tsx
5365
- var import_react39 = require("react");
5450
+ var import_react41 = require("react");
5366
5451
  var import_lucide_react20 = require("lucide-react");
5367
5452
  var import_react_i18next13 = require("react-i18next");
5368
5453
  var import_jsx_runtime69 = require("react/jsx-runtime");
5369
5454
  function ImageFullScreenView({ src, alt, onClose }) {
5370
5455
  const { t } = (0, import_react_i18next13.useTranslation)();
5371
- const [scale, setScale] = (0, import_react39.useState)(1);
5372
- const [rotation, setRotation] = (0, import_react39.useState)(0);
5456
+ const [scale, setScale] = (0, import_react41.useState)(1);
5457
+ const [rotation, setRotation] = (0, import_react41.useState)(0);
5373
5458
  useClickEscape({ onClick: onClose });
5374
5459
  const zoomIn = () => setScale((value) => Math.min(value + 0.25, 3));
5375
5460
  const zoomOut = () => setScale((value) => Math.max(value - 0.25, 0.5));
@@ -5567,7 +5652,7 @@ var METRIC_CARD_VARIANTS = {
5567
5652
  };
5568
5653
 
5569
5654
  // src/modal/Modal.tsx
5570
- var import_react40 = require("react");
5655
+ var import_react42 = require("react");
5571
5656
  var import_lucide_react23 = require("lucide-react");
5572
5657
 
5573
5658
  // src/modal/styles.module.css
@@ -5598,7 +5683,7 @@ function Modal({
5598
5683
  container,
5599
5684
  modal
5600
5685
  }) {
5601
- const contentRef = (0, import_react40.useRef)(null);
5686
+ const contentRef = (0, import_react42.useRef)(null);
5602
5687
  useScrollFrameIntoView(open, { elementRef: contentRef });
5603
5688
  const handleClose = () => {
5604
5689
  onOpenChange?.(false);
@@ -5640,7 +5725,7 @@ function Modal({
5640
5725
  }
5641
5726
  ) });
5642
5727
  }
5643
- var ModalButton = (0, import_react40.forwardRef)(
5728
+ var ModalButton = (0, import_react42.forwardRef)(
5644
5729
  ({ children, size, className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5645
5730
  Button,
5646
5731
  {
@@ -5656,9 +5741,9 @@ ModalButton.displayName = "ModalButton";
5656
5741
  Modal.displayName = "Modal";
5657
5742
 
5658
5743
  // src/modal-loader/ModalLoader.tsx
5659
- var import_react41 = require("react");
5744
+ var import_react43 = require("react");
5660
5745
  var import_jsx_runtime73 = require("react/jsx-runtime");
5661
- var ModalLoader = (0, import_react41.memo)(({ visible, className }) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5746
+ var ModalLoader = (0, import_react43.memo)(({ visible, className }) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5662
5747
  "div",
5663
5748
  {
5664
5749
  className: cn(
@@ -6046,7 +6131,7 @@ var PopoverContent = React21.forwardRef(({ className, sideOffset = 8, align = "s
6046
6131
  PopoverContent.displayName = "PopoverContent";
6047
6132
 
6048
6133
  // src/radio/Radio.tsx
6049
- var import_react43 = require("react");
6134
+ var import_react45 = require("react");
6050
6135
 
6051
6136
  // src/radio-group/RadioGroup.tsx
6052
6137
  var React22 = __toESM(require("react"), 1);
@@ -6079,11 +6164,11 @@ var RadioGroupItem = React22.forwardRef(({ className, ...props }, ref) => /* @__
6079
6164
  RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
6080
6165
 
6081
6166
  // src/radio/useRadioOptions.ts
6082
- var import_react42 = require("react");
6167
+ var import_react44 = require("react");
6083
6168
  function useRadioOptions({ options, defaultValue, onChange }) {
6084
6169
  const initialValue = (typeof defaultValue === "string" ? options.find((option) => option.value === defaultValue) : defaultValue) || "";
6085
- const [selectedValue, setSelectedValue] = (0, import_react42.useState)(initialValue);
6086
- const handleValueChange = (0, import_react42.useCallback)(
6170
+ const [selectedValue, setSelectedValue] = (0, import_react44.useState)(initialValue);
6171
+ const handleValueChange = (0, import_react44.useCallback)(
6087
6172
  (value) => {
6088
6173
  setSelectedValue(value);
6089
6174
  const selectedOption = options.find((option) => option.value === value) || "";
@@ -6104,7 +6189,7 @@ var styles_default5 = {};
6104
6189
 
6105
6190
  // src/radio/Radio.tsx
6106
6191
  var import_jsx_runtime80 = require("react/jsx-runtime");
6107
- var Radio = (0, import_react43.forwardRef)(
6192
+ var Radio = (0, import_react45.forwardRef)(
6108
6193
  ({ options, value, onChange, error, className = "", disabled = false, renderOption }, ref) => {
6109
6194
  const { selectedValue, handleValueChange } = useRadioOptions({
6110
6195
  options,
@@ -6494,7 +6579,7 @@ var SectionTagColors = /* @__PURE__ */ ((SectionTagColors2) => {
6494
6579
  })(SectionTagColors || {});
6495
6580
 
6496
6581
  // src/section/Section.tsx
6497
- var import_react44 = require("react");
6582
+ var import_react46 = require("react");
6498
6583
  var import_lucide_react31 = require("lucide-react");
6499
6584
 
6500
6585
  // src/section/constants.ts
@@ -6521,7 +6606,7 @@ function TooltipInfo({ content, className }) {
6521
6606
  }
6522
6607
  ) });
6523
6608
  }
6524
- var Section = (0, import_react44.forwardRef)(
6609
+ var Section = (0, import_react46.forwardRef)(
6525
6610
  ({
6526
6611
  children,
6527
6612
  title,
@@ -6573,17 +6658,17 @@ var Section = (0, import_react44.forwardRef)(
6573
6658
  )
6574
6659
  );
6575
6660
  Section.displayName = "Section";
6576
- var SubSection = (0, import_react44.forwardRef)(
6661
+ var SubSection = (0, import_react46.forwardRef)(
6577
6662
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Section, { ref, className: cn(Section_default.section_sub, className), ...props })
6578
6663
  );
6579
6664
  SubSection.displayName = "SubSection";
6580
- var DividingSubsection = (0, import_react44.forwardRef)(
6665
+ var DividingSubsection = (0, import_react46.forwardRef)(
6581
6666
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(SubSection, { ref, className: cn(Section_default.section_dividing, className), ...props })
6582
6667
  );
6583
6668
  DividingSubsection.displayName = "DividingSubsection";
6584
6669
 
6585
6670
  // src/selectors/Selectors.tsx
6586
- var import_react45 = require("react");
6671
+ var import_react47 = require("react");
6587
6672
 
6588
6673
  // src/selector-button/styles.module.css
6589
6674
  var styles_default7 = {};
@@ -6655,8 +6740,8 @@ var getValueArray = (value) => {
6655
6740
  return [];
6656
6741
  };
6657
6742
  function getSelectorContent(label, disabled, readOnly, active) {
6658
- if ((0, import_react45.isValidElement)(label)) {
6659
- return (0, import_react45.cloneElement)(label, {
6743
+ if ((0, import_react47.isValidElement)(label)) {
6744
+ return (0, import_react47.cloneElement)(label, {
6660
6745
  disabled,
6661
6746
  readOnly,
6662
6747
  active
@@ -6701,7 +6786,7 @@ function SelectorsInternal({
6701
6786
  }
6702
6787
  };
6703
6788
  const isAnyActive = getValueArray(value).length > 0;
6704
- (0, import_react45.useEffect)(() => {
6789
+ (0, import_react47.useEffect)(() => {
6705
6790
  onAnySelectorActive?.(isAnyActive);
6706
6791
  }, [isAnyActive, onAnySelectorActive]);
6707
6792
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(import_jsx_runtime91.Fragment, { children: [
@@ -6744,7 +6829,7 @@ function SelectorsInternal({
6744
6829
  )
6745
6830
  ] });
6746
6831
  }
6747
- var Selectors = (0, import_react45.forwardRef)(SelectorsInternal);
6832
+ var Selectors = (0, import_react47.forwardRef)(SelectorsInternal);
6748
6833
 
6749
6834
  // src/separator/Separator.tsx
6750
6835
  var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
@@ -6904,19 +6989,19 @@ function Skeleton({ className, ...props }) {
6904
6989
  }
6905
6990
 
6906
6991
  // src/sidebar/SidebarContext.ts
6907
- var import_react46 = require("react");
6908
- var SidebarContext = (0, import_react46.createContext)(null);
6992
+ var import_react48 = require("react");
6993
+ var SidebarContext = (0, import_react48.createContext)(null);
6909
6994
 
6910
6995
  // src/sidebar/useSidebarMenuButton.ts
6911
- var import_react48 = require("react");
6996
+ var import_react50 = require("react");
6912
6997
 
6913
6998
  // src/sidebar/SidebarMenuButtonContext.ts
6914
- var import_react47 = require("react");
6915
- var SidebarMenuButtonContext = (0, import_react47.createContext)(null);
6999
+ var import_react49 = require("react");
7000
+ var SidebarMenuButtonContext = (0, import_react49.createContext)(null);
6916
7001
 
6917
7002
  // src/sidebar/useSidebarMenuButton.ts
6918
7003
  function useSidebarMenuButton() {
6919
- return (0, import_react48.useContext)(SidebarMenuButtonContext);
7004
+ return (0, import_react50.useContext)(SidebarMenuButtonContext);
6920
7005
  }
6921
7006
 
6922
7007
  // src/sidebar/SidebarIcon.tsx
@@ -6957,16 +7042,16 @@ var SidebarIcon = ({
6957
7042
  };
6958
7043
 
6959
7044
  // src/sidebar/useSidebar.ts
6960
- var import_react49 = require("react");
7045
+ var import_react51 = require("react");
6961
7046
  function useSidebar() {
6962
- const context = (0, import_react49.useContext)(SidebarContext);
7047
+ const context = (0, import_react51.useContext)(SidebarContext);
6963
7048
  if (!context) {
6964
7049
  throw new Error("useSidebar must be used within a SidebarProvider.");
6965
7050
  }
6966
7051
  return context;
6967
7052
  }
6968
7053
  function useSidebarSafe() {
6969
- return (0, import_react49.useContext)(SidebarContext);
7054
+ return (0, import_react51.useContext)(SidebarContext);
6970
7055
  }
6971
7056
 
6972
7057
  // src/sidebar/Sidebar.tsx
@@ -7539,9 +7624,9 @@ var VALUE_PART = 1;
7539
7624
  var getSidebarState = (stateName) => document.cookie.split("; ").find((row) => row.startsWith(`${stateName}=`))?.split("=")[VALUE_PART] === "true";
7540
7625
 
7541
7626
  // src/circular-loader/CircularLoader.tsx
7542
- var import_react50 = __toESM(require("react"), 1);
7627
+ var import_react52 = __toESM(require("react"), 1);
7543
7628
  var import_jsx_runtime97 = require("react/jsx-runtime");
7544
- var CircularLoader = import_react50.default.memo(
7629
+ var CircularLoader = import_react52.default.memo(
7545
7630
  ({ visible = true, height, width, position, label, className }) => {
7546
7631
  if (!visible) return null;
7547
7632
  return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
@@ -7635,10 +7720,10 @@ var CircularLoader = import_react50.default.memo(
7635
7720
  CircularLoader.displayName = "CircularLoader";
7636
7721
 
7637
7722
  // src/small-grid-single-item/SmallGridSingleItem.tsx
7638
- var import_react51 = require("react");
7723
+ var import_react53 = require("react");
7639
7724
  var import_lucide_react34 = require("lucide-react");
7640
7725
  var import_jsx_runtime98 = require("react/jsx-runtime");
7641
- var SmallGridSingleItem = (0, import_react51.memo)(
7726
+ var SmallGridSingleItem = (0, import_react53.memo)(
7642
7727
  ({
7643
7728
  title,
7644
7729
  subtitle,
@@ -7759,7 +7844,7 @@ function SortingAction({
7759
7844
  }
7760
7845
 
7761
7846
  // src/status-button/StatusButton.tsx
7762
- var import_react52 = require("react");
7847
+ var import_react54 = require("react");
7763
7848
  var import_react_i18next20 = require("react-i18next");
7764
7849
  var import_lucide_react36 = require("lucide-react");
7765
7850
  var import_jsx_runtime100 = require("react/jsx-runtime");
@@ -7777,7 +7862,7 @@ function StatusButton({
7777
7862
  ...props
7778
7863
  }) {
7779
7864
  const { t } = (0, import_react_i18next20.useTranslation)();
7780
- const configMap = (0, import_react52.useMemo)(() => {
7865
+ const configMap = (0, import_react54.useMemo)(() => {
7781
7866
  const defaultLoadingConfig = {
7782
7867
  text: loadingText ?? `${t("saving")}...`,
7783
7868
  icon: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_lucide_react36.Loader2, { className: "h-4 w-4 animate-spin" }),
@@ -7902,9 +7987,9 @@ function Stepper({
7902
7987
  }
7903
7988
 
7904
7989
  // src/switch-blocks/SwitchBlocks.tsx
7905
- var import_react53 = require("react");
7990
+ var import_react55 = require("react");
7906
7991
  var import_jsx_runtime103 = require("react/jsx-runtime");
7907
- var SwitchBlocksInternal = (0, import_react53.forwardRef)(
7992
+ var SwitchBlocksInternal = (0, import_react55.forwardRef)(
7908
7993
  ({ options, value, onChange, disabled, className }, ref) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7909
7994
  "div",
7910
7995
  {
@@ -7928,7 +8013,7 @@ var SwitchBlocksInternal = (0, import_react53.forwardRef)(
7928
8013
  )
7929
8014
  );
7930
8015
  SwitchBlocksInternal.displayName = "SwitchBlocks";
7931
- var SwitchBlocks = (0, import_react53.memo)(SwitchBlocksInternal);
8016
+ var SwitchBlocks = (0, import_react55.memo)(SwitchBlocksInternal);
7932
8017
 
7933
8018
  // src/switch-group/SwitchGroup.tsx
7934
8019
  var React26 = __toESM(require("react"), 1);
@@ -7988,7 +8073,7 @@ var SwitchGroup = React26.forwardRef(
7988
8073
  SwitchGroup.displayName = "SwitchGroup";
7989
8074
 
7990
8075
  // src/tabs/Tabs.tsx
7991
- var import_react54 = require("react");
8076
+ var import_react56 = require("react");
7992
8077
  var TabsPrimitive2 = __toESM(require("@radix-ui/react-tabs"), 1);
7993
8078
  var import_class_variance_authority12 = require("class-variance-authority");
7994
8079
  var import_jsx_runtime105 = require("react/jsx-runtime");
@@ -8004,7 +8089,7 @@ var tabsListVariants = (0, import_class_variance_authority12.cva)("inline-flex i
8004
8089
  variant: "default"
8005
8090
  }
8006
8091
  });
8007
- var TabsList = (0, import_react54.forwardRef)(
8092
+ var TabsList = (0, import_react56.forwardRef)(
8008
8093
  ({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8009
8094
  TabsPrimitive2.List,
8010
8095
  {
@@ -8029,7 +8114,7 @@ var tabsTriggerVariants = (0, import_class_variance_authority12.cva)(
8029
8114
  }
8030
8115
  }
8031
8116
  );
8032
- var TabsTrigger = (0, import_react54.forwardRef)(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8117
+ var TabsTrigger = (0, import_react56.forwardRef)(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8033
8118
  TabsPrimitive2.Trigger,
8034
8119
  {
8035
8120
  ref,
@@ -8038,7 +8123,7 @@ var TabsTrigger = (0, import_react54.forwardRef)(({ className, variant, ...props
8038
8123
  }
8039
8124
  ));
8040
8125
  TabsTrigger.displayName = TabsPrimitive2.Trigger.displayName;
8041
- var TabsContent = (0, import_react54.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TabsPrimitive2.Content, { ref, className, tabIndex: -1, ...props }));
8126
+ var TabsContent = (0, import_react56.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(TabsPrimitive2.Content, { ref, className, tabIndex: -1, ...props }));
8042
8127
  TabsContent.displayName = TabsPrimitive2.Content.displayName;
8043
8128
 
8044
8129
  // src/tabbed-section/TabbedSection.tsx
@@ -8179,11 +8264,11 @@ var TASK_VARIANTS = {
8179
8264
  var import_sonner2 = require("sonner");
8180
8265
 
8181
8266
  // src/toaster/useUpdateToast.ts
8182
- var import_react55 = require("react");
8267
+ var import_react57 = require("react");
8183
8268
  var import_sonner = require("sonner");
8184
8269
  function useUpdateToast({ id }) {
8185
- const toastIdRef = (0, import_react55.useRef)("");
8186
- const getToastOptions = (0, import_react55.useCallback)(
8270
+ const toastIdRef = (0, import_react57.useRef)("");
8271
+ const getToastOptions = (0, import_react57.useCallback)(
8187
8272
  (options) => ({
8188
8273
  id: toastIdRef.current,
8189
8274
  dismissible: false,
@@ -8298,7 +8383,7 @@ var ToggleGroupItem = React27.forwardRef(({ className, children, variant, size,
8298
8383
  ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
8299
8384
 
8300
8385
  // src/toggle-group/Toggles.tsx
8301
- var import_react56 = require("react");
8386
+ var import_react58 = require("react");
8302
8387
  var import_jsx_runtime110 = require("react/jsx-runtime");
8303
8388
  var getValueArray2 = (value) => {
8304
8389
  if (value) {
@@ -8373,7 +8458,7 @@ function TogglesInternal({
8373
8458
  }
8374
8459
  };
8375
8460
  const isAnyActive = getValueArray2(value).length > 0;
8376
- (0, import_react56.useEffect)(() => {
8461
+ (0, import_react58.useEffect)(() => {
8377
8462
  onAnySelectorActive?.(isAnyActive);
8378
8463
  }, [isAnyActive, onAnySelectorActive]);
8379
8464
  const currentValue = getValueArray2(value).map((item) => String(item));
@@ -8404,7 +8489,7 @@ function TogglesInternal({
8404
8489
  }) })
8405
8490
  ] });
8406
8491
  }
8407
- var Toggles = (0, import_react56.forwardRef)(TogglesInternal);
8492
+ var Toggles = (0, import_react58.forwardRef)(TogglesInternal);
8408
8493
 
8409
8494
  // src/text-field/TextField.tsx
8410
8495
  var React28 = __toESM(require("react"), 1);
@@ -8615,16 +8700,16 @@ var TextField = React28.forwardRef(
8615
8700
  TextField.displayName = "TextField";
8616
8701
 
8617
8702
  // src/textarea/Textarea.tsx
8618
- var import_react57 = require("react");
8703
+ var import_react59 = require("react");
8619
8704
 
8620
8705
  // src/textarea/styles.module.css
8621
8706
  var styles_default9 = {};
8622
8707
 
8623
8708
  // src/textarea/Textarea.tsx
8624
8709
  var import_jsx_runtime115 = require("react/jsx-runtime");
8625
- var Textarea = (0, import_react57.forwardRef)(
8710
+ var Textarea = (0, import_react59.forwardRef)(
8626
8711
  ({ className, textareaClassName, label, disabled, name, invalid, ...textareaProps }, ref) => {
8627
- const inputId = (0, import_react57.useId)();
8712
+ const inputId = (0, import_react59.useId)();
8628
8713
  return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: cn(styles_default9.container, className), children: [
8629
8714
  /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
8630
8715
  "textarea",
@@ -11517,7 +11602,7 @@ AirbnbSearchInput.displayName = "SearchInput";
11517
11602
  var React41 = __toESM(require("react"), 1);
11518
11603
  var import_lucide_react46 = require("lucide-react");
11519
11604
  var import_react_virtual = require("@tanstack/react-virtual");
11520
- var import_react58 = require("react");
11605
+ var import_react60 = require("react");
11521
11606
  var import_jsx_runtime135 = require("react/jsx-runtime");
11522
11607
  var ROW_HEIGHT = 48;
11523
11608
  var DESKTOP_LIST_HEIGHT = 280;
@@ -11592,7 +11677,7 @@ var SearchableSelectInternal = ({
11592
11677
  const activeOptionId = highlightedIndex >= 0 ? getOptionId(reactId, highlightedIndex) : void 0;
11593
11678
  useOutsideClick(containerRef, open && !isMobile ? () => closeSelect() : null);
11594
11679
  const handleOnOpenChange = useEvent(onOpenChange);
11595
- const setSelectOpen = (0, import_react58.useCallback)(
11680
+ const setSelectOpen = (0, import_react60.useCallback)(
11596
11681
  (nextOpen, options2) => {
11597
11682
  setOpen(nextOpen);
11598
11683
  handleOnOpenChange?.(nextOpen);
@@ -11960,39 +12045,6 @@ function getNextEnabledIndex(options, startIndex, step) {
11960
12045
  }
11961
12046
  return -1;
11962
12047
  }
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
- }
11996
12048
  // Annotate the CommonJS export names for ESM import in node:
11997
12049
  0 && (module.exports = {
11998
12050
  Accordion,
@@ -12262,6 +12314,7 @@ function copyToClipboard2(value) {
12262
12314
  useAbortController,
12263
12315
  useClickEscape,
12264
12316
  useCombinedRef,
12317
+ useCopyToClipboard,
12265
12318
  useDebounce,
12266
12319
  useDebouncedFunction,
12267
12320
  useEvent,
@@ -12272,6 +12325,7 @@ function copyToClipboard2(value) {
12272
12325
  useOutsideClick,
12273
12326
  usePagination,
12274
12327
  usePrevious,
12328
+ usePromisedModalControls,
12275
12329
  useRadioOptions,
12276
12330
  useScreenResize,
12277
12331
  useScrollFrameIntoView,