@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.js CHANGED
@@ -111,6 +111,11 @@ AccordionContent.displayName = AccordionPrimitive.Content.displayName;
111
111
 
112
112
  // src/alert-box/AlertBox.tsx
113
113
  import { AlertCircle, Check, TriangleAlert, XCircle } from "lucide-react";
114
+
115
+ // src/alert-box/AlertBox.module.css
116
+ var AlertBox_default = {};
117
+
118
+ // src/alert-box/AlertBox.tsx
114
119
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
115
120
  var AlertType = /* @__PURE__ */ ((AlertType2) => {
116
121
  AlertType2["INFO"] = "INFO";
@@ -138,12 +143,12 @@ var sizeClasses = {
138
143
  ["M" /* M */]: "p-4 text-base font-medium items-start",
139
144
  ["L" /* L */]: "px-6 py-5 items-start"
140
145
  };
141
- var typeClasses = {
142
- ["INFO" /* INFO */]: "bg-blue-50 [&_svg]:text-chekin-blue",
143
- ["WARNING" /* WARNING */]: "bg-amber-100 [&_svg]:text-amber-600",
144
- ["ERROR" /* ERROR */]: "bg-red-50 [&_svg]:text-chekin-red",
145
- ["LIGHT" /* LIGHT */]: "",
146
- ["SUCCESS" /* SUCCESS */]: "bg-emerald-50 text-chekin-navy [&_svg]:text-emerald-600"
146
+ var typeStyles = {
147
+ ["INFO" /* INFO */]: AlertBox_default["alertBox--info"],
148
+ ["WARNING" /* WARNING */]: AlertBox_default["alertBox--warning"],
149
+ ["ERROR" /* ERROR */]: AlertBox_default["alertBox--error"],
150
+ ["SUCCESS" /* SUCCESS */]: AlertBox_default["alertBox--success"],
151
+ ["LIGHT" /* LIGHT */]: ""
147
152
  };
148
153
  function AlertBox({
149
154
  text,
@@ -159,9 +164,10 @@ function AlertBox({
159
164
  {
160
165
  "data-slot": "alert-box",
161
166
  className: cn(
162
- "flex gap-3 rounded-[10px] [&_svg]:h-5 [&_svg]:w-5 [&_svg]:shrink-0",
167
+ AlertBox_default.alertBox,
168
+ "flex gap-3 [&_svg]:h-5 [&_svg]:w-5 [&_svg]:shrink-0",
163
169
  sizeClasses[size],
164
- typeClasses[type],
170
+ typeStyles[type],
165
171
  className
166
172
  ),
167
173
  children: [
@@ -178,6 +184,11 @@ var AlertSizes = AlertSize;
178
184
  // src/audio-player/AudioPlayer.tsx
179
185
  import { useCallback, useEffect, useRef, useState } from "react";
180
186
  import { Pause, Play } from "lucide-react";
187
+
188
+ // src/audio-player/AudioPlayer.module.css
189
+ var AudioPlayer_default = {};
190
+
191
+ // src/audio-player/AudioPlayer.tsx
181
192
  import { Fragment, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
182
193
  function formatTime(seconds) {
183
194
  const mins = Math.floor(seconds / 60);
@@ -241,16 +252,12 @@ function AudioPlayer({ src, compact, className }) {
241
252
  {
242
253
  type: "button",
243
254
  className: cn(
244
- "inline-flex items-center justify-center rounded-lg bg-chekin-blue hover:bg-chekin-blue-hover",
255
+ AudioPlayer_default.playButton,
256
+ "inline-flex items-center justify-center",
245
257
  compact ? "h-6 min-w-6 p-1" : "h-8 min-w-8 p-1.5"
246
258
  ),
247
259
  onClick: togglePlayPause,
248
- children: isPlaying ? /* @__PURE__ */ jsx3(Pause, { className: cn(compact ? "h-2.5 w-2.5" : "h-3 w-3", "text-white") }) : /* @__PURE__ */ jsx3(
249
- Play,
250
- {
251
- className: cn(compact ? "h-2.5 w-2.5" : "h-3 w-3", "fill-white text-white")
252
- }
253
- )
260
+ children: isPlaying ? /* @__PURE__ */ jsx3(Pause, { className: cn(compact ? "h-2.5 w-2.5" : "h-3 w-3", "fill-current") }) : /* @__PURE__ */ jsx3(Play, { className: cn(compact ? "h-2.5 w-2.5" : "h-3 w-3", "fill-current") })
254
261
  }
255
262
  ),
256
263
  !compact && /* @__PURE__ */ jsxs3(Fragment, { children: [
@@ -258,18 +265,24 @@ function AudioPlayer({ src, compact, className }) {
258
265
  "div",
259
266
  {
260
267
  ref: progressRef,
261
- className: "h-1 flex-1 cursor-pointer overflow-hidden rounded-full bg-chekin-gray-3",
268
+ className: cn(
269
+ AudioPlayer_default.track,
270
+ "h-1 flex-1 cursor-pointer overflow-hidden rounded-full"
271
+ ),
262
272
  onClick: handleSeek,
263
273
  children: /* @__PURE__ */ jsx3(
264
274
  "div",
265
275
  {
266
- className: "h-full bg-chekin-blue transition-all duration-100 ease-linear",
276
+ className: cn(
277
+ AudioPlayer_default.progress,
278
+ "h-full transition-all duration-100 ease-linear"
279
+ ),
267
280
  style: { width: `${progress}%` }
268
281
  }
269
282
  )
270
283
  }
271
284
  ),
272
- /* @__PURE__ */ jsx3("span", { className: "min-w-10 text-xs font-medium text-chekin-gray-1", children: isPlaying || currentTime > 0 ? formatTime(currentTime) : formatTime(duration) })
285
+ /* @__PURE__ */ jsx3("span", { className: cn(AudioPlayer_default.time, "min-w-10 text-xs font-medium"), children: isPlaying || currentTime > 0 ? formatTime(currentTime) : formatTime(duration) })
273
286
  ] })
274
287
  ] });
275
288
  }
@@ -278,6 +291,11 @@ AudioPlayer.displayName = "AudioPlayer";
278
291
  // src/avatar/Avatar.tsx
279
292
  import * as React2 from "react";
280
293
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
294
+
295
+ // src/avatar/Avatar.module.css
296
+ var Avatar_default = {};
297
+
298
+ // src/avatar/Avatar.tsx
281
299
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
282
300
  var sizeClasses2 = {
283
301
  sm: "h-8 w-8",
@@ -308,8 +326,9 @@ var Avatar = React2.forwardRef(({ className, src, alt, fallback, size = "md", fa
308
326
  AvatarPrimitive.Fallback,
309
327
  {
310
328
  className: cn(
311
- "flex h-full w-full items-center justify-center rounded-full font-medium text-chekin-gray-1",
312
- fallbackClassName ? fallbackClassName : "bg-chekin-gray-3"
329
+ "flex h-full w-full items-center justify-center rounded-full font-medium",
330
+ !fallbackClassName && Avatar_default.fallback,
331
+ fallbackClassName
313
332
  ),
314
333
  children: fallback
315
334
  }
@@ -361,6 +380,11 @@ Badge.displayName = "Badge";
361
380
 
362
381
  // src/beta-badge/BetaBadge.tsx
363
382
  import { useTranslation } from "react-i18next";
383
+
384
+ // src/beta-badge/BetaBadge.module.css
385
+ var BetaBadge_default = {};
386
+
387
+ // src/beta-badge/BetaBadge.tsx
364
388
  import { jsxs as jsxs5 } from "react/jsx-runtime";
365
389
  function BetaBadge({
366
390
  className,
@@ -375,8 +399,9 @@ function BetaBadge({
375
399
  {
376
400
  "data-slot": "beta-badge",
377
401
  className: cn(
402
+ BetaBadge_default.betaBadge,
378
403
  "rounded-sm px-2 py-1 text-sm/4 font-semibold uppercase",
379
- readOnly ? "bg-chekin-blue/10 text-chekin-blue" : "bg-chekin-gray-1/15 text-chekin-gray-1",
404
+ readOnly && BetaBadge_default["betaBadge--readonly"],
380
405
  className
381
406
  ),
382
407
  ...props,
@@ -467,6 +492,11 @@ BookmarkTabsTrigger.displayName = "BookmarkTabsTrigger";
467
492
  // src/box-option-selector/BoxOptionSelector.tsx
468
493
  import { forwardRef as forwardRef4, useEffect as useEffect2, useState as useState2 } from "react";
469
494
  import { useTranslation as useTranslation2 } from "react-i18next";
495
+
496
+ // src/box-option-selector/BoxOptionSelector.module.css
497
+ var BoxOptionSelector_default = {};
498
+
499
+ // src/box-option-selector/BoxOptionSelector.tsx
470
500
  import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
471
501
  var BoxOptionSelector = forwardRef4(
472
502
  ({
@@ -502,8 +532,9 @@ var BoxOptionSelector = forwardRef4(
502
532
  ref,
503
533
  "data-slot": "box-option-selector",
504
534
  className: cn(
535
+ BoxOptionSelector_default.boxOption,
505
536
  "flex min-h-[116px] w-full max-w-[400px] cursor-pointer flex-col gap-4 rounded-lg border p-4 transition-all duration-200",
506
- isSelected ? "border-chekin-blue bg-chekin-surface-pressed" : "border-chekin-gray-3 bg-white hover:bg-chekin-surface-input-empty",
537
+ isSelected && BoxOptionSelector_default["boxOption--selected"],
507
538
  disabled && "cursor-not-allowed opacity-50"
508
539
  ),
509
540
  onClick: handleClick,
@@ -564,8 +595,8 @@ function Breadcrumb({
564
595
  }
565
596
  const isLink = Boolean(to && !current);
566
597
  const contentClassName = cn(
567
- "flex items-center gap-2.5 text-sm font-medium text-chekin-gray-1",
568
- current && "font-bold text-chekin-navy",
598
+ "flex items-center gap-2.5 text-sm font-medium text-[var(--breadcrumbs-link-color)]",
599
+ current && "font-bold text-[var(--breadcrumbs-current-color)]",
569
600
  isLink && "transition-opacity hover:opacity-80",
570
601
  className
571
602
  );
@@ -610,7 +641,7 @@ function Breadcrumbs({ className, children }) {
610
641
  ChevronRight,
611
642
  {
612
643
  "aria-hidden": "true",
613
- className: "shrink-0 text-chekin-navy",
644
+ className: "shrink-0 text-[var(--breadcrumbs-separator-color)]",
614
645
  size: 16
615
646
  }
616
647
  ) : null,
@@ -916,7 +947,7 @@ function ButtonGroupText({
916
947
  {
917
948
  "data-slot": "button-group-text",
918
949
  className: cn(
919
- "flex items-center gap-2 rounded-lg border bg-chekin-surface-input-empty px-2.5 text-sm font-medium",
950
+ "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)]",
920
951
  "[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
921
952
  className
922
953
  ),
@@ -930,7 +961,7 @@ ButtonGroupText.displayName = "ButtonGroupText";
930
961
  import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
931
962
  function ButtonsGroupLabel({ children, label, className }) {
932
963
  return /* @__PURE__ */ jsxs10("div", { "data-slot": "buttons-group-label", className: cn(className), children: [
933
- /* @__PURE__ */ jsx12("div", { className: "mb-2 text-xs font-medium text-chekin-gray-1", children: label }),
964
+ /* @__PURE__ */ jsx12("div", { className: "mb-2 text-xs font-medium text-[var(--buttons-group-label-color)]", children: label }),
934
965
  /* @__PURE__ */ jsx12("div", { children })
935
966
  ] });
936
967
  }
@@ -1126,6 +1157,15 @@ var getDocument = () => {
1126
1157
  function getCustomContainer() {
1127
1158
  return getDocument()?.body;
1128
1159
  }
1160
+ function scrollToTop(value = 0, behavior) {
1161
+ window.scrollTo({
1162
+ top: value,
1163
+ behavior
1164
+ });
1165
+ }
1166
+ function isObject(value) {
1167
+ return value !== null && typeof value === "object";
1168
+ }
1129
1169
  var isNumeric = (n) => n !== "" && !isNaN(n);
1130
1170
  function toCssSize(size) {
1131
1171
  if (!size) {
@@ -1988,15 +2028,73 @@ function DataTable({ columns, data }) {
1988
2028
  }
1989
2029
 
1990
2030
  // src/dialog/Dialog.tsx
1991
- import * as React10 from "react";
2031
+ import * as React11 from "react";
1992
2032
  import * as DialogPrimitive from "@radix-ui/react-dialog";
1993
2033
  import { VisuallyHidden } from "@radix-ui/react-visually-hidden";
1994
2034
  import { XIcon } from "lucide-react";
1995
2035
 
1996
- // src/lib/use-combined-ref.ts
1997
- import { useCallback as useCallback2 } from "react";
2036
+ // src/hooks/use-scroll-to-top.ts
2037
+ import { useEffect as useEffect4 } from "react";
2038
+ function useScrollToTop() {
2039
+ useEffect4(() => {
2040
+ scrollToTop();
2041
+ }, []);
2042
+ }
2043
+
2044
+ // src/hooks/use-abort-controller.ts
2045
+ import React10 from "react";
2046
+ function useAbortController() {
2047
+ const [abortController, setAbortController] = React10.useState(() => {
2048
+ return new AbortController();
2049
+ });
2050
+ const setupAbortController = React10.useCallback(() => {
2051
+ const abortController2 = new AbortController();
2052
+ setAbortController(abortController2);
2053
+ return abortController2.signal;
2054
+ }, []);
2055
+ return {
2056
+ abortController,
2057
+ setupAbortController
2058
+ };
2059
+ }
2060
+
2061
+ // src/hooks/use-click-escape.ts
2062
+ import { useEffect as useEffect5 } from "react";
2063
+
2064
+ // src/hooks/use-event.ts
2065
+ import { useCallback as useCallback2, useLayoutEffect, useRef as useRef3 } from "react";
2066
+ function useEvent(fn) {
2067
+ const fnRef = useRef3(fn);
2068
+ useLayoutEffect(() => {
2069
+ fnRef.current = fn;
2070
+ }, [fn]);
2071
+ const eventCb = useCallback2(
2072
+ (...args) => {
2073
+ return fnRef.current?.apply(null, args);
2074
+ },
2075
+ [fnRef]
2076
+ );
2077
+ return eventCb;
2078
+ }
2079
+
2080
+ // src/hooks/use-click-escape.ts
2081
+ function useClickEscape({ enabled = true, onClick }) {
2082
+ const handler = useEvent(onClick);
2083
+ useEffect5(() => {
2084
+ const handleKeyDown = (event) => {
2085
+ if (event.key === "Escape" && enabled) {
2086
+ handler();
2087
+ }
2088
+ };
2089
+ window.addEventListener("keydown", handleKeyDown);
2090
+ return () => window.removeEventListener("keydown", handleKeyDown);
2091
+ }, [handler, enabled]);
2092
+ }
2093
+
2094
+ // src/hooks/use-combined-ref.ts
2095
+ import { useCallback as useCallback3 } from "react";
1998
2096
  function useCombinedRef(...refs) {
1999
- return useCallback2(
2097
+ return useCallback3(
2000
2098
  (node) => {
2001
2099
  refs.forEach((ref) => {
2002
2100
  if (!ref) return;
@@ -2007,15 +2105,489 @@ function useCombinedRef(...refs) {
2007
2105
  ref.current = node;
2008
2106
  });
2009
2107
  },
2010
- // eslint-disable-next-line react-hooks/exhaustive-deps, react-hooks/use-memo
2011
- refs
2108
+ // eslint-disable-next-line react-hooks/exhaustive-deps, react-hooks/use-memo
2109
+ refs
2110
+ );
2111
+ }
2112
+
2113
+ // src/hooks/use-is-mobile.ts
2114
+ import { useEffect as useEffect6, useState as useState5 } from "react";
2115
+ var MOBILE_BREAKPOINT = 768;
2116
+ function useIsMobile({ breakpoint = MOBILE_BREAKPOINT } = {}) {
2117
+ const [isMobile, setIsMobile] = useState5(void 0);
2118
+ useEffect6(() => {
2119
+ const mediaQuery = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
2120
+ const onChange = () => {
2121
+ setIsMobile(window.innerWidth < breakpoint);
2122
+ };
2123
+ mediaQuery.addEventListener("change", onChange);
2124
+ setIsMobile(window.innerWidth < breakpoint);
2125
+ return () => {
2126
+ mediaQuery.removeEventListener("change", onChange);
2127
+ };
2128
+ }, [breakpoint]);
2129
+ return !!isMobile;
2130
+ }
2131
+
2132
+ // src/hooks/use-is-mounted.ts
2133
+ import { useEffect as useEffect7, useRef as useRef4 } from "react";
2134
+ function useIsMounted() {
2135
+ const isMounted = useRef4(false);
2136
+ useEffect7(() => {
2137
+ isMounted.current = true;
2138
+ return () => {
2139
+ isMounted.current = false;
2140
+ };
2141
+ }, []);
2142
+ return isMounted;
2143
+ }
2144
+
2145
+ // src/hooks/use-modal-controls.ts
2146
+ import { useCallback as useCallback4, useState as useState6 } from "react";
2147
+ function useModalControls(initState = false, { disabled } = {}) {
2148
+ const [isOpen, setIsOpen] = useState6(initState);
2149
+ const openModal = useCallback4(() => {
2150
+ if (disabled) return;
2151
+ setIsOpen(true);
2152
+ }, [disabled]);
2153
+ const closeModal = useCallback4(() => {
2154
+ if (disabled) return;
2155
+ setIsOpen(false);
2156
+ }, [disabled]);
2157
+ const toggleModal = useCallback4(() => {
2158
+ if (disabled) return;
2159
+ setIsOpen((value) => !value);
2160
+ }, [disabled]);
2161
+ return {
2162
+ isOpen,
2163
+ openModal,
2164
+ closeModal,
2165
+ toggleModal,
2166
+ setIsOpen
2167
+ };
2168
+ }
2169
+
2170
+ // src/hooks/use-outside-click.ts
2171
+ import { useCallback as useCallback5, useEffect as useEffect8, useRef as useRef5 } from "react";
2172
+ function useOutsideClick(elementRef, onOutsideClick, nested) {
2173
+ const handleOutsideClick = useRef5(onOutsideClick);
2174
+ handleOutsideClick.current = onOutsideClick;
2175
+ const checkNestedElements = useCallback5(
2176
+ (event) => {
2177
+ const checkIsElementClickedBySelector = (selector) => {
2178
+ const nestedElement = getDocument().querySelector(selector);
2179
+ return nestedElement?.contains(event.target);
2180
+ };
2181
+ const checkDataAttribute = () => {
2182
+ const target = event.target;
2183
+ if (!target || !(target instanceof HTMLElement)) {
2184
+ return false;
2185
+ }
2186
+ let current = target;
2187
+ while (current) {
2188
+ if (current.hasAttribute("data-exclude-from-outside-click")) {
2189
+ return true;
2190
+ }
2191
+ current = current.parentElement;
2192
+ }
2193
+ return false;
2194
+ };
2195
+ if (nested) {
2196
+ if (typeof nested === "string") {
2197
+ if (checkIsElementClickedBySelector(nested)) return true;
2198
+ } else {
2199
+ if (nested.some(checkIsElementClickedBySelector)) return true;
2200
+ }
2201
+ }
2202
+ return checkDataAttribute();
2203
+ },
2204
+ [nested]
2205
+ );
2206
+ useEffect8(() => {
2207
+ function handleClickOutside(event) {
2208
+ const isNestedElement = checkNestedElements(event);
2209
+ if (elementRef?.current && !elementRef.current.contains(event.target) && !isNestedElement) {
2210
+ handleOutsideClick.current?.(event);
2211
+ }
2212
+ }
2213
+ getDocument().addEventListener("mousedown", handleClickOutside, true);
2214
+ getDocument().addEventListener("touchstart", handleClickOutside, true);
2215
+ return () => {
2216
+ getDocument().removeEventListener("mousedown", handleClickOutside, true);
2217
+ getDocument().removeEventListener("touchstart", handleClickOutside, true);
2218
+ };
2219
+ }, [checkNestedElements, elementRef]);
2220
+ }
2221
+
2222
+ // src/hooks/use-screen-resize.ts
2223
+ import { useCallback as useCallback6, useLayoutEffect as useLayoutEffect2, useState as useState7 } from "react";
2224
+ var eventName = "resize";
2225
+ function useScreenResize(maxWidth) {
2226
+ const [isInitialized, setIsInitialized] = useState7(false);
2227
+ const [isMatch, setIsMatch] = useState7(false);
2228
+ const handleResizeEvent = useCallback6(() => {
2229
+ const adjustedMaxWidth = `${parseInt(maxWidth, 10) - 1}px`;
2230
+ const media = getWindow().matchMedia(`(max-width: ${adjustedMaxWidth})`);
2231
+ setIsInitialized(true);
2232
+ setIsMatch(media?.matches);
2233
+ }, [maxWidth]);
2234
+ useLayoutEffect2(() => {
2235
+ handleResizeEvent();
2236
+ getWindow().addEventListener(eventName, handleResizeEvent);
2237
+ return () => {
2238
+ getWindow().removeEventListener(eventName, handleResizeEvent);
2239
+ };
2240
+ }, [handleResizeEvent]);
2241
+ return { isMatch, isInitialized };
2242
+ }
2243
+
2244
+ // src/hooks/use-scroll-frame-into-view.ts
2245
+ import { useEffect as useEffect9 } from "react";
2246
+
2247
+ // src/lib/runtimeSettings.ts
2248
+ function getChekinRuntimeSettings() {
2249
+ return window.ChekinProSettings || window.ChekinHousingsSDKSettings || {};
2250
+ }
2251
+ function isMobileModalModeAvailable() {
2252
+ const settings = getChekinRuntimeSettings();
2253
+ return !settings.autoHeight;
2254
+ }
2255
+
2256
+ // src/hooks/use-scroll-frame-into-view.ts
2257
+ function useScrollFrameIntoView(active, options = {}) {
2258
+ const { behavior = "smooth", elementRef } = options;
2259
+ useEffect9(() => {
2260
+ const sdkWindow = window;
2261
+ if (!active || !getChekinRuntimeSettings()?.autoHeight) {
2262
+ return;
2263
+ }
2264
+ const frame = sdkWindow.chekinCustomFrame;
2265
+ if (!frame) {
2266
+ return;
2267
+ }
2268
+ const parentWindow = window.parent;
2269
+ const scrollToElement = () => {
2270
+ const frameRect = frame.getBoundingClientRect();
2271
+ if (elementRef?.current) {
2272
+ const elementRect = elementRef.current.getBoundingClientRect();
2273
+ const elementCenterInFrame = elementRect.top + elementRect.height / 2;
2274
+ const elementCenterInParent = frameRect.top + elementCenterInFrame;
2275
+ const targetScroll = parentWindow.scrollY + elementCenterInParent - parentWindow.innerHeight / 2;
2276
+ parentWindow.scrollTo({
2277
+ top: Math.max(0, targetScroll),
2278
+ behavior
2279
+ });
2280
+ return;
2281
+ }
2282
+ frame.scrollIntoView({ behavior, block: "start" });
2283
+ };
2284
+ requestAnimationFrame(() => {
2285
+ requestAnimationFrame(scrollToElement);
2286
+ });
2287
+ }, [active, behavior, elementRef]);
2288
+ }
2289
+
2290
+ // src/hooks/use-debounce.ts
2291
+ import { useEffect as useEffect10, useState as useState8 } from "react";
2292
+ function useDebounce(value, delayMs = 1e3, handleChange) {
2293
+ const onChange = useEvent(handleChange);
2294
+ const [debouncedValue, setDebouncedValue] = useState8(value);
2295
+ useEffect10(() => {
2296
+ const handler = setTimeout(() => {
2297
+ setDebouncedValue(value);
2298
+ }, delayMs);
2299
+ return () => {
2300
+ clearTimeout(handler);
2301
+ };
2302
+ }, [value, delayMs]);
2303
+ useEffect10(() => {
2304
+ onChange?.(debouncedValue);
2305
+ }, [debouncedValue, onChange]);
2306
+ return [debouncedValue, setDebouncedValue];
2307
+ }
2308
+
2309
+ // src/hooks/use-debounced-function.ts
2310
+ import { useCallback as useCallback7, useRef as useRef6 } from "react";
2311
+ function useDebouncedFunction(callback, delay) {
2312
+ const timerRef = useRef6();
2313
+ const immediateCalling = useRef6(false);
2314
+ const callbackFn = useEvent(callback);
2315
+ const throttled = useCallback7(
2316
+ (...args) => {
2317
+ clearTimeout(timerRef.current);
2318
+ if (immediateCalling.current) {
2319
+ immediateCalling.current = false;
2320
+ callbackFn?.(...args);
2321
+ } else {
2322
+ timerRef.current = setTimeout(() => {
2323
+ immediateCalling.current = false;
2324
+ callbackFn?.(...args);
2325
+ }, delay);
2326
+ }
2327
+ },
2328
+ [callbackFn, delay]
2329
+ );
2330
+ const immediate = useCallback7(() => {
2331
+ immediateCalling.current = true;
2332
+ }, []);
2333
+ return { throttled, immediate };
2334
+ }
2335
+
2336
+ // src/hooks/use-previous.ts
2337
+ import { useEffect as useEffect11, useRef as useRef7 } from "react";
2338
+ function usePrevious(value, defaultValue) {
2339
+ const ref = useRef7(defaultValue);
2340
+ useEffect11(() => {
2341
+ ref.current = isObject(value) ? { ...value } : value;
2342
+ }, [value]);
2343
+ return ref.current;
2344
+ }
2345
+
2346
+ // src/hooks/use-pagination.ts
2347
+ import { useCallback as useCallback8, useEffect as useEffect12, useMemo, useState as useState9 } from "react";
2348
+
2349
+ // src/storage/AbstractStorage.ts
2350
+ var AbstractStorage = class {
2351
+ static get(key) {
2352
+ if (!key) {
2353
+ throw new Error("The key is not valid");
2354
+ }
2355
+ return null;
2356
+ }
2357
+ static set(key, value) {
2358
+ if (!key) {
2359
+ throw new Error("The key is not valid");
2360
+ }
2361
+ if (!value) {
2362
+ throw new Error("The value not passed");
2363
+ }
2364
+ }
2365
+ static remove(key) {
2366
+ if (!key) {
2367
+ throw new Error("The key is not valid");
2368
+ }
2369
+ }
2370
+ static clear() {
2371
+ }
2372
+ };
2373
+ var AbstractStorage_default = AbstractStorage;
2374
+
2375
+ // src/storage/utils.ts
2376
+ function jsonParse(data) {
2377
+ try {
2378
+ if (data) {
2379
+ return JSON.parse(data);
2380
+ }
2381
+ return null;
2382
+ } catch {
2383
+ return data;
2384
+ }
2385
+ }
2386
+
2387
+ // src/storage/SessionStorage.ts
2388
+ var SessionStorage = class _SessionStorage extends AbstractStorage_default {
2389
+ static get(key) {
2390
+ const data = sessionStorage.getItem(key);
2391
+ return jsonParse(data);
2392
+ }
2393
+ static set(key, value) {
2394
+ if (value) {
2395
+ sessionStorage.setItem(key, JSON.stringify(value));
2396
+ }
2397
+ }
2398
+ static update(key, field, value) {
2399
+ const data = _SessionStorage.get(key);
2400
+ if (data) {
2401
+ data[field] = value;
2402
+ _SessionStorage.set(key, data);
2403
+ } else {
2404
+ _SessionStorage.set(key, { [field]: value });
2405
+ }
2406
+ }
2407
+ static remove(key) {
2408
+ sessionStorage.removeItem(key);
2409
+ }
2410
+ static clear() {
2411
+ sessionStorage.clear();
2412
+ }
2413
+ };
2414
+
2415
+ // src/hooks/use-pagination.ts
2416
+ var DEFAULT_PAGE_SIZE = 20;
2417
+ var DEFAULT_PAGE = 1;
2418
+ function usePagination(config) {
2419
+ const { key, defaultPageSize = DEFAULT_PAGE_SIZE, defaultPage = DEFAULT_PAGE } = config;
2420
+ const [state, setState] = useState9(() => {
2421
+ const stored = SessionStorage.get(`pagination-${key}`);
2422
+ if (stored) {
2423
+ return {
2424
+ page: stored.page || defaultPage,
2425
+ pageSize: stored.pageSize || defaultPageSize,
2426
+ totalItems: stored.totalItems || 0
2427
+ };
2428
+ }
2429
+ return {
2430
+ page: defaultPage,
2431
+ pageSize: defaultPageSize,
2432
+ totalItems: 0
2433
+ };
2434
+ });
2435
+ useEffect12(() => {
2436
+ SessionStorage.set(`pagination-${key}`, state);
2437
+ }, [key, state]);
2438
+ const pages = useMemo(() => {
2439
+ return state.totalItems > 0 ? Math.ceil(state.totalItems / state.pageSize) : 0;
2440
+ }, [state.totalItems, state.pageSize]);
2441
+ const hasNextPage = useMemo(() => state.page < pages, [state.page, pages]);
2442
+ const hasPreviousPage = useMemo(() => state.page > 1, [state.page]);
2443
+ const startItem = useMemo(() => {
2444
+ return state.totalItems === 0 ? 0 : (state.page - 1) * state.pageSize + 1;
2445
+ }, [state.page, state.pageSize, state.totalItems]);
2446
+ const endItem = useMemo(() => {
2447
+ return Math.min(state.page * state.pageSize, state.totalItems);
2448
+ }, [state.page, state.pageSize, state.totalItems]);
2449
+ const isEmpty = useMemo(() => state.totalItems === 0, [state.totalItems]);
2450
+ const setPage = useCallback8(
2451
+ (page) => {
2452
+ const clampedPage = Math.max(1, Math.min(page, pages || 1));
2453
+ setState((prev) => ({ ...prev, page: clampedPage }));
2454
+ },
2455
+ [pages]
2456
+ );
2457
+ const setPageSize = useCallback8((pageSize) => {
2458
+ const validPageSize = Math.max(1, pageSize);
2459
+ setState((prev) => {
2460
+ const currentFirstItem = (prev.page - 1) * prev.pageSize + 1;
2461
+ const newPage = Math.max(1, Math.ceil(currentFirstItem / validPageSize));
2462
+ return {
2463
+ ...prev,
2464
+ pageSize: validPageSize,
2465
+ page: newPage
2466
+ };
2467
+ });
2468
+ }, []);
2469
+ const setTotalItems = useCallback8((totalItems) => {
2470
+ const validTotalItems = Math.max(0, totalItems);
2471
+ setState((prev) => {
2472
+ const newPages = validTotalItems > 0 ? Math.ceil(validTotalItems / prev.pageSize) : 0;
2473
+ const clampedPage = prev.page > newPages && newPages > 0 ? newPages : prev.page;
2474
+ return {
2475
+ ...prev,
2476
+ totalItems: validTotalItems,
2477
+ page: clampedPage
2478
+ };
2479
+ });
2480
+ }, []);
2481
+ const nextPage = useCallback8(() => {
2482
+ setPage(state.page + 1);
2483
+ }, [setPage, state.page]);
2484
+ const previousPage = useCallback8(() => {
2485
+ setPage(state.page - 1);
2486
+ }, [setPage, state.page]);
2487
+ const goToFirstPage = useCallback8(() => {
2488
+ setPage(1);
2489
+ }, [setPage]);
2490
+ const goToLastPage = useCallback8(() => {
2491
+ setPage(pages);
2492
+ }, [setPage, pages]);
2493
+ const reset = useCallback8(() => {
2494
+ setState({
2495
+ page: defaultPage,
2496
+ pageSize: defaultPageSize,
2497
+ totalItems: 0
2498
+ });
2499
+ }, [defaultPage, defaultPageSize]);
2500
+ return {
2501
+ page: state.page,
2502
+ pageSize: state.pageSize,
2503
+ totalItems: state.totalItems,
2504
+ pages,
2505
+ setPage,
2506
+ setPageSize,
2507
+ setTotalItems,
2508
+ nextPage,
2509
+ previousPage,
2510
+ goToFirstPage,
2511
+ goToLastPage,
2512
+ reset,
2513
+ hasNextPage,
2514
+ hasPreviousPage,
2515
+ startItem,
2516
+ endItem,
2517
+ isEmpty
2518
+ };
2519
+ }
2520
+
2521
+ // src/hooks/use-timer.ts
2522
+ import { useEffect as useEffect13, useState as useState10 } from "react";
2523
+ var useTimer = ({ seconds }) => {
2524
+ const [timeLeft, setTimeLeft] = useState10(seconds);
2525
+ const [isTimerRunning, setIsTimerRunning] = useState10(true);
2526
+ useEffect13(() => {
2527
+ if (!isTimerRunning) return;
2528
+ const timer = setInterval(() => {
2529
+ setTimeLeft((prev) => {
2530
+ if (prev <= 1) {
2531
+ clearInterval(timer);
2532
+ setIsTimerRunning(false);
2533
+ return 0;
2534
+ }
2535
+ return prev - 1;
2536
+ });
2537
+ }, 1e3);
2538
+ return () => clearInterval(timer);
2539
+ }, [isTimerRunning]);
2540
+ const resetTimer = () => {
2541
+ setTimeLeft(seconds);
2542
+ setIsTimerRunning(true);
2543
+ };
2544
+ return {
2545
+ timeLeft,
2546
+ isTimerRunning,
2547
+ resetTimer
2548
+ };
2549
+ };
2550
+
2551
+ // src/hooks/use-timeout.ts
2552
+ import { useCallback as useCallback9, useEffect as useEffect14, useRef as useRef8 } from "react";
2553
+ function useTimeout() {
2554
+ const timeoutRef = useRef8();
2555
+ const clearTimeoutRef = useCallback9(() => {
2556
+ clearTimeout(timeoutRef.current);
2557
+ timeoutRef.current = void 0;
2558
+ }, []);
2559
+ const scheduleTimeout = useCallback9(
2560
+ (callback, delay) => {
2561
+ clearTimeoutRef();
2562
+ timeoutRef.current = setTimeout(callback, delay);
2563
+ },
2564
+ [clearTimeoutRef]
2012
2565
  );
2566
+ useEffect14(() => clearTimeoutRef, [clearTimeoutRef]);
2567
+ return { scheduleTimeout, clearTimeoutRef };
2568
+ }
2569
+
2570
+ // src/hooks/use-hover.ts
2571
+ import { useCallback as useCallback10, useState as useState11 } from "react";
2572
+ function useHover() {
2573
+ const [isHovering, setIsHovering] = useState11(false);
2574
+ const handleMouseEnter = useCallback10(() => {
2575
+ setIsHovering(true);
2576
+ }, []);
2577
+ const handleMouseLeave = useCallback10(() => {
2578
+ setIsHovering(false);
2579
+ }, []);
2580
+ return {
2581
+ isHovering,
2582
+ handleMouseEnter,
2583
+ handleMouseLeave
2584
+ };
2013
2585
  }
2014
2586
 
2015
2587
  // src/dialog/Dialog.tsx
2016
2588
  import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
2017
2589
  function useIframeTitleFix(titleRef) {
2018
- React10.useEffect(() => {
2590
+ React11.useEffect(() => {
2019
2591
  if (!window.chekinCustomDocument) {
2020
2592
  return;
2021
2593
  }
@@ -2044,7 +2616,7 @@ function DialogClose({ ...props }) {
2044
2616
  }
2045
2617
  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";
2046
2618
  var scrollableOverlayClasses = "fixed inset-0 z-50 flex flex-col items-center overflow-y-auto overscroll-none pb-[19px] pt-[20px]";
2047
- var DialogOverlay = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
2619
+ var DialogOverlay = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
2048
2620
  DialogPrimitive.Overlay,
2049
2621
  {
2050
2622
  ref,
@@ -2056,7 +2628,7 @@ var DialogOverlay = React10.forwardRef(({ className, ...props }, ref) => /* @__P
2056
2628
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
2057
2629
  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";
2058
2630
  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";
2059
- var DialogContent = React10.forwardRef(
2631
+ var DialogContent = React11.forwardRef(
2060
2632
  ({ className, showCloseButton = true, children, container, lockScroll = true, ...props }, ref) => {
2061
2633
  const contentElement = /* @__PURE__ */ jsxs22(
2062
2634
  DialogPrimitive.Content,
@@ -2104,8 +2676,8 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx29(
2104
2676
  }
2105
2677
  );
2106
2678
  DialogFooter.displayName = "DialogFooter";
2107
- var DialogTitle = React10.forwardRef(({ className, ...props }, ref) => {
2108
- const titleRef = React10.useRef(null);
2679
+ var DialogTitle = React11.forwardRef(({ className, ...props }, ref) => {
2680
+ const titleRef = React11.useRef(null);
2109
2681
  const combinedRef = useCombinedRef(titleRef, ref);
2110
2682
  useIframeTitleFix(titleRef);
2111
2683
  return /* @__PURE__ */ jsx29(
@@ -2119,7 +2691,7 @@ var DialogTitle = React10.forwardRef(({ className, ...props }, ref) => {
2119
2691
  );
2120
2692
  });
2121
2693
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
2122
- var DialogDescription = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
2694
+ var DialogDescription = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx29(
2123
2695
  DialogPrimitive.Description,
2124
2696
  {
2125
2697
  ref,
@@ -2181,9 +2753,9 @@ function ConfirmationDialog({
2181
2753
  }
2182
2754
 
2183
2755
  // src/default-select-trigger/DefaultSelectTrigger.tsx
2184
- import * as React11 from "react";
2756
+ import * as React12 from "react";
2185
2757
  import { jsx as jsx31 } from "react/jsx-runtime";
2186
- var DefaultSelectTrigger = React11.forwardRef(
2758
+ var DefaultSelectTrigger = React12.forwardRef(
2187
2759
  ({
2188
2760
  className,
2189
2761
  disabled,
@@ -2247,17 +2819,17 @@ function DownloadEntryFormsButton({
2247
2819
  }
2248
2820
 
2249
2821
  // src/dropdown-button/DropdownButton.tsx
2250
- import { useState as useState5 } from "react";
2822
+ import { useState as useState12 } from "react";
2251
2823
 
2252
2824
  // src/dropdown-menu/DropdownMenu.tsx
2253
- import * as React12 from "react";
2825
+ import * as React13 from "react";
2254
2826
  import * as RadixMenu from "@radix-ui/react-dropdown-menu";
2255
2827
  import { jsx as jsx33 } from "react/jsx-runtime";
2256
2828
  var DropdownMenu = RadixMenu.Root;
2257
2829
  var DropdownMenuTrigger = RadixMenu.Trigger;
2258
2830
  var DropdownMenuPortal = RadixMenu.Portal;
2259
2831
  var DropdownMenuGroup = RadixMenu.Group;
2260
- var DropdownMenuContent = React12.forwardRef(({ className, sideOffset = 6, container, ...props }, ref) => /* @__PURE__ */ jsx33(RadixMenu.Portal, { container: container || getCustomContainer(), children: /* @__PURE__ */ jsx33(
2832
+ var DropdownMenuContent = React13.forwardRef(({ className, sideOffset = 6, container, ...props }, ref) => /* @__PURE__ */ jsx33(RadixMenu.Portal, { container: container || getCustomContainer(), children: /* @__PURE__ */ jsx33(
2261
2833
  RadixMenu.Content,
2262
2834
  {
2263
2835
  ref,
@@ -2278,9 +2850,9 @@ var itemClasses = [
2278
2850
  "data-[highlighted]:bg-chekin-surface-pressed data-[highlighted]:text-chekin-blue",
2279
2851
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-30"
2280
2852
  ];
2281
- var DropdownMenuItem = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(RadixMenu.Item, { ref, className: cn(itemClasses, className), ...props }));
2853
+ var DropdownMenuItem = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(RadixMenu.Item, { ref, className: cn(itemClasses, className), ...props }));
2282
2854
  DropdownMenuItem.displayName = "DropdownMenuItem";
2283
- var DropdownMenuLabel = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
2855
+ var DropdownMenuLabel = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
2284
2856
  RadixMenu.Label,
2285
2857
  {
2286
2858
  ref,
@@ -2292,7 +2864,7 @@ var DropdownMenuLabel = React12.forwardRef(({ className, ...props }, ref) => /*
2292
2864
  }
2293
2865
  ));
2294
2866
  DropdownMenuLabel.displayName = "DropdownMenuLabel";
2295
- var DropdownMenuSeparator = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
2867
+ var DropdownMenuSeparator = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx33(
2296
2868
  RadixMenu.Separator,
2297
2869
  {
2298
2870
  ref,
@@ -2311,7 +2883,7 @@ function DropdownButton({
2311
2883
  modal,
2312
2884
  className
2313
2885
  }) {
2314
- const [isOpen, setIsOpen] = useState5(false);
2886
+ const [isOpen, setIsOpen] = useState12(false);
2315
2887
  return /* @__PURE__ */ jsxs25(DropdownMenu, { onOpenChange: setIsOpen, modal, children: [
2316
2888
  /* @__PURE__ */ jsx34(DropdownMenuTrigger, { asChild: true, children: typeof trigger === "function" ? trigger(isOpen) : trigger }),
2317
2889
  /* @__PURE__ */ jsx34(
@@ -2524,9 +3096,9 @@ function EmptySectionPlaceholder({
2524
3096
  }
2525
3097
 
2526
3098
  // src/external-link/ExternalLink.tsx
2527
- import * as React13 from "react";
3099
+ import * as React14 from "react";
2528
3100
  import { jsx as jsx43, jsxs as jsxs27 } from "react/jsx-runtime";
2529
- var ExternalLink = React13.forwardRef(
3101
+ var ExternalLink = React14.forwardRef(
2530
3102
  ({ className, children, showIcon = true, target = "_blank", rel, ...props }, ref) => /* @__PURE__ */ jsxs27(
2531
3103
  "a",
2532
3104
  {
@@ -2571,33 +3143,8 @@ ExternalLink.displayName = "ExternalLink";
2571
3143
  import { useTranslation as useTranslation9 } from "react-i18next";
2572
3144
  import { Play as Play3 } from "lucide-react";
2573
3145
 
2574
- // src/lib/use-modal-controls.ts
2575
- import { useCallback as useCallback3, useState as useState6 } from "react";
2576
- function useModalControls(initState = false, { disabled } = {}) {
2577
- const [isOpen, setIsOpen] = useState6(initState);
2578
- const openModal = useCallback3(() => {
2579
- if (disabled) return;
2580
- setIsOpen(true);
2581
- }, [disabled]);
2582
- const closeModal = useCallback3(() => {
2583
- if (disabled) return;
2584
- setIsOpen(false);
2585
- }, [disabled]);
2586
- const toggleModal = useCallback3(() => {
2587
- if (disabled) return;
2588
- setIsOpen((value) => !value);
2589
- }, [disabled]);
2590
- return {
2591
- isOpen,
2592
- openModal,
2593
- closeModal,
2594
- toggleModal,
2595
- setIsOpen
2596
- };
2597
- }
2598
-
2599
3146
  // src/switch/Switch.tsx
2600
- import * as React14 from "react";
3147
+ import * as React15 from "react";
2601
3148
  import * as SwitchPrimitives from "@radix-ui/react-switch";
2602
3149
  import { cva as cva7 } from "class-variance-authority";
2603
3150
  import { jsx as jsx44, jsxs as jsxs28 } from "react/jsx-runtime";
@@ -2639,9 +3186,9 @@ var switchThumbVariants = cva7(
2639
3186
  }
2640
3187
  }
2641
3188
  );
2642
- var Switch = React14.forwardRef(
3189
+ var Switch = React15.forwardRef(
2643
3190
  ({ className, size, readOnly, loading, onChange, value, id, label, error, ...props }, ref) => {
2644
- const generatedId = React14.useId();
3191
+ const generatedId = React15.useId();
2645
3192
  const fieldId = id || generatedId;
2646
3193
  const switchElement = /* @__PURE__ */ jsx44(
2647
3194
  SwitchPrimitives.Root,
@@ -2674,7 +3221,7 @@ var Switch = React14.forwardRef(
2674
3221
  Switch.displayName = SwitchPrimitives.Root.displayName;
2675
3222
 
2676
3223
  // src/video-player/VideoPlayer.tsx
2677
- import { useEffect as useEffect6, useRef as useRef5, useState as useState7 } from "react";
3224
+ import { useEffect as useEffect16, useRef as useRef10, useState as useState13 } from "react";
2678
3225
  import { useTranslation as useTranslation8 } from "react-i18next";
2679
3226
  import {
2680
3227
  Loader2,
@@ -2688,28 +3235,6 @@ import {
2688
3235
  VolumeX,
2689
3236
  X as X2
2690
3237
  } from "lucide-react";
2691
-
2692
- // src/lib/use-click-escape.ts
2693
- import { useEffect as useEffect5, useRef as useRef4 } from "react";
2694
- function useClickEscape({ enabled = true, onClick }) {
2695
- const onClickRef = useRef4(onClick);
2696
- useEffect5(() => {
2697
- onClickRef.current = onClick;
2698
- }, [onClick]);
2699
- useEffect5(() => {
2700
- const handleKeyDown = (event) => {
2701
- if (event.key === "Escape" && enabled) {
2702
- onClickRef.current?.();
2703
- }
2704
- };
2705
- window.addEventListener("keydown", handleKeyDown);
2706
- return () => {
2707
- window.removeEventListener("keydown", handleKeyDown);
2708
- };
2709
- }, [enabled]);
2710
- }
2711
-
2712
- // src/video-player/VideoPlayer.tsx
2713
3238
  import { Fragment as Fragment4, jsx as jsx45, jsxs as jsxs29 } from "react/jsx-runtime";
2714
3239
  function VideoPlayer({
2715
3240
  src,
@@ -2720,20 +3245,20 @@ function VideoPlayer({
2720
3245
  autoPlay = false
2721
3246
  }) {
2722
3247
  const { t } = useTranslation8();
2723
- const videoRef = useRef5(null);
2724
- const iframeRef = useRef5(null);
2725
- const containerRef = useRef5(null);
2726
- const [isPlaying, setIsPlaying] = useState7(false);
2727
- const [isMuted, setIsMuted] = useState7(false);
2728
- const [currentTime, setCurrentTime] = useState7(0);
2729
- const [duration, setDuration] = useState7(0);
2730
- const [isFullScreenMode, setIsFullScreenMode] = useState7(isFullScreen);
2731
- const [isLoading, setIsLoading] = useState7(true);
2732
- const [videoSource, setVideoSource] = useState7("file");
2733
- const [youtubeEmbedUrl, setYoutubeEmbedUrl] = useState7("");
2734
- const [vimeoEmbedUrl, setVimeoEmbedUrl] = useState7("");
3248
+ const videoRef = useRef10(null);
3249
+ const iframeRef = useRef10(null);
3250
+ const containerRef = useRef10(null);
3251
+ const [isPlaying, setIsPlaying] = useState13(false);
3252
+ const [isMuted, setIsMuted] = useState13(false);
3253
+ const [currentTime, setCurrentTime] = useState13(0);
3254
+ const [duration, setDuration] = useState13(0);
3255
+ const [isFullScreenMode, setIsFullScreenMode] = useState13(isFullScreen);
3256
+ const [isLoading, setIsLoading] = useState13(true);
3257
+ const [videoSource, setVideoSource] = useState13("file");
3258
+ const [youtubeEmbedUrl, setYoutubeEmbedUrl] = useState13("");
3259
+ const [vimeoEmbedUrl, setVimeoEmbedUrl] = useState13("");
2735
3260
  useClickEscape({ enabled: isFullScreenMode, onClick: onClose });
2736
- useEffect6(() => {
3261
+ useEffect16(() => {
2737
3262
  const youtubeRegex = /(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/;
2738
3263
  const vimeoRegex = /(?:vimeo\.com\/|vimeo\.com\/video\/)(\d+)/;
2739
3264
  const youtubeMatch = src.match(youtubeRegex);
@@ -2762,7 +3287,7 @@ function VideoPlayer({
2762
3287
  setYoutubeEmbedUrl("");
2763
3288
  setVimeoEmbedUrl("");
2764
3289
  }, [src, autoPlay]);
2765
- useEffect6(() => {
3290
+ useEffect16(() => {
2766
3291
  if (videoSource !== "file") return;
2767
3292
  const video = videoRef.current;
2768
3293
  if (!video) return;
@@ -2790,7 +3315,7 @@ function VideoPlayer({
2790
3315
  video.removeEventListener("canplay", handleCanPlay);
2791
3316
  };
2792
3317
  }, [videoSource]);
2793
- useEffect6(() => {
3318
+ useEffect16(() => {
2794
3319
  if (isFullScreenMode && videoRef.current && videoSource === "file") {
2795
3320
  void videoRef.current.play();
2796
3321
  setIsPlaying(true);
@@ -3069,7 +3594,7 @@ function FeatureCard({
3069
3594
  // src/file-input-button/FileInputButton.tsx
3070
3595
  import {
3071
3596
  forwardRef as forwardRef19,
3072
- useCallback as useCallback4
3597
+ useCallback as useCallback11
3073
3598
  } from "react";
3074
3599
  import { Upload } from "lucide-react";
3075
3600
  import { jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
@@ -3085,7 +3610,7 @@ var FileInputButton = forwardRef19(
3085
3610
  size = "default",
3086
3611
  ...props
3087
3612
  }, ref) => {
3088
- const handleChange = useCallback4(
3613
+ const handleChange = useCallback11(
3089
3614
  (event) => {
3090
3615
  onChange?.(event);
3091
3616
  event.target.value = "";
@@ -3168,7 +3693,7 @@ var FormBox = {
3168
3693
  import {
3169
3694
  forwardRef as forwardRef20,
3170
3695
  useId as useId4,
3171
- useState as useState8
3696
+ useState as useState14
3172
3697
  } from "react";
3173
3698
  import { useTranslation as useTranslation10 } from "react-i18next";
3174
3699
 
@@ -3200,8 +3725,8 @@ var FreeTextField = forwardRef20(
3200
3725
  }, ref) => {
3201
3726
  const { t } = useTranslation10();
3202
3727
  const inputId = useId4();
3203
- const [internalValue, setInternalValue] = useState8(defaultValue ?? "");
3204
- const [isFocused, setIsFocused] = useState8(false);
3728
+ const [internalValue, setInternalValue] = useState14(defaultValue ?? "");
3729
+ const [isFocused, setIsFocused] = useState14(false);
3205
3730
  const currentValue = value !== void 0 ? value : internalValue;
3206
3731
  const isEmpty = !currentValue || String(currentValue).length === 0;
3207
3732
  const hasError = Boolean(error);
@@ -3285,7 +3810,7 @@ var FreeTextField = forwardRef20(
3285
3810
  FreeTextField.displayName = "FreeTextField";
3286
3811
 
3287
3812
  // src/framed-icon/FramedIcon.tsx
3288
- import * as React15 from "react";
3813
+ import * as React16 from "react";
3289
3814
  import { cva as cva8 } from "class-variance-authority";
3290
3815
  import { jsx as jsx53 } from "react/jsx-runtime";
3291
3816
  var framedIconVariants = cva8("inline-flex items-center justify-center shrink-0", {
@@ -3309,7 +3834,7 @@ var framedIconVariants = cva8("inline-flex items-center justify-center shrink-0"
3309
3834
  },
3310
3835
  defaultVariants: { size: "m", shape: "rounded", tone: "info" }
3311
3836
  });
3312
- var FramedIcon = React15.forwardRef(
3837
+ var FramedIcon = React16.forwardRef(
3313
3838
  ({ className, size, shape, tone, children, ...props }, ref) => /* @__PURE__ */ jsx53(
3314
3839
  "span",
3315
3840
  {
@@ -3471,7 +3996,7 @@ var IconRegistry = class {
3471
3996
  var RegistryIcon = Icon;
3472
3997
 
3473
3998
  // src/icon-button/IconButton.tsx
3474
- import * as React16 from "react";
3999
+ import * as React17 from "react";
3475
4000
  import { cva as cva9 } from "class-variance-authority";
3476
4001
  import { jsx as jsx57 } from "react/jsx-runtime";
3477
4002
  var iconButtonVariants = cva9(
@@ -3502,7 +4027,7 @@ var iconButtonVariants = cva9(
3502
4027
  defaultVariants: { size: "m", shape: "rounded", variant: "secondary" }
3503
4028
  }
3504
4029
  );
3505
- var IconButton = React16.forwardRef(
4030
+ var IconButton = React17.forwardRef(
3506
4031
  ({ className, size, shape, variant, label, children, type = "button", ...props }, ref) => /* @__PURE__ */ jsx57(
3507
4032
  "button",
3508
4033
  {
@@ -3533,7 +4058,7 @@ function InfoBox({ className, children }) {
3533
4058
  }
3534
4059
 
3535
4060
  // src/image/Image.tsx
3536
- import { useState as useState9 } from "react";
4061
+ import { useState as useState15 } from "react";
3537
4062
  import { jsx as jsx59 } from "react/jsx-runtime";
3538
4063
  function Image2({
3539
4064
  src,
@@ -3542,7 +4067,7 @@ function Image2({
3542
4067
  fallbackSrc = "https://placehold.co/600x400?text=Image",
3543
4068
  ...props
3544
4069
  }) {
3545
- const [error, setError] = useState9(false);
4070
+ const [error, setError] = useState15(false);
3546
4071
  return /* @__PURE__ */ jsx59(
3547
4072
  "img",
3548
4073
  {
@@ -3557,9 +4082,9 @@ function Image2({
3557
4082
  }
3558
4083
 
3559
4084
  // src/input/Input.tsx
3560
- import * as React17 from "react";
4085
+ import * as React18 from "react";
3561
4086
  import { jsx as jsx60 } from "react/jsx-runtime";
3562
- var Input = React17.forwardRef(
4087
+ var Input = React18.forwardRef(
3563
4088
  ({ className, type, readOnly, ...props }, ref) => /* @__PURE__ */ jsx60(
3564
4089
  "input",
3565
4090
  {
@@ -3583,7 +4108,7 @@ var Input = React17.forwardRef(
3583
4108
  Input.displayName = "Input";
3584
4109
 
3585
4110
  // src/input-otp/InputOTP.tsx
3586
- import * as React18 from "react";
4111
+ import * as React19 from "react";
3587
4112
 
3588
4113
  // src/input-otp/InputOTPContext.ts
3589
4114
  import { createContext, useContext } from "react";
@@ -3601,7 +4126,7 @@ function extractDigits(str) {
3601
4126
  }
3602
4127
 
3603
4128
  // src/input-otp/useInputOTP.ts
3604
- import { useCallback as useCallback5, useEffect as useEffect7, useMemo, useRef as useRef6, useState as useState10 } from "react";
4129
+ import { useCallback as useCallback12, useEffect as useEffect17, useMemo as useMemo2, useRef as useRef11, useState as useState16 } from "react";
3605
4130
  function useInputOTP({
3606
4131
  maxLength,
3607
4132
  value,
@@ -3610,12 +4135,12 @@ function useInputOTP({
3610
4135
  autoFocus,
3611
4136
  error
3612
4137
  }) {
3613
- const [activeIndex, setActiveIndex] = useState10(-1);
3614
- const inputRefs = useRef6([]);
3615
- const containerRef = useRef6(null);
3616
- const blurTimeoutRef = useRef6();
3617
- const slotsRef = useRef6(Array.from({ length: maxLength }, () => ""));
3618
- const slots = useMemo(() => {
4138
+ const [activeIndex, setActiveIndex] = useState16(-1);
4139
+ const inputRefs = useRef11([]);
4140
+ const containerRef = useRef11(null);
4141
+ const blurTimeoutRef = useRef11();
4142
+ const slotsRef = useRef11(Array.from({ length: maxLength }, () => ""));
4143
+ const slots = useMemo2(() => {
3619
4144
  const nextSlots = Array.from({ length: maxLength }, () => "");
3620
4145
  for (let index = 0; index < Math.min(value.length, maxLength); index += 1) {
3621
4146
  const char = value[index];
@@ -3626,7 +4151,7 @@ function useInputOTP({
3626
4151
  return nextSlots;
3627
4152
  }, [value, maxLength]);
3628
4153
  slotsRef.current = slots;
3629
- const emitValue = useCallback5(
4154
+ const emitValue = useCallback12(
3630
4155
  (newSlots) => {
3631
4156
  let lastFilledIndex = -1;
3632
4157
  for (let index = newSlots.length - 1; index >= 0; index -= 1) {
@@ -3647,12 +4172,12 @@ function useInputOTP({
3647
4172
  },
3648
4173
  [onChange]
3649
4174
  );
3650
- useEffect7(() => {
4175
+ useEffect17(() => {
3651
4176
  if (autoFocus && inputRefs.current[0]) {
3652
4177
  inputRefs.current[0].focus();
3653
4178
  }
3654
4179
  }, [autoFocus]);
3655
- const handleContainerFocusIn = useCallback5((event) => {
4180
+ const handleContainerFocusIn = useCallback12((event) => {
3656
4181
  clearTimeout(blurTimeoutRef.current);
3657
4182
  const target = event.target;
3658
4183
  const slotIndex = inputRefs.current.indexOf(target);
@@ -3660,7 +4185,7 @@ function useInputOTP({
3660
4185
  setActiveIndex(slotIndex);
3661
4186
  }
3662
4187
  }, []);
3663
- const handleContainerFocusOut = useCallback5(() => {
4188
+ const handleContainerFocusOut = useCallback12(() => {
3664
4189
  clearTimeout(blurTimeoutRef.current);
3665
4190
  blurTimeoutRef.current = setTimeout(() => {
3666
4191
  if (!containerRef.current?.contains(document.activeElement)) {
@@ -3668,8 +4193,8 @@ function useInputOTP({
3668
4193
  }
3669
4194
  }, 0);
3670
4195
  }, []);
3671
- useEffect7(() => () => clearTimeout(blurTimeoutRef.current), []);
3672
- const handleDigitInput = useCallback5(
4196
+ useEffect17(() => () => clearTimeout(blurTimeoutRef.current), []);
4197
+ const handleDigitInput = useCallback12(
3673
4198
  (index, digit) => {
3674
4199
  if (!DIGIT_REGEX.test(digit)) return;
3675
4200
  const newSlots = [...slotsRef.current];
@@ -3683,7 +4208,7 @@ function useInputOTP({
3683
4208
  },
3684
4209
  [maxLength, emitValue]
3685
4210
  );
3686
- const handleDelete = useCallback5(
4211
+ const handleDelete = useCallback12(
3687
4212
  (index) => {
3688
4213
  const newSlots = [...slotsRef.current];
3689
4214
  if (newSlots[index]) {
@@ -3698,7 +4223,7 @@ function useInputOTP({
3698
4223
  },
3699
4224
  [emitValue]
3700
4225
  );
3701
- const handlePaste = useCallback5(
4226
+ const handlePaste = useCallback12(
3702
4227
  (text) => {
3703
4228
  const digits = extractDigits(text).slice(0, maxLength);
3704
4229
  if (digits.length > 0) {
@@ -3714,7 +4239,7 @@ function useInputOTP({
3714
4239
  },
3715
4240
  [maxLength, emitValue]
3716
4241
  );
3717
- const contextValue = useMemo(
4242
+ const contextValue = useMemo2(
3718
4243
  () => ({
3719
4244
  slots,
3720
4245
  activeIndex,
@@ -3748,7 +4273,7 @@ function useInputOTP({
3748
4273
 
3749
4274
  // src/input-otp/useInputOTPSlot.ts
3750
4275
  import {
3751
- useCallback as useCallback6
4276
+ useCallback as useCallback13
3752
4277
  } from "react";
3753
4278
  function useInputOTPSlot(index) {
3754
4279
  const {
@@ -3819,13 +4344,13 @@ function useInputOTPSlot(index) {
3819
4344
  event.preventDefault();
3820
4345
  handlePaste(event.clipboardData.getData("text/plain"));
3821
4346
  };
3822
- const setInputRef = useCallback6(
4347
+ const setInputRef = useCallback13(
3823
4348
  (element) => {
3824
4349
  inputRefs.current[index] = element;
3825
4350
  },
3826
4351
  [index, inputRefs]
3827
4352
  );
3828
- const focusSlot = useCallback6(() => {
4353
+ const focusSlot = useCallback13(() => {
3829
4354
  inputRefs.current[index]?.focus();
3830
4355
  }, [index, inputRefs]);
3831
4356
  return {
@@ -3868,11 +4393,11 @@ function InputOTP({
3868
4393
  }
3869
4394
  ) });
3870
4395
  }
3871
- var InputOTPGroup = React18.forwardRef(
4396
+ var InputOTPGroup = React19.forwardRef(
3872
4397
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx61("div", { ref, className: cn("flex items-center", className), ...props })
3873
4398
  );
3874
4399
  InputOTPGroup.displayName = "InputOTPGroup";
3875
- var InputOTPSlot = React18.forwardRef(
4400
+ var InputOTPSlot = React19.forwardRef(
3876
4401
  ({ index, className, ...props }, ref) => {
3877
4402
  const {
3878
4403
  char,
@@ -3921,13 +4446,13 @@ var InputOTPSlot = React18.forwardRef(
3921
4446
  }
3922
4447
  );
3923
4448
  InputOTPSlot.displayName = "InputOTPSlot";
3924
- var InputOTPSeparator = React18.forwardRef(
4449
+ var InputOTPSeparator = React19.forwardRef(
3925
4450
  (props, ref) => /* @__PURE__ */ jsx61("div", { ref, role: "separator", ...props })
3926
4451
  );
3927
4452
  InputOTPSeparator.displayName = "InputOTPSeparator";
3928
4453
 
3929
4454
  // src/icons-dropdown/IconsDropdown.tsx
3930
- import { useState as useState11 } from "react";
4455
+ import { useState as useState17 } from "react";
3931
4456
  import { jsx as jsx62, jsxs as jsxs36 } from "react/jsx-runtime";
3932
4457
  function IconsDropdown({
3933
4458
  icons,
@@ -3939,7 +4464,7 @@ function IconsDropdown({
3939
4464
  defaultOpen,
3940
4465
  onOpenChange: onOpenChangeProp
3941
4466
  }) {
3942
- const [open, setOpen] = useState11(defaultOpen ?? false);
4467
+ const [open, setOpen] = useState17(defaultOpen ?? false);
3943
4468
  function handleOpenChange(value) {
3944
4469
  setOpen(value);
3945
4470
  onOpenChangeProp?.(value);
@@ -4546,14 +5071,14 @@ LinkInternal.displayName = "Link";
4546
5071
  var Link = memo3(LinkInternal);
4547
5072
 
4548
5073
  // src/image-full-screen-view/ImageFullScreenView.tsx
4549
- import { useState as useState12 } from "react";
5074
+ import { useState as useState18 } from "react";
4550
5075
  import { RotateCw, X as X4, ZoomIn, ZoomOut } from "lucide-react";
4551
5076
  import { useTranslation as useTranslation13 } from "react-i18next";
4552
5077
  import { jsx as jsx67, jsxs as jsxs40 } from "react/jsx-runtime";
4553
5078
  function ImageFullScreenView({ src, alt, onClose }) {
4554
5079
  const { t } = useTranslation13();
4555
- const [scale, setScale] = useState12(1);
4556
- const [rotation, setRotation] = useState12(0);
5080
+ const [scale, setScale] = useState18(1);
5081
+ const [rotation, setRotation] = useState18(0);
4557
5082
  useClickEscape({ onClick: onClose });
4558
5083
  const zoomIn = () => setScale((value) => Math.min(value + 0.25, 3));
4559
5084
  const zoomOut = () => setScale((value) => Math.max(value - 0.25, 0.5));
@@ -4751,55 +5276,9 @@ var METRIC_CARD_VARIANTS = {
4751
5276
  };
4752
5277
 
4753
5278
  // src/modal/Modal.tsx
4754
- import { forwardRef as forwardRef28, useRef as useRef7 } from "react";
5279
+ import { forwardRef as forwardRef28, useRef as useRef12 } from "react";
4755
5280
  import { X as X5 } from "lucide-react";
4756
5281
 
4757
- // src/lib/use-scroll-frame-into-view.ts
4758
- import { useEffect as useEffect8 } from "react";
4759
-
4760
- // src/lib/runtimeSettings.ts
4761
- function getChekinRuntimeSettings() {
4762
- return window.ChekinProSettings || window.ChekinHousingsSDKSettings || {};
4763
- }
4764
- function isMobileModalModeAvailable() {
4765
- const settings = getChekinRuntimeSettings();
4766
- return !settings.autoHeight;
4767
- }
4768
-
4769
- // src/lib/use-scroll-frame-into-view.ts
4770
- function useScrollFrameIntoView(active, options = {}) {
4771
- const { behavior = "smooth", elementRef } = options;
4772
- useEffect8(() => {
4773
- const sdkWindow = window;
4774
- if (!active || !getChekinRuntimeSettings()?.autoHeight) {
4775
- return;
4776
- }
4777
- const frame = sdkWindow.chekinCustomFrame;
4778
- if (!frame) {
4779
- return;
4780
- }
4781
- const parentWindow = window.parent;
4782
- const scrollToElement = () => {
4783
- const frameRect = frame.getBoundingClientRect();
4784
- if (elementRef?.current) {
4785
- const elementRect = elementRef.current.getBoundingClientRect();
4786
- const elementCenterInFrame = elementRect.top + elementRect.height / 2;
4787
- const elementCenterInParent = frameRect.top + elementCenterInFrame;
4788
- const targetScroll = parentWindow.scrollY + elementCenterInParent - parentWindow.innerHeight / 2;
4789
- parentWindow.scrollTo({
4790
- top: Math.max(0, targetScroll),
4791
- behavior
4792
- });
4793
- return;
4794
- }
4795
- frame.scrollIntoView({ behavior, block: "start" });
4796
- };
4797
- requestAnimationFrame(() => {
4798
- requestAnimationFrame(scrollToElement);
4799
- });
4800
- }, [active, behavior, elementRef]);
4801
- }
4802
-
4803
5282
  // src/modal/styles.module.css
4804
5283
  var styles_default4 = {};
4805
5284
 
@@ -4828,7 +5307,7 @@ function Modal({
4828
5307
  container,
4829
5308
  modal
4830
5309
  }) {
4831
- const contentRef = useRef7(null);
5310
+ const contentRef = useRef12(null);
4832
5311
  useScrollFrameIntoView(open, { elementRef: contentRef });
4833
5312
  const handleClose = () => {
4834
5313
  onOpenChange?.(false);
@@ -4958,14 +5437,14 @@ import { useTranslation as useTranslation16 } from "react-i18next";
4958
5437
  import { ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight3, ChevronsLeft, ChevronsRight } from "lucide-react";
4959
5438
 
4960
5439
  // src/select/Select.tsx
4961
- import * as React19 from "react";
5440
+ import * as React20 from "react";
4962
5441
  import * as RadixSelect from "@radix-ui/react-select";
4963
5442
  import { jsx as jsx74, jsxs as jsxs46 } from "react/jsx-runtime";
4964
5443
  var SelectRoot = RadixSelect.Root;
4965
5444
  var SelectValue = RadixSelect.Value;
4966
5445
  var SelectGroup = RadixSelect.Group;
4967
5446
  var SelectPortal = RadixSelect.Portal;
4968
- var SelectTrigger = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs46(
5447
+ var SelectTrigger = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs46(
4969
5448
  RadixSelect.Trigger,
4970
5449
  {
4971
5450
  ref,
@@ -5006,7 +5485,7 @@ var SelectTrigger = React19.forwardRef(({ className, children, ...props }, ref)
5006
5485
  }
5007
5486
  ));
5008
5487
  SelectTrigger.displayName = "SelectTrigger";
5009
- var SelectContent = React19.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx74(RadixSelect.Portal, { children: /* @__PURE__ */ jsx74(
5488
+ var SelectContent = React20.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx74(RadixSelect.Portal, { children: /* @__PURE__ */ jsx74(
5010
5489
  RadixSelect.Content,
5011
5490
  {
5012
5491
  ref,
@@ -5025,7 +5504,7 @@ var SelectContent = React19.forwardRef(({ className, children, position = "poppe
5025
5504
  }
5026
5505
  ) }));
5027
5506
  SelectContent.displayName = "SelectContent";
5028
- var SelectItem = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs46(
5507
+ var SelectItem = React20.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs46(
5029
5508
  RadixSelect.Item,
5030
5509
  {
5031
5510
  ref,
@@ -5060,7 +5539,7 @@ var SelectItem = React19.forwardRef(({ className, children, ...props }, ref) =>
5060
5539
  }
5061
5540
  ));
5062
5541
  SelectItem.displayName = "SelectItem";
5063
- var SelectSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx74(
5542
+ var SelectSeparator = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx74(
5064
5543
  RadixSelect.Separator,
5065
5544
  {
5066
5545
  ref,
@@ -5069,7 +5548,7 @@ var SelectSeparator = React19.forwardRef(({ className, ...props }, ref) => /* @_
5069
5548
  }
5070
5549
  ));
5071
5550
  SelectSeparator.displayName = "SelectSeparator";
5072
- var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx74(
5551
+ var SelectLabel = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx74(
5073
5552
  RadixSelect.Label,
5074
5553
  {
5075
5554
  ref,
@@ -5081,7 +5560,7 @@ var SelectLabel = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
5081
5560
  }
5082
5561
  ));
5083
5562
  SelectLabel.displayName = "SelectLabel";
5084
- var Select = React19.forwardRef(
5563
+ var Select = React20.forwardRef(
5085
5564
  ({
5086
5565
  placeholder,
5087
5566
  label,
@@ -5092,9 +5571,9 @@ var Select = React19.forwardRef(
5092
5571
  children,
5093
5572
  ...props
5094
5573
  }, ref) => {
5095
- const reactId = React19.useId();
5574
+ const reactId = React20.useId();
5096
5575
  const triggerId = props.name ?? reactId;
5097
- const internalRef = React19.useRef(null);
5576
+ const internalRef = React20.useRef(null);
5098
5577
  const combinedRef = useCombinedRef(ref, internalRef);
5099
5578
  return /* @__PURE__ */ jsxs46("div", { className: cn("flex flex-col gap-chekin-1 w-[300px]", containerClassName), children: [
5100
5579
  label && /* @__PURE__ */ jsx74(
@@ -5251,7 +5730,7 @@ function Pagination({
5251
5730
  }
5252
5731
 
5253
5732
  // src/popover/Popover.tsx
5254
- import * as React20 from "react";
5733
+ import * as React21 from "react";
5255
5734
  import * as RadixPopover from "@radix-ui/react-popover";
5256
5735
  import { jsx as jsx76 } from "react/jsx-runtime";
5257
5736
  var Popover = RadixPopover.Root;
@@ -5259,7 +5738,7 @@ var PopoverTrigger = RadixPopover.Trigger;
5259
5738
  var PopoverAnchor = RadixPopover.Anchor;
5260
5739
  var PopoverPortal = RadixPopover.Portal;
5261
5740
  var PopoverClose = RadixPopover.Close;
5262
- var PopoverContent = React20.forwardRef(({ className, sideOffset = 8, align = "start", ...props }, ref) => /* @__PURE__ */ jsx76(RadixPopover.Portal, { children: /* @__PURE__ */ jsx76(
5741
+ var PopoverContent = React21.forwardRef(({ className, sideOffset = 8, align = "start", ...props }, ref) => /* @__PURE__ */ jsx76(RadixPopover.Portal, { children: /* @__PURE__ */ jsx76(
5263
5742
  RadixPopover.Content,
5264
5743
  {
5265
5744
  ref,
@@ -5279,11 +5758,11 @@ PopoverContent.displayName = "PopoverContent";
5279
5758
  import { forwardRef as forwardRef32 } from "react";
5280
5759
 
5281
5760
  // src/radio-group/RadioGroup.tsx
5282
- import * as React21 from "react";
5761
+ import * as React22 from "react";
5283
5762
  import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
5284
5763
  import { Circle } from "lucide-react";
5285
5764
  import { jsx as jsx77 } from "react/jsx-runtime";
5286
- var RadioGroup = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx77(
5765
+ var RadioGroup = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx77(
5287
5766
  RadioGroupPrimitive.Root,
5288
5767
  {
5289
5768
  ref,
@@ -5292,7 +5771,7 @@ var RadioGroup = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE
5292
5771
  }
5293
5772
  ));
5294
5773
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
5295
- var RadioGroupItem = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx77(
5774
+ var RadioGroupItem = React22.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx77(
5296
5775
  RadioGroupPrimitive.Item,
5297
5776
  {
5298
5777
  ref,
@@ -5309,11 +5788,11 @@ var RadioGroupItem = React21.forwardRef(({ className, ...props }, ref) => /* @__
5309
5788
  RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
5310
5789
 
5311
5790
  // src/radio/useRadioOptions.ts
5312
- import { useCallback as useCallback7, useState as useState13 } from "react";
5791
+ import { useCallback as useCallback14, useState as useState19 } from "react";
5313
5792
  function useRadioOptions({ options, defaultValue, onChange }) {
5314
5793
  const initialValue = (typeof defaultValue === "string" ? options.find((option) => option.value === defaultValue) : defaultValue) || "";
5315
- const [selectedValue, setSelectedValue] = useState13(initialValue);
5316
- const handleValueChange = useCallback7(
5794
+ const [selectedValue, setSelectedValue] = useState19(initialValue);
5795
+ const handleValueChange = useCallback14(
5317
5796
  (value) => {
5318
5797
  setSelectedValue(value);
5319
5798
  const selectedOption = options.find((option) => option.value === value) || "";
@@ -5521,7 +6000,7 @@ function RatingRadioGroup({
5521
6000
  }
5522
6001
 
5523
6002
  // src/rating-stars/RatingStars.tsx
5524
- import * as React22 from "react";
6003
+ import * as React23 from "react";
5525
6004
  import { Star as Star2 } from "lucide-react";
5526
6005
  import { useTranslation as useTranslation17 } from "react-i18next";
5527
6006
  import { jsx as jsx82, jsxs as jsxs52 } from "react/jsx-runtime";
@@ -5541,7 +6020,7 @@ function RatingStars({
5541
6020
  const { t } = useTranslation17();
5542
6021
  const normalizedRating = Math.max(0, Math.min(maxRating, rating));
5543
6022
  const stars = Array.from({ length: maxRating }, (_, index) => index + 1);
5544
- const componentId = React22.useId();
6023
+ const componentId = React23.useId();
5545
6024
  const decimal = normalizedRating - Math.floor(normalizedRating);
5546
6025
  const partialStarIndex = decimal > 0 ? Math.ceil(normalizedRating) : -1;
5547
6026
  const gradientId = `star-gradient-${componentId.replace(/:/g, "")}`;
@@ -5817,7 +6296,7 @@ import {
5817
6296
  cloneElement as cloneElement2,
5818
6297
  forwardRef as forwardRef34,
5819
6298
  isValidElement as isValidElement2,
5820
- useEffect as useEffect9
6299
+ useEffect as useEffect18
5821
6300
  } from "react";
5822
6301
 
5823
6302
  // src/selector-button/styles.module.css
@@ -5936,7 +6415,7 @@ function SelectorsInternal({
5936
6415
  }
5937
6416
  };
5938
6417
  const isAnyActive = getValueArray(value).length > 0;
5939
- useEffect9(() => {
6418
+ useEffect18(() => {
5940
6419
  onAnySelectorActive?.(isAnyActive);
5941
6420
  }, [isAnyActive, onAnySelectorActive]);
5942
6421
  return /* @__PURE__ */ jsxs56(Fragment8, { children: [
@@ -6117,30 +6596,11 @@ function SheetDescription({
6117
6596
  }
6118
6597
 
6119
6598
  // src/sidebar/Sidebar.tsx
6120
- import * as React23 from "react";
6599
+ import * as React24 from "react";
6121
6600
  import { Slot as Slot4 } from "@radix-ui/react-slot";
6122
6601
  import { cva as cva11 } from "class-variance-authority";
6123
6602
  import { ArrowLeftFromLineIcon, ArrowRightFromLineIcon } from "lucide-react";
6124
6603
 
6125
- // src/lib/use-is-mobile.ts
6126
- import { useEffect as useEffect10, useState as useState14 } from "react";
6127
- var MOBILE_BREAKPOINT = 768;
6128
- function useIsMobile({ breakpoint = MOBILE_BREAKPOINT } = {}) {
6129
- const [isMobile, setIsMobile] = useState14(void 0);
6130
- useEffect10(() => {
6131
- const mediaQuery = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
6132
- const onChange = () => {
6133
- setIsMobile(window.innerWidth < breakpoint);
6134
- };
6135
- mediaQuery.addEventListener("change", onChange);
6136
- setIsMobile(window.innerWidth < breakpoint);
6137
- return () => {
6138
- mediaQuery.removeEventListener("change", onChange);
6139
- };
6140
- }, [breakpoint]);
6141
- return !!isMobile;
6142
- }
6143
-
6144
6604
  // src/skeleton/Skeleton.tsx
6145
6605
  import { jsx as jsx92 } from "react/jsx-runtime";
6146
6606
  function Skeleton({ className, ...props }) {
@@ -6229,7 +6689,7 @@ var SIDEBAR_COOKIE_NAME_DEFAULT = "sidebar_state";
6229
6689
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
6230
6690
  var SIDEBAR_WIDTH_MOBILE = "18rem";
6231
6691
  var SIDEBAR_KEYBOARD_SHORTCUT = "b";
6232
- var SidebarProvider = React23.forwardRef(
6692
+ var SidebarProvider = React24.forwardRef(
6233
6693
  ({
6234
6694
  defaultOpen = true,
6235
6695
  open: openProp,
@@ -6241,10 +6701,10 @@ var SidebarProvider = React23.forwardRef(
6241
6701
  ...props
6242
6702
  }, ref) => {
6243
6703
  const isMobile = useIsMobile({ breakpoint: 641 });
6244
- const [openMobile, setOpenMobile] = React23.useState(false);
6245
- const [_open, _setOpen] = React23.useState(defaultOpen);
6704
+ const [openMobile, setOpenMobile] = React24.useState(false);
6705
+ const [_open, _setOpen] = React24.useState(defaultOpen);
6246
6706
  const open = openProp ?? _open;
6247
- const setOpen = React23.useCallback(
6707
+ const setOpen = React24.useCallback(
6248
6708
  (value) => {
6249
6709
  const openState = typeof value === "function" ? value(open) : value;
6250
6710
  if (setOpenProp) {
@@ -6256,10 +6716,10 @@ var SidebarProvider = React23.forwardRef(
6256
6716
  },
6257
6717
  [setOpenProp, open, stateName]
6258
6718
  );
6259
- const toggleSidebar = React23.useCallback(() => {
6719
+ const toggleSidebar = React24.useCallback(() => {
6260
6720
  return isMobile ? setOpenMobile((value) => !value) : setOpen((value) => !value);
6261
6721
  }, [isMobile, setOpen]);
6262
- React23.useEffect(() => {
6722
+ React24.useEffect(() => {
6263
6723
  const handleKeyDown = (event) => {
6264
6724
  if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
6265
6725
  event.preventDefault();
@@ -6270,7 +6730,7 @@ var SidebarProvider = React23.forwardRef(
6270
6730
  return () => window.removeEventListener("keydown", handleKeyDown);
6271
6731
  }, [toggleSidebar]);
6272
6732
  const state = open ? "expanded" : "collapsed";
6273
- const contextValue = React23.useMemo(
6733
+ const contextValue = React24.useMemo(
6274
6734
  () => ({
6275
6735
  state,
6276
6736
  open,
@@ -6295,7 +6755,7 @@ var SidebarProvider = React23.forwardRef(
6295
6755
  }
6296
6756
  );
6297
6757
  SidebarProvider.displayName = "SidebarProvider";
6298
- var Sidebar = React23.forwardRef(
6758
+ var Sidebar = React24.forwardRef(
6299
6759
  ({
6300
6760
  side = "left",
6301
6761
  variant = "sidebar",
@@ -6389,7 +6849,7 @@ var Sidebar = React23.forwardRef(
6389
6849
  }
6390
6850
  );
6391
6851
  Sidebar.displayName = "Sidebar";
6392
- var SidebarTrigger = React23.forwardRef(({ className, onClick, icon, ...props }, ref) => {
6852
+ var SidebarTrigger = React24.forwardRef(({ className, onClick, icon, ...props }, ref) => {
6393
6853
  const { toggleSidebar, open, isMobile, openMobile } = useSidebar();
6394
6854
  return /* @__PURE__ */ jsxs58(
6395
6855
  Button,
@@ -6416,7 +6876,7 @@ var SidebarTrigger = React23.forwardRef(({ className, onClick, icon, ...props },
6416
6876
  );
6417
6877
  });
6418
6878
  SidebarTrigger.displayName = "SidebarTrigger";
6419
- var SidebarRail = React23.forwardRef(
6879
+ var SidebarRail = React24.forwardRef(
6420
6880
  ({ className, ...props }, ref) => {
6421
6881
  const { toggleSidebar } = useSidebar();
6422
6882
  return /* @__PURE__ */ jsx94(
@@ -6442,7 +6902,7 @@ var SidebarRail = React23.forwardRef(
6442
6902
  }
6443
6903
  );
6444
6904
  SidebarRail.displayName = "SidebarRail";
6445
- var SidebarInset = React23.forwardRef(
6905
+ var SidebarInset = React24.forwardRef(
6446
6906
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6447
6907
  "main",
6448
6908
  {
@@ -6457,7 +6917,7 @@ var SidebarInset = React23.forwardRef(
6457
6917
  )
6458
6918
  );
6459
6919
  SidebarInset.displayName = "SidebarInset";
6460
- var SidebarInput = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6920
+ var SidebarInput = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6461
6921
  Input,
6462
6922
  {
6463
6923
  ref,
@@ -6467,7 +6927,7 @@ var SidebarInput = React23.forwardRef(({ className, ...props }, ref) => /* @__PU
6467
6927
  }
6468
6928
  ));
6469
6929
  SidebarInput.displayName = "SidebarInput";
6470
- var SidebarHeader = React23.forwardRef(
6930
+ var SidebarHeader = React24.forwardRef(
6471
6931
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6472
6932
  "div",
6473
6933
  {
@@ -6479,7 +6939,7 @@ var SidebarHeader = React23.forwardRef(
6479
6939
  )
6480
6940
  );
6481
6941
  SidebarHeader.displayName = "SidebarHeader";
6482
- var SidebarFooter = React23.forwardRef(
6942
+ var SidebarFooter = React24.forwardRef(
6483
6943
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6484
6944
  "div",
6485
6945
  {
@@ -6491,7 +6951,7 @@ var SidebarFooter = React23.forwardRef(
6491
6951
  )
6492
6952
  );
6493
6953
  SidebarFooter.displayName = "SidebarFooter";
6494
- var SidebarSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6954
+ var SidebarSeparator = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6495
6955
  Separator3,
6496
6956
  {
6497
6957
  ref,
@@ -6501,7 +6961,7 @@ var SidebarSeparator = React23.forwardRef(({ className, ...props }, ref) => /* @
6501
6961
  }
6502
6962
  ));
6503
6963
  SidebarSeparator.displayName = "SidebarSeparator";
6504
- var SidebarContent = React23.forwardRef(
6964
+ var SidebarContent = React24.forwardRef(
6505
6965
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6506
6966
  "div",
6507
6967
  {
@@ -6516,7 +6976,7 @@ var SidebarContent = React23.forwardRef(
6516
6976
  )
6517
6977
  );
6518
6978
  SidebarContent.displayName = "SidebarContent";
6519
- var SidebarGroup = React23.forwardRef(
6979
+ var SidebarGroup = React24.forwardRef(
6520
6980
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6521
6981
  "div",
6522
6982
  {
@@ -6528,7 +6988,7 @@ var SidebarGroup = React23.forwardRef(
6528
6988
  )
6529
6989
  );
6530
6990
  SidebarGroup.displayName = "SidebarGroup";
6531
- var SidebarGroupLabel = React23.forwardRef(({ className, asChild = false, ...props }, ref) => {
6991
+ var SidebarGroupLabel = React24.forwardRef(({ className, asChild = false, ...props }, ref) => {
6532
6992
  const Comp = asChild ? Slot4 : "div";
6533
6993
  return /* @__PURE__ */ jsx94(
6534
6994
  Comp,
@@ -6545,7 +7005,7 @@ var SidebarGroupLabel = React23.forwardRef(({ className, asChild = false, ...pro
6545
7005
  );
6546
7006
  });
6547
7007
  SidebarGroupLabel.displayName = "SidebarGroupLabel";
6548
- var SidebarGroupAction = React23.forwardRef(({ className, asChild = false, ...props }, ref) => {
7008
+ var SidebarGroupAction = React24.forwardRef(({ className, asChild = false, ...props }, ref) => {
6549
7009
  const Comp = asChild ? Slot4 : "button";
6550
7010
  return /* @__PURE__ */ jsx94(
6551
7011
  Comp,
@@ -6561,7 +7021,7 @@ var SidebarGroupAction = React23.forwardRef(({ className, asChild = false, ...pr
6561
7021
  );
6562
7022
  });
6563
7023
  SidebarGroupAction.displayName = "SidebarGroupAction";
6564
- var SidebarGroupContent = React23.forwardRef(
7024
+ var SidebarGroupContent = React24.forwardRef(
6565
7025
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6566
7026
  "div",
6567
7027
  {
@@ -6573,7 +7033,7 @@ var SidebarGroupContent = React23.forwardRef(
6573
7033
  )
6574
7034
  );
6575
7035
  SidebarGroupContent.displayName = "SidebarGroupContent";
6576
- var SidebarMenu = React23.forwardRef(
7036
+ var SidebarMenu = React24.forwardRef(
6577
7037
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6578
7038
  "ul",
6579
7039
  {
@@ -6585,7 +7045,7 @@ var SidebarMenu = React23.forwardRef(
6585
7045
  )
6586
7046
  );
6587
7047
  SidebarMenu.displayName = "SidebarMenu";
6588
- var SidebarMenuItem = React23.forwardRef(
7048
+ var SidebarMenuItem = React24.forwardRef(
6589
7049
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6590
7050
  "li",
6591
7051
  {
@@ -6617,7 +7077,7 @@ var sidebarMenuButtonVariants = cva11(
6617
7077
  }
6618
7078
  }
6619
7079
  );
6620
- var SidebarMenuButton = React23.forwardRef(
7080
+ var SidebarMenuButton = React24.forwardRef(
6621
7081
  ({
6622
7082
  asChild = false,
6623
7083
  isActive = false,
@@ -6663,7 +7123,7 @@ var SidebarMenuButton = React23.forwardRef(
6663
7123
  }
6664
7124
  );
6665
7125
  SidebarMenuButton.displayName = "SidebarMenuButton";
6666
- var SidebarMenuAction = React23.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
7126
+ var SidebarMenuAction = React24.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
6667
7127
  const Comp = asChild ? Slot4 : "button";
6668
7128
  return /* @__PURE__ */ jsx94(
6669
7129
  Comp,
@@ -6680,7 +7140,7 @@ var SidebarMenuAction = React23.forwardRef(({ className, asChild = false, showOn
6680
7140
  );
6681
7141
  });
6682
7142
  SidebarMenuAction.displayName = "SidebarMenuAction";
6683
- var SidebarMenuBadge = React23.forwardRef(
7143
+ var SidebarMenuBadge = React24.forwardRef(
6684
7144
  ({ className, ...props }, ref) => {
6685
7145
  const { open, isMobile, openMobile } = useSidebar();
6686
7146
  const isOpen = isMobile ? openMobile : open;
@@ -6700,8 +7160,8 @@ var SidebarMenuBadge = React23.forwardRef(
6700
7160
  }
6701
7161
  );
6702
7162
  SidebarMenuBadge.displayName = "SidebarMenuBadge";
6703
- var SidebarMenuSkeleton = React23.forwardRef(({ className, showIcon = false, ...props }, ref) => {
6704
- const width = React23.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
7163
+ var SidebarMenuSkeleton = React24.forwardRef(({ className, showIcon = false, ...props }, ref) => {
7164
+ const width = React24.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
6705
7165
  return /* @__PURE__ */ jsxs58(
6706
7166
  "div",
6707
7167
  {
@@ -6724,7 +7184,7 @@ var SidebarMenuSkeleton = React23.forwardRef(({ className, showIcon = false, ...
6724
7184
  );
6725
7185
  });
6726
7186
  SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
6727
- var SidebarMenuSub = React23.forwardRef(
7187
+ var SidebarMenuSub = React24.forwardRef(
6728
7188
  ({ className, ...props }, ref) => /* @__PURE__ */ jsx94(
6729
7189
  "ul",
6730
7190
  {
@@ -6739,7 +7199,7 @@ var SidebarMenuSub = React23.forwardRef(
6739
7199
  )
6740
7200
  );
6741
7201
  SidebarMenuSub.displayName = "SidebarMenuSub";
6742
- var SidebarMenuSubItem = React23.forwardRef(
7202
+ var SidebarMenuSubItem = React24.forwardRef(
6743
7203
  ({ ...props }, ref) => /* @__PURE__ */ jsx94("li", { ref, ...props })
6744
7204
  );
6745
7205
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
@@ -6763,7 +7223,7 @@ var sidebarMenuSubButtonVariants = cva11(
6763
7223
  }
6764
7224
  }
6765
7225
  );
6766
- var SidebarMenuSubButton = React23.forwardRef(
7226
+ var SidebarMenuSubButton = React24.forwardRef(
6767
7227
  ({
6768
7228
  asChild = false,
6769
7229
  isActive,
@@ -6793,9 +7253,9 @@ var VALUE_PART = 1;
6793
7253
  var getSidebarState = (stateName) => document.cookie.split("; ").find((row) => row.startsWith(`${stateName}=`))?.split("=")[VALUE_PART] === "true";
6794
7254
 
6795
7255
  // src/circular-loader/CircularLoader.tsx
6796
- import React24 from "react";
7256
+ import React25 from "react";
6797
7257
  import { jsx as jsx95, jsxs as jsxs59 } from "react/jsx-runtime";
6798
- var CircularLoader = React24.memo(
7258
+ var CircularLoader = React25.memo(
6799
7259
  ({ visible = true, height, width, position, label, className }) => {
6800
7260
  if (!visible) return null;
6801
7261
  return /* @__PURE__ */ jsxs59(
@@ -7013,7 +7473,7 @@ function SortingAction({
7013
7473
  }
7014
7474
 
7015
7475
  // src/status-button/StatusButton.tsx
7016
- import { useMemo as useMemo3 } from "react";
7476
+ import { useMemo as useMemo4 } from "react";
7017
7477
  import { useTranslation as useTranslation20 } from "react-i18next";
7018
7478
  import { AlertCircle as AlertCircle2, CheckCircle, Loader2 as Loader24 } from "lucide-react";
7019
7479
  import { jsx as jsx98, jsxs as jsxs62 } from "react/jsx-runtime";
@@ -7031,7 +7491,7 @@ function StatusButton({
7031
7491
  ...props
7032
7492
  }) {
7033
7493
  const { t } = useTranslation20();
7034
- const configMap = useMemo3(() => {
7494
+ const configMap = useMemo4(() => {
7035
7495
  const defaultLoadingConfig = {
7036
7496
  text: loadingText ?? `${t("saving")}...`,
7037
7497
  icon: /* @__PURE__ */ jsx98(Loader24, { className: "h-4 w-4 animate-spin" }),
@@ -7185,9 +7645,9 @@ SwitchBlocksInternal.displayName = "SwitchBlocks";
7185
7645
  var SwitchBlocks = memo6(SwitchBlocksInternal);
7186
7646
 
7187
7647
  // src/switch-group/SwitchGroup.tsx
7188
- import * as React25 from "react";
7648
+ import * as React26 from "react";
7189
7649
  import { jsx as jsx102, jsxs as jsxs64 } from "react/jsx-runtime";
7190
- var SwitchGroup = React25.forwardRef(
7650
+ var SwitchGroup = React26.forwardRef(
7191
7651
  ({ options, value = [], onChange, disabled = false, className, error, ...props }, ref) => {
7192
7652
  const handleOptionChange = (optionValue, checked) => {
7193
7653
  if (!onChange) return;
@@ -7433,11 +7893,11 @@ var TASK_VARIANTS = {
7433
7893
  import { Toaster, toast as toast2 } from "sonner";
7434
7894
 
7435
7895
  // src/toaster/useUpdateToast.ts
7436
- import { useCallback as useCallback9, useRef as useRef9 } from "react";
7896
+ import { useCallback as useCallback16, useRef as useRef14 } from "react";
7437
7897
  import { toast } from "sonner";
7438
7898
  function useUpdateToast({ id }) {
7439
- const toastIdRef = useRef9("");
7440
- const getToastOptions = useCallback9(
7899
+ const toastIdRef = useRef14("");
7900
+ const getToastOptions = useCallback16(
7441
7901
  (options) => ({
7442
7902
  id: toastIdRef.current,
7443
7903
  dismissible: false,
@@ -7469,7 +7929,7 @@ function useUpdateToast({ id }) {
7469
7929
  }
7470
7930
 
7471
7931
  // src/toggle-group/ToggleGroup.tsx
7472
- import * as React26 from "react";
7932
+ import * as React27 from "react";
7473
7933
  import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
7474
7934
 
7475
7935
  // src/toggle-group/style.ts
@@ -7503,12 +7963,12 @@ var toggleVariants = cva13(
7503
7963
 
7504
7964
  // src/toggle-group/ToggleGroup.tsx
7505
7965
  import { jsx as jsx107, jsxs as jsxs68 } from "react/jsx-runtime";
7506
- var ToggleGroupContext = React26.createContext({
7966
+ var ToggleGroupContext = React27.createContext({
7507
7967
  size: "default",
7508
7968
  variant: "default",
7509
7969
  theme: "default"
7510
7970
  });
7511
- var ToggleGroup = React26.forwardRef(({ className, variant, size, theme, children, ...props }, ref) => {
7971
+ var ToggleGroup = React27.forwardRef(({ className, variant, size, theme, children, ...props }, ref) => {
7512
7972
  const isTabVariant = variant === "tab";
7513
7973
  return /* @__PURE__ */ jsx107(
7514
7974
  ToggleGroupPrimitive.Root,
@@ -7525,8 +7985,8 @@ var ToggleGroup = React26.forwardRef(({ className, variant, size, theme, childre
7525
7985
  );
7526
7986
  });
7527
7987
  ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
7528
- var ToggleGroupItem = React26.forwardRef(({ className, children, variant, size, theme, ...props }, ref) => {
7529
- const context = React26.useContext(ToggleGroupContext);
7988
+ var ToggleGroupItem = React27.forwardRef(({ className, children, variant, size, theme, ...props }, ref) => {
7989
+ const context = React27.useContext(ToggleGroupContext);
7530
7990
  const resolvedVariant = context.variant || variant;
7531
7991
  const isTabVariant = resolvedVariant === "tab";
7532
7992
  return /* @__PURE__ */ jsx107(
@@ -7552,7 +8012,7 @@ var ToggleGroupItem = React26.forwardRef(({ className, children, variant, size,
7552
8012
  ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
7553
8013
 
7554
8014
  // src/toggle-group/Toggles.tsx
7555
- import { forwardRef as forwardRef40, useEffect as useEffect12 } from "react";
8015
+ import { forwardRef as forwardRef40, useEffect as useEffect20 } from "react";
7556
8016
  import { jsx as jsx108, jsxs as jsxs69 } from "react/jsx-runtime";
7557
8017
  var getValueArray2 = (value) => {
7558
8018
  if (value) {
@@ -7627,7 +8087,7 @@ function TogglesInternal({
7627
8087
  }
7628
8088
  };
7629
8089
  const isAnyActive = getValueArray2(value).length > 0;
7630
- useEffect12(() => {
8090
+ useEffect20(() => {
7631
8091
  onAnySelectorActive?.(isAnyActive);
7632
8092
  }, [isAnyActive, onAnySelectorActive]);
7633
8093
  const currentValue = getValueArray2(value).map((item) => String(item));
@@ -7661,7 +8121,7 @@ function TogglesInternal({
7661
8121
  var Toggles = forwardRef40(TogglesInternal);
7662
8122
 
7663
8123
  // src/text-field/TextField.tsx
7664
- import * as React27 from "react";
8124
+ import * as React28 from "react";
7665
8125
  import * as LabelPrimitive2 from "@radix-ui/react-label";
7666
8126
  import { cva as cva14 } from "class-variance-authority";
7667
8127
  import { useTranslation as useTranslation21 } from "react-i18next";
@@ -7755,7 +8215,7 @@ var floatingLabelClasses = [
7755
8215
  "peer-focus:to-[var(--text-field-bg-filled)]",
7756
8216
  "peer-focus:to-50%"
7757
8217
  ];
7758
- var TextField = React27.forwardRef(
8218
+ var TextField = React28.forwardRef(
7759
8219
  ({
7760
8220
  className,
7761
8221
  wrapperClassName,
@@ -7774,7 +8234,7 @@ var TextField = React27.forwardRef(
7774
8234
  }, ref) => {
7775
8235
  const { t } = useTranslation21();
7776
8236
  const hasError = Boolean(error);
7777
- const autoId = React27.useId();
8237
+ const autoId = React28.useId();
7778
8238
  const inputId = props.id || autoId;
7779
8239
  const inputClasses = cn(
7780
8240
  inputVariants({ variant, error: hasError, readOnly: Boolean(readOnly) }),
@@ -8007,11 +8467,11 @@ function WideButton({ className, disabled, ...props }) {
8007
8467
  }
8008
8468
 
8009
8469
  // src/datepicker/DatePicker.tsx
8010
- import * as React31 from "react";
8470
+ import * as React32 from "react";
8011
8471
  import { Calendar as Calendar2 } from "lucide-react";
8012
8472
 
8013
8473
  // src/drawer/Drawer.tsx
8014
- import * as React28 from "react";
8474
+ import * as React29 from "react";
8015
8475
  import * as DialogPrimitive2 from "@radix-ui/react-dialog";
8016
8476
  import Draggable from "react-draggable";
8017
8477
  import { jsx as jsx117, jsxs as jsxs74 } from "react/jsx-runtime";
@@ -8029,7 +8489,7 @@ function DrawerPortal({ ...props }) {
8029
8489
  function DrawerClose({ ...props }) {
8030
8490
  return /* @__PURE__ */ jsx117(DialogPrimitive2.Close, { "data-slot": "drawer-close", ...props });
8031
8491
  }
8032
- var DrawerOverlay = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx117(
8492
+ var DrawerOverlay = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx117(
8033
8493
  DialogPrimitive2.Overlay,
8034
8494
  {
8035
8495
  ref,
@@ -8043,7 +8503,7 @@ var DrawerOverlay = React28.forwardRef(({ className, ...props }, ref) => /* @__P
8043
8503
  ));
8044
8504
  DrawerOverlay.displayName = DialogPrimitive2.Overlay.displayName;
8045
8505
  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";
8046
- var DrawerContent = React28.forwardRef(
8506
+ var DrawerContent = React29.forwardRef(
8047
8507
  ({
8048
8508
  className,
8049
8509
  children,
@@ -8055,19 +8515,19 @@ var DrawerContent = React28.forwardRef(
8055
8515
  ...props
8056
8516
  }, ref) => {
8057
8517
  const finalContainer = container || getCustomContainer() || void 0;
8058
- const nodeRef = React28.useRef(null);
8059
- const [dragOffsetY, setDragOffsetY] = React28.useState(0);
8518
+ const nodeRef = React29.useRef(null);
8519
+ const [dragOffsetY, setDragOffsetY] = React29.useState(0);
8060
8520
  const overlayOpacity = Math.max(
8061
8521
  DRAWER_MIN_OVERLAY_OPACITY,
8062
8522
  1 - dragOffsetY / (DRAWER_CLOSE_THRESHOLD * 2)
8063
8523
  );
8064
- const handleDrag = React28.useCallback(
8524
+ const handleDrag = React29.useCallback(
8065
8525
  (_event, data) => {
8066
8526
  setDragOffsetY(Math.max(0, data.y));
8067
8527
  },
8068
8528
  []
8069
8529
  );
8070
- const handleStop = React28.useCallback(
8530
+ const handleStop = React29.useCallback(
8071
8531
  (_event, data) => {
8072
8532
  if (data.y > DRAWER_CLOSE_THRESHOLD) {
8073
8533
  setDragOffsetY(0);
@@ -8158,7 +8618,7 @@ var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx117(
8158
8618
  DrawerHeader.displayName = "DrawerHeader";
8159
8619
  var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx117("div", { className: cn("flex flex-col gap-2 p-5", className), ...props });
8160
8620
  DrawerFooter.displayName = "DrawerFooter";
8161
- var DrawerTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx117(
8621
+ var DrawerTitle = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx117(
8162
8622
  DialogPrimitive2.Title,
8163
8623
  {
8164
8624
  ref,
@@ -8168,7 +8628,7 @@ var DrawerTitle = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
8168
8628
  }
8169
8629
  ));
8170
8630
  DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
8171
- var DrawerDescription = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx117(
8631
+ var DrawerDescription = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx117(
8172
8632
  DialogPrimitive2.Description,
8173
8633
  {
8174
8634
  ref,
@@ -8180,7 +8640,7 @@ var DrawerDescription = React28.forwardRef(({ className, ...props }, ref) => /*
8180
8640
  DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
8181
8641
 
8182
8642
  // src/datepicker/useDatePickerWheel.ts
8183
- import * as React29 from "react";
8643
+ import * as React30 from "react";
8184
8644
 
8185
8645
  // src/datepicker/datePicker.utils.ts
8186
8646
  var DISPLAY_PAD_LENGTH = 2;
@@ -8331,21 +8791,21 @@ function useDatePickerWheel({
8331
8791
  minDate,
8332
8792
  maxDate
8333
8793
  }) {
8334
- const years = React29.useMemo(() => getYearRange(minDate, maxDate), [maxDate, minDate]);
8335
- const [draftDate, setDraftDate] = React29.useState(
8794
+ const years = React30.useMemo(() => getYearRange(minDate, maxDate), [maxDate, minDate]);
8795
+ const [draftDate, setDraftDate] = React30.useState(
8336
8796
  () => resolveInitialDate({ value, defaultValue, minDate, maxDate })
8337
8797
  );
8338
8798
  const draftYear = draftDate.getFullYear();
8339
8799
  const draftMonth = draftDate.getMonth();
8340
- const [monthScrollTop, setMonthScrollTop] = React29.useState(0);
8341
- const [dayScrollTop, setDayScrollTop] = React29.useState(0);
8342
- const [yearScrollTop, setYearScrollTop] = React29.useState(0);
8343
- const monthListRef = React29.useRef(null);
8344
- const dayListRef = React29.useRef(null);
8345
- const yearListRef = React29.useRef(null);
8346
- const settleTimeoutsRef = React29.useRef({});
8347
- const animationFramesRef = React29.useRef({});
8348
- const columnRefs = React29.useMemo(
8800
+ const [monthScrollTop, setMonthScrollTop] = React30.useState(0);
8801
+ const [dayScrollTop, setDayScrollTop] = React30.useState(0);
8802
+ const [yearScrollTop, setYearScrollTop] = React30.useState(0);
8803
+ const monthListRef = React30.useRef(null);
8804
+ const dayListRef = React30.useRef(null);
8805
+ const yearListRef = React30.useRef(null);
8806
+ const settleTimeoutsRef = React30.useRef({});
8807
+ const animationFramesRef = React30.useRef({});
8808
+ const columnRefs = React30.useMemo(
8349
8809
  () => ({
8350
8810
  month: monthListRef,
8351
8811
  day: dayListRef,
@@ -8353,7 +8813,7 @@ function useDatePickerWheel({
8353
8813
  }),
8354
8814
  []
8355
8815
  );
8356
- const setColumnScrollTop = React29.useCallback(
8816
+ const setColumnScrollTop = React30.useCallback(
8357
8817
  (column, nextScrollTop) => {
8358
8818
  if (column === "month") {
8359
8819
  setMonthScrollTop(nextScrollTop);
@@ -8367,19 +8827,19 @@ function useDatePickerWheel({
8367
8827
  },
8368
8828
  []
8369
8829
  );
8370
- const clearSettleTimeout = React29.useCallback((column) => {
8830
+ const clearSettleTimeout = React30.useCallback((column) => {
8371
8831
  const timeoutId = settleTimeoutsRef.current[column];
8372
8832
  if (timeoutId === void 0) return;
8373
8833
  window.clearTimeout(timeoutId);
8374
8834
  delete settleTimeoutsRef.current[column];
8375
8835
  }, []);
8376
- const clearAnimationFrame = React29.useCallback((column) => {
8836
+ const clearAnimationFrame = React30.useCallback((column) => {
8377
8837
  const frameId = animationFramesRef.current[column];
8378
8838
  if (frameId === void 0) return;
8379
8839
  window.cancelAnimationFrame(frameId);
8380
8840
  delete animationFramesRef.current[column];
8381
8841
  }, []);
8382
- React29.useEffect(
8842
+ React30.useEffect(
8383
8843
  () => () => {
8384
8844
  ["month", "day", "year"].forEach((column) => {
8385
8845
  clearSettleTimeout(column);
@@ -8388,22 +8848,22 @@ function useDatePickerWheel({
8388
8848
  },
8389
8849
  [clearAnimationFrame, clearSettleTimeout]
8390
8850
  );
8391
- React29.useEffect(() => {
8851
+ React30.useEffect(() => {
8392
8852
  if (isOpen) return;
8393
8853
  setDraftDate(resolveInitialDate({ value, defaultValue, minDate, maxDate }));
8394
8854
  }, [defaultValue, isOpen, maxDate, minDate, value]);
8395
- const months = React29.useMemo(
8855
+ const months = React30.useMemo(
8396
8856
  () => getAllowedMonths(draftYear, minDate, maxDate),
8397
8857
  [draftYear, maxDate, minDate]
8398
8858
  );
8399
- const days = React29.useMemo(
8859
+ const days = React30.useMemo(
8400
8860
  () => getAllowedDays(draftYear, draftMonth, minDate, maxDate),
8401
8861
  [draftMonth, draftYear, maxDate, minDate]
8402
8862
  );
8403
8863
  const monthIndex = months.findIndex((month) => month === draftMonth);
8404
8864
  const dayIndex = days.findIndex((day) => day === draftDate.getDate());
8405
8865
  const yearIndex = years.findIndex((year) => year === draftYear);
8406
- const syncScrollPositions = React29.useCallback(
8866
+ const syncScrollPositions = React30.useCallback(
8407
8867
  (nextDate, behavior = "auto") => {
8408
8868
  const nextMonths = getAllowedMonths(nextDate.getFullYear(), minDate, maxDate);
8409
8869
  const nextMonthIndex = nextMonths.findIndex((month) => month === nextDate.getMonth());
@@ -8427,7 +8887,7 @@ function useDatePickerWheel({
8427
8887
  },
8428
8888
  [maxDate, minDate, years]
8429
8889
  );
8430
- React29.useLayoutEffect(() => {
8890
+ React30.useLayoutEffect(() => {
8431
8891
  if (!isOpen) return;
8432
8892
  const nextDate = resolveInitialDate({ value, defaultValue, minDate, maxDate });
8433
8893
  setDraftDate(nextDate);
@@ -8438,7 +8898,7 @@ function useDatePickerWheel({
8438
8898
  window.cancelAnimationFrame(frameId);
8439
8899
  };
8440
8900
  }, [defaultValue, isOpen, maxDate, minDate, syncScrollPositions, value]);
8441
- const updateDraftDate = React29.useCallback(
8901
+ const updateDraftDate = React30.useCallback(
8442
8902
  (column, targetIndex, behavior = "smooth") => {
8443
8903
  const currentDate = stripTime(draftDate);
8444
8904
  const currentYear = currentDate.getFullYear();
@@ -8483,7 +8943,7 @@ function useDatePickerWheel({
8483
8943
  },
8484
8944
  [days, draftDate, maxDate, minDate, months, syncScrollPositions, years]
8485
8945
  );
8486
- const settleColumnScroll = React29.useCallback(
8946
+ const settleColumnScroll = React30.useCallback(
8487
8947
  (column) => {
8488
8948
  const list = columnRefs[column].current;
8489
8949
  if (!list) return;
@@ -8496,7 +8956,7 @@ function useDatePickerWheel({
8496
8956
  },
8497
8957
  [columnRefs, days.length, months.length, updateDraftDate, years.length]
8498
8958
  );
8499
- const scheduleScrollSettle = React29.useCallback(
8959
+ const scheduleScrollSettle = React30.useCallback(
8500
8960
  (column) => {
8501
8961
  clearSettleTimeout(column);
8502
8962
  settleTimeoutsRef.current[column] = window.setTimeout(() => {
@@ -8505,7 +8965,7 @@ function useDatePickerWheel({
8505
8965
  },
8506
8966
  [clearSettleTimeout, settleColumnScroll]
8507
8967
  );
8508
- const handleColumnScroll = React29.useCallback(
8968
+ const handleColumnScroll = React30.useCallback(
8509
8969
  (column) => {
8510
8970
  const list = columnRefs[column].current;
8511
8971
  if (!list) return;
@@ -8519,13 +8979,13 @@ function useDatePickerWheel({
8519
8979
  },
8520
8980
  [clearAnimationFrame, columnRefs, scheduleScrollSettle, setColumnScrollTop]
8521
8981
  );
8522
- const handleOptionSelect = React29.useCallback(
8982
+ const handleOptionSelect = React30.useCallback(
8523
8983
  (column, targetIndex) => {
8524
8984
  updateDraftDate(column, targetIndex, "smooth");
8525
8985
  },
8526
8986
  [updateDraftDate]
8527
8987
  );
8528
- const focusAdjacentColumn = React29.useCallback(
8988
+ const focusAdjacentColumn = React30.useCallback(
8529
8989
  (column, direction) => {
8530
8990
  const order = ["month", "day", "year"];
8531
8991
  const currentIndex = order.indexOf(column);
@@ -8535,7 +8995,7 @@ function useDatePickerWheel({
8535
8995
  },
8536
8996
  [columnRefs]
8537
8997
  );
8538
- const handleColumnKeyDown = React29.useCallback(
8998
+ const handleColumnKeyDown = React30.useCallback(
8539
8999
  (column, event) => {
8540
9000
  const currentIndex = column === "month" ? monthIndex : column === "day" ? dayIndex : yearIndex;
8541
9001
  const maxIndex = column === "month" ? months.length - 1 : column === "day" ? days.length - 1 : years.length - 1;
@@ -8823,28 +9283,6 @@ function DatePickerContent({
8823
9283
  ) });
8824
9284
  }
8825
9285
 
8826
- // src/lib/use-screen-resize.ts
8827
- import { useCallback as useCallback12, useLayoutEffect as useLayoutEffect2, useState as useState18 } from "react";
8828
- var eventName = "resize";
8829
- function useScreenResize(maxWidth) {
8830
- const [isInitialized, setIsInitialized] = useState18(false);
8831
- const [isMatch, setIsMatch] = useState18(false);
8832
- const handleResizeEvent = useCallback12(() => {
8833
- const adjustedMaxWidth = `${parseInt(maxWidth, 10) - 1}px`;
8834
- const media = getWindow().matchMedia(`(max-width: ${adjustedMaxWidth})`);
8835
- setIsInitialized(true);
8836
- setIsMatch(!!media?.matches);
8837
- }, [maxWidth]);
8838
- useLayoutEffect2(() => {
8839
- handleResizeEvent();
8840
- getWindow().addEventListener(eventName, handleResizeEvent);
8841
- return () => {
8842
- getWindow().removeEventListener(eventName, handleResizeEvent);
8843
- };
8844
- }, [handleResizeEvent]);
8845
- return { isMatch, isInitialized };
8846
- }
8847
-
8848
9286
  // src/lib/device.ts
8849
9287
  var DEVICE = {
8850
9288
  mobileS: "320px",
@@ -8861,7 +9299,7 @@ var DEVICE = {
8861
9299
  };
8862
9300
 
8863
9301
  // src/field-trigger/FieldTrigger.tsx
8864
- import * as React30 from "react";
9302
+ import * as React31 from "react";
8865
9303
  import { Loader2 as Loader25 } from "lucide-react";
8866
9304
  import { useTranslation as useTranslation22 } from "react-i18next";
8867
9305
 
@@ -8905,7 +9343,7 @@ function FieldErrorMessage({
8905
9343
 
8906
9344
  // src/field-trigger/FieldTrigger.tsx
8907
9345
  import { Fragment as Fragment10, jsx as jsx121, jsxs as jsxs78 } from "react/jsx-runtime";
8908
- var FieldTrigger = React30.forwardRef(
9346
+ var FieldTrigger = React31.forwardRef(
8909
9347
  ({
8910
9348
  as = "button",
8911
9349
  variant = "airbnb",
@@ -9072,7 +9510,7 @@ FieldTrigger.displayName = "FieldTrigger";
9072
9510
  // src/datepicker/DatePicker.tsx
9073
9511
  import { jsx as jsx122, jsxs as jsxs79 } from "react/jsx-runtime";
9074
9512
  var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
9075
- var DatePicker = React31.forwardRef(
9513
+ var DatePicker = React32.forwardRef(
9076
9514
  ({
9077
9515
  variant = "default",
9078
9516
  label,
@@ -9098,24 +9536,24 @@ var DatePicker = React31.forwardRef(
9098
9536
  formatValue = formatDateValue
9099
9537
  }, ref) => {
9100
9538
  const { isMatch: isMobile } = useScreenResize(DEVICE.mobileXL);
9101
- const [isOpen, setIsOpen] = React31.useState(false);
9102
- const triggerId = React31.useId();
9103
- const pickerId = React31.useId();
9104
- const labelId = React31.useId();
9105
- const valueId = React31.useId();
9106
- const helperTextId = React31.useId();
9107
- const errorId = React31.useId();
9108
- const internalRef = React31.useRef(null);
9539
+ const [isOpen, setIsOpen] = React32.useState(false);
9540
+ const triggerId = React32.useId();
9541
+ const pickerId = React32.useId();
9542
+ const labelId = React32.useId();
9543
+ const valueId = React32.useId();
9544
+ const helperTextId = React32.useId();
9545
+ const errorId = React32.useId();
9546
+ const internalRef = React32.useRef(null);
9109
9547
  const combinedRef = useCombinedRef(ref, internalRef);
9110
- const monthLabels = React31.useMemo(() => getMonthLabels(locale), [locale]);
9111
- const resolvedMinDate = React31.useMemo(() => minDate ?? DEFAULT_MIN_DATE, [minDate]);
9112
- const resolvedMaxDate = React31.useMemo(() => maxDate ?? /* @__PURE__ */ new Date(), [maxDate]);
9113
- const normalizedValue = React31.useMemo(() => normalizeDateValue(value), [value]);
9114
- const normalizedDefaultValue = React31.useMemo(
9548
+ const monthLabels = React32.useMemo(() => getMonthLabels(locale), [locale]);
9549
+ const resolvedMinDate = React32.useMemo(() => minDate ?? DEFAULT_MIN_DATE, [minDate]);
9550
+ const resolvedMaxDate = React32.useMemo(() => maxDate ?? /* @__PURE__ */ new Date(), [maxDate]);
9551
+ const normalizedValue = React32.useMemo(() => normalizeDateValue(value), [value]);
9552
+ const normalizedDefaultValue = React32.useMemo(
9115
9553
  () => normalizeDateValue(defaultValue),
9116
9554
  [defaultValue]
9117
9555
  );
9118
- const resolvedValue = React31.useMemo(
9556
+ const resolvedValue = React32.useMemo(
9119
9557
  () => normalizedValue ? clampDate(normalizedValue, resolvedMinDate, resolvedMaxDate) : null,
9120
9558
  [normalizedValue, resolvedMaxDate, resolvedMinDate]
9121
9559
  );
@@ -9146,7 +9584,7 @@ var DatePicker = React31.forwardRef(
9146
9584
  minDate: resolvedMinDate,
9147
9585
  maxDate: resolvedMaxDate
9148
9586
  });
9149
- const handleOpenChange = React31.useCallback(
9587
+ const handleOpenChange = React32.useCallback(
9150
9588
  (nextOpen) => {
9151
9589
  if (isBlocked && nextOpen) return;
9152
9590
  setIsOpen(nextOpen);
@@ -9156,7 +9594,7 @@ var DatePicker = React31.forwardRef(
9156
9594
  },
9157
9595
  [isBlocked]
9158
9596
  );
9159
- const handleDone = React31.useCallback(() => {
9597
+ const handleDone = React32.useCallback(() => {
9160
9598
  if (isBlocked) return;
9161
9599
  onChange(clampDate(draftDate, resolvedMinDate, resolvedMaxDate));
9162
9600
  handleOpenChange(false);
@@ -9168,11 +9606,11 @@ var DatePicker = React31.forwardRef(
9168
9606
  resolvedMaxDate,
9169
9607
  resolvedMinDate
9170
9608
  ]);
9171
- const handleTriggerClick = React31.useCallback(() => {
9609
+ const handleTriggerClick = React32.useCallback(() => {
9172
9610
  if (isBlocked) return;
9173
9611
  setIsOpen(true);
9174
9612
  }, [isBlocked]);
9175
- const handleTriggerKeyDown = React31.useCallback(
9613
+ const handleTriggerKeyDown = React32.useCallback(
9176
9614
  (event) => {
9177
9615
  if (isBlocked) return;
9178
9616
  if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
@@ -9182,7 +9620,7 @@ var DatePicker = React31.forwardRef(
9182
9620
  },
9183
9621
  [isBlocked]
9184
9622
  );
9185
- React31.useEffect(() => {
9623
+ React32.useEffect(() => {
9186
9624
  if (isBlocked) {
9187
9625
  setIsOpen(false);
9188
9626
  }
@@ -9364,10 +9802,10 @@ function ResponsiveSheet({
9364
9802
  }
9365
9803
 
9366
9804
  // src/airbnb/input/Input.tsx
9367
- import * as React32 from "react";
9805
+ import * as React33 from "react";
9368
9806
  import { jsx as jsx124 } from "react/jsx-runtime";
9369
9807
  var getInputValue = (value) => value != null ? String(value) : "";
9370
- var AirbnbInput = React32.forwardRef(
9808
+ var AirbnbInput = React33.forwardRef(
9371
9809
  ({
9372
9810
  variant = "default",
9373
9811
  label,
@@ -9396,15 +9834,15 @@ var AirbnbInput = React32.forwardRef(
9396
9834
  placeholder,
9397
9835
  ...props
9398
9836
  }, ref) => {
9399
- const generatedId = React32.useId();
9400
- const inputRef = React32.useRef(null);
9837
+ const generatedId = React33.useId();
9838
+ const inputRef = React33.useRef(null);
9401
9839
  const inputId = id ?? generatedId;
9402
9840
  const fieldId = `${inputId}-field`;
9403
9841
  const labelId = `${inputId}-label`;
9404
9842
  const errorId = `${inputId}-error`;
9405
9843
  const accessibleLabel = placeholder ?? label;
9406
- const [isFocused, setIsFocused] = React32.useState(false);
9407
- const [currentValue, setCurrentValue] = React32.useState(
9844
+ const [isFocused, setIsFocused] = React33.useState(false);
9845
+ const [currentValue, setCurrentValue] = React33.useState(
9408
9846
  () => value != null ? getInputValue(value) : getInputValue(defaultValue)
9409
9847
  );
9410
9848
  const resolvedValue = value != null ? getInputValue(value) : currentValue;
@@ -9414,11 +9852,11 @@ var AirbnbInput = React32.forwardRef(
9414
9852
  const triggerError = error ?? invalid;
9415
9853
  const hasLabelMeta = Boolean(optional) || Boolean(tooltip);
9416
9854
  const isBlocked = Boolean(disabled) || Boolean(loading);
9417
- React32.useLayoutEffect(() => {
9855
+ React33.useLayoutEffect(() => {
9418
9856
  const nextValue = value != null ? getInputValue(value) : getInputValue(inputRef.current?.value);
9419
9857
  setCurrentValue((prevValue) => prevValue === nextValue ? prevValue : nextValue);
9420
9858
  }, [value]);
9421
- const setRefs = React32.useCallback(
9859
+ const setRefs = React33.useCallback(
9422
9860
  (node) => {
9423
9861
  inputRef.current = node;
9424
9862
  if (node && value == null) {
@@ -9516,11 +9954,11 @@ var AirbnbInput = React32.forwardRef(
9516
9954
  AirbnbInput.displayName = "Input";
9517
9955
 
9518
9956
  // src/airbnb/phone-field/PhoneField.tsx
9519
- import * as React38 from "react";
9957
+ import * as React39 from "react";
9520
9958
  import { ChevronDown as ChevronDown2 } from "lucide-react";
9521
9959
 
9522
9960
  // src/airbnb/select/Select.tsx
9523
- import * as React37 from "react";
9961
+ import * as React38 from "react";
9524
9962
 
9525
9963
  // src/airbnb/select/SelectDesktopMenu.tsx
9526
9964
  import { jsx as jsx125, jsxs as jsxs81 } from "react/jsx-runtime";
@@ -9865,10 +10303,10 @@ function SelectMobileContent({
9865
10303
  }
9866
10304
 
9867
10305
  // src/airbnb/select/SelectTrigger.tsx
9868
- import * as React33 from "react";
10306
+ import * as React34 from "react";
9869
10307
  import { ChevronDown } from "lucide-react";
9870
10308
  import { jsx as jsx129 } from "react/jsx-runtime";
9871
- var SelectTrigger2 = React33.forwardRef(
10309
+ var SelectTrigger2 = React34.forwardRef(
9872
10310
  ({
9873
10311
  id,
9874
10312
  open,
@@ -9935,7 +10373,7 @@ var SelectTrigger2 = React33.forwardRef(
9935
10373
  SelectTrigger2.displayName = "SelectTrigger";
9936
10374
 
9937
10375
  // src/airbnb/select/useDesktopSelect.ts
9938
- import * as React34 from "react";
10376
+ import * as React35 from "react";
9939
10377
  function useDesktopSelect({
9940
10378
  isMobile,
9941
10379
  isOpen,
@@ -9944,12 +10382,12 @@ function useDesktopSelect({
9944
10382
  disabled,
9945
10383
  onChange
9946
10384
  }) {
9947
- const [highlightedIndex, setHighlightedIndex] = React34.useState(-1);
9948
- const triggerRef = React34.useRef(null);
9949
- const listRef = React34.useRef(null);
9950
- const optionRefs = React34.useRef([]);
10385
+ const [highlightedIndex, setHighlightedIndex] = React35.useState(-1);
10386
+ const triggerRef = React35.useRef(null);
10387
+ const listRef = React35.useRef(null);
10388
+ const optionRefs = React35.useRef([]);
9951
10389
  const selectedIndex = getOptionIndex(options, value);
9952
- React34.useEffect(() => {
10390
+ React35.useEffect(() => {
9953
10391
  if (!isOpen || isMobile) return;
9954
10392
  setHighlightedIndex((currentIndex) => {
9955
10393
  if (currentIndex >= 0) {
@@ -9964,34 +10402,34 @@ function useDesktopSelect({
9964
10402
  window.cancelAnimationFrame(frameId);
9965
10403
  };
9966
10404
  }, [isMobile, isOpen, options, selectedIndex]);
9967
- React34.useEffect(() => {
10405
+ React35.useEffect(() => {
9968
10406
  if (!isOpen || isMobile || highlightedIndex < 0) return;
9969
10407
  optionRefs.current[highlightedIndex]?.scrollIntoView({
9970
10408
  block: "nearest"
9971
10409
  });
9972
10410
  }, [highlightedIndex, isMobile, isOpen]);
9973
- React34.useEffect(() => {
10411
+ React35.useEffect(() => {
9974
10412
  if (isOpen) return;
9975
10413
  setHighlightedIndex(-1);
9976
10414
  }, [isOpen]);
9977
- const focusTrigger = React34.useCallback(() => {
10415
+ const focusTrigger = React35.useCallback(() => {
9978
10416
  triggerRef.current?.focus();
9979
10417
  }, []);
9980
- const handleSelect = React34.useCallback(
10418
+ const handleSelect = React35.useCallback(
9981
10419
  (option) => {
9982
10420
  if (option.isDisabled || disabled) return;
9983
10421
  onChange(option);
9984
10422
  },
9985
10423
  [disabled, onChange]
9986
10424
  );
9987
- const openMenu = React34.useCallback(
10425
+ const openMenu = React35.useCallback(
9988
10426
  (targetIndex) => {
9989
10427
  const fallbackIndex = selectedIndex >= 0 ? selectedIndex : getFirstEnabledOptionIndex(options);
9990
10428
  setHighlightedIndex(targetIndex ?? fallbackIndex);
9991
10429
  },
9992
10430
  [options, selectedIndex]
9993
10431
  );
9994
- const handleTriggerKeyDown = React34.useCallback(
10432
+ const handleTriggerKeyDown = React35.useCallback(
9995
10433
  (event, onOpen) => {
9996
10434
  if (disabled) return;
9997
10435
  if (event.key === "ArrowDown") {
@@ -10016,7 +10454,7 @@ function useDesktopSelect({
10016
10454
  },
10017
10455
  [disabled, openMenu, options, selectedIndex]
10018
10456
  );
10019
- const handleMenuKeyDown = React34.useCallback(
10457
+ const handleMenuKeyDown = React35.useCallback(
10020
10458
  (event, onClose) => {
10021
10459
  if (event.key === "Escape") {
10022
10460
  event.preventDefault();
@@ -10066,7 +10504,7 @@ function useDesktopSelect({
10066
10504
  },
10067
10505
  [focusTrigger, highlightedIndex, onChange, options]
10068
10506
  );
10069
- const setOptionRef = React34.useCallback(
10507
+ const setOptionRef = React35.useCallback(
10070
10508
  (index, node) => {
10071
10509
  optionRefs.current[index] = node;
10072
10510
  },
@@ -10086,23 +10524,23 @@ function useDesktopSelect({
10086
10524
  }
10087
10525
 
10088
10526
  // src/airbnb/select/useMobileSelectWheel.ts
10089
- import * as React35 from "react";
10527
+ import * as React36 from "react";
10090
10528
  function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10091
- const [pendingValue, setPendingValue] = React35.useState(
10529
+ const [pendingValue, setPendingValue] = React36.useState(
10092
10530
  value ?? null
10093
10531
  );
10094
- const [mobileScrollTop, setMobileScrollTop] = React35.useState(0);
10095
- const mobileListRef = React35.useRef(null);
10096
- const scrollSettleTimeoutRef = React35.useRef(null);
10097
- const scrollAnimationFrameRef = React35.useRef(null);
10098
- const getTargetIndex = React35.useCallback(
10532
+ const [mobileScrollTop, setMobileScrollTop] = React36.useState(0);
10533
+ const mobileListRef = React36.useRef(null);
10534
+ const scrollSettleTimeoutRef = React36.useRef(null);
10535
+ const scrollAnimationFrameRef = React36.useRef(null);
10536
+ const getTargetIndex = React36.useCallback(
10099
10537
  (targetValue) => {
10100
10538
  const selectedIndex = getOptionIndex(options, targetValue);
10101
10539
  return selectedIndex >= 0 ? selectedIndex : getFirstEnabledOptionIndex(options);
10102
10540
  },
10103
10541
  [options]
10104
10542
  );
10105
- const syncScrollPosition = React35.useCallback(
10543
+ const syncScrollPosition = React36.useCallback(
10106
10544
  (targetValue, behavior = "instant") => {
10107
10545
  const targetIndex = getTargetIndex(targetValue);
10108
10546
  if (targetIndex < 0) return;
@@ -10121,27 +10559,27 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10121
10559
  },
10122
10560
  [getTargetIndex, options]
10123
10561
  );
10124
- const clearScrollSettleTimeout = React35.useCallback(() => {
10562
+ const clearScrollSettleTimeout = React36.useCallback(() => {
10125
10563
  if (scrollSettleTimeoutRef.current === null) return;
10126
10564
  window.clearTimeout(scrollSettleTimeoutRef.current);
10127
10565
  scrollSettleTimeoutRef.current = null;
10128
10566
  }, []);
10129
- const clearScrollAnimationFrame = React35.useCallback(() => {
10567
+ const clearScrollAnimationFrame = React36.useCallback(() => {
10130
10568
  if (scrollAnimationFrameRef.current === null) return;
10131
10569
  window.cancelAnimationFrame(scrollAnimationFrameRef.current);
10132
10570
  scrollAnimationFrameRef.current = null;
10133
10571
  }, []);
10134
- React35.useEffect(
10572
+ React36.useEffect(
10135
10573
  () => () => {
10136
10574
  clearScrollSettleTimeout();
10137
10575
  clearScrollAnimationFrame();
10138
10576
  },
10139
10577
  [clearScrollAnimationFrame, clearScrollSettleTimeout]
10140
10578
  );
10141
- React35.useEffect(() => {
10579
+ React36.useEffect(() => {
10142
10580
  setPendingValue(value ?? null);
10143
10581
  }, [value]);
10144
- React35.useLayoutEffect(() => {
10582
+ React36.useLayoutEffect(() => {
10145
10583
  if (!isMobile || !isOpen) return;
10146
10584
  const frameId = window.requestAnimationFrame(() => {
10147
10585
  syncScrollPosition(value ?? null, "instant");
@@ -10150,7 +10588,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10150
10588
  window.cancelAnimationFrame(frameId);
10151
10589
  };
10152
10590
  }, [isMobile, isOpen, syncScrollPosition, value]);
10153
- const settleScroll = React35.useCallback(() => {
10591
+ const settleScroll = React36.useCallback(() => {
10154
10592
  if (!mobileListRef.current) return;
10155
10593
  const nextIndex = Math.round(mobileListRef.current.scrollTop / MOBILE_OPTION_HEIGHT);
10156
10594
  const nextOption = options[nextIndex];
@@ -10162,13 +10600,13 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10162
10600
  }
10163
10601
  setPendingValue(nextOption);
10164
10602
  }, [options, pendingValue]);
10165
- const scheduleScrollSettle = React35.useCallback(() => {
10603
+ const scheduleScrollSettle = React36.useCallback(() => {
10166
10604
  clearScrollSettleTimeout();
10167
10605
  scrollSettleTimeoutRef.current = window.setTimeout(() => {
10168
10606
  settleScroll();
10169
10607
  }, MOBILE_SCROLL_SETTLE_DELAY);
10170
10608
  }, [clearScrollSettleTimeout, settleScroll]);
10171
- const handleScroll = React35.useCallback(() => {
10609
+ const handleScroll = React36.useCallback(() => {
10172
10610
  if (!mobileListRef.current) return;
10173
10611
  const nextScrollTop = mobileListRef.current.scrollTop;
10174
10612
  clearScrollAnimationFrame();
@@ -10178,7 +10616,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10178
10616
  });
10179
10617
  scheduleScrollSettle();
10180
10618
  }, [clearScrollAnimationFrame, scheduleScrollSettle]);
10181
- const focusOptionByIndex = React35.useCallback(
10619
+ const focusOptionByIndex = React36.useCallback(
10182
10620
  (index, behavior = "instant", updatePendingImmediately = behavior === "instant") => {
10183
10621
  if (!mobileListRef.current || index < 0 || index >= options.length) return;
10184
10622
  const option = options[index];
@@ -10196,7 +10634,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10196
10634
  },
10197
10635
  [options, scheduleScrollSettle]
10198
10636
  );
10199
- const handleOptionClick = React35.useCallback(
10637
+ const handleOptionClick = React36.useCallback(
10200
10638
  (option) => {
10201
10639
  if (!mobileListRef.current || disabled || option.isDisabled) return;
10202
10640
  const optionIndex = getOptionIndex(options, option);
@@ -10205,7 +10643,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10205
10643
  },
10206
10644
  [disabled, focusOptionByIndex, options]
10207
10645
  );
10208
- const moveByStep = React35.useCallback(
10646
+ const moveByStep = React36.useCallback(
10209
10647
  (step) => {
10210
10648
  const currentIndex = getOptionIndex(options, pendingValue);
10211
10649
  const fallbackIndex = step === 1 ? getFirstEnabledOptionIndex(options) : getLastEnabledOptionIndex(options);
@@ -10217,7 +10655,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10217
10655
  },
10218
10656
  [focusOptionByIndex, options, pendingValue]
10219
10657
  );
10220
- const moveToBoundary = React35.useCallback(
10658
+ const moveToBoundary = React36.useCallback(
10221
10659
  (boundary) => {
10222
10660
  const targetIndex = boundary === "start" ? getFirstEnabledOptionIndex(options) : getLastEnabledOptionIndex(options);
10223
10661
  if (targetIndex >= 0) {
@@ -10226,7 +10664,7 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10226
10664
  },
10227
10665
  [focusOptionByIndex, options]
10228
10666
  );
10229
- const syncPendingValue = React35.useCallback(
10667
+ const syncPendingValue = React36.useCallback(
10230
10668
  (nextValue) => {
10231
10669
  const normalizedValue = nextValue ?? null;
10232
10670
  const matchedIndex = getOptionIndex(options, normalizedValue);
@@ -10254,9 +10692,9 @@ function useMobileSelectWheel({ isMobile, isOpen, options, value, disabled }) {
10254
10692
  }
10255
10693
 
10256
10694
  // src/airbnb/select/useSelectIds.ts
10257
- import * as React36 from "react";
10695
+ import * as React37 from "react";
10258
10696
  function useSelectIds({ name, hasValue, error, hideErrorMessage }) {
10259
- const reactId = React36.useId().replace(/:/g, "");
10697
+ const reactId = React37.useId().replace(/:/g, "");
10260
10698
  const baseId = name ? `select-${name}` : `select-${reactId}`;
10261
10699
  const triggerId = `${baseId}-trigger`;
10262
10700
  const labelId = `${baseId}-label`;
@@ -10266,7 +10704,7 @@ function useSelectIds({ name, hasValue, error, hideErrorMessage }) {
10266
10704
  const listboxId = `${baseId}-listbox`;
10267
10705
  const describedErrorId = error && !hideErrorMessage ? errorId : void 0;
10268
10706
  const describedBy = [!hasValue ? helperTextId : null, describedErrorId].filter(Boolean).join(" ") || void 0;
10269
- const getOptionId2 = React36.useCallback(
10707
+ const getOptionId2 = React37.useCallback(
10270
10708
  (index) => `${baseId}-option-${index}`,
10271
10709
  [baseId]
10272
10710
  );
@@ -10283,61 +10721,9 @@ function useSelectIds({ name, hasValue, error, hideErrorMessage }) {
10283
10721
  };
10284
10722
  }
10285
10723
 
10286
- // src/lib/use-outside-click.ts
10287
- import { useCallback as useCallback18, useEffect as useEffect17, useRef as useRef16 } from "react";
10288
- function useOutsideClick(elementRef, onOutsideClick, nested) {
10289
- const handleOutsideClick = useRef16(onOutsideClick);
10290
- handleOutsideClick.current = onOutsideClick;
10291
- const checkNestedElements = useCallback18(
10292
- (event) => {
10293
- const checkIsElementClickedBySelector = (selector) => {
10294
- const nestedElement = getDocument().querySelector(selector);
10295
- return nestedElement?.contains(event.target);
10296
- };
10297
- const checkDataAttribute = () => {
10298
- const target = event.target;
10299
- if (!target || !(target instanceof HTMLElement)) {
10300
- return false;
10301
- }
10302
- let current = target;
10303
- while (current) {
10304
- if (current.hasAttribute("data-exclude-from-outside-click")) {
10305
- return true;
10306
- }
10307
- current = current.parentElement;
10308
- }
10309
- return false;
10310
- };
10311
- if (nested) {
10312
- if (typeof nested === "string") {
10313
- if (checkIsElementClickedBySelector(nested)) return true;
10314
- } else {
10315
- if (nested.some(checkIsElementClickedBySelector)) return true;
10316
- }
10317
- }
10318
- return checkDataAttribute();
10319
- },
10320
- [nested]
10321
- );
10322
- useEffect17(() => {
10323
- function handleClickOutside(event) {
10324
- const isNestedElement = checkNestedElements(event);
10325
- if (elementRef?.current && !elementRef.current.contains(event.target) && !isNestedElement) {
10326
- handleOutsideClick.current?.(event);
10327
- }
10328
- }
10329
- getDocument().addEventListener("mousedown", handleClickOutside, true);
10330
- getDocument().addEventListener("touchstart", handleClickOutside, true);
10331
- return () => {
10332
- getDocument().removeEventListener("mousedown", handleClickOutside, true);
10333
- getDocument().removeEventListener("touchstart", handleClickOutside, true);
10334
- };
10335
- }, [checkNestedElements, elementRef]);
10336
- }
10337
-
10338
10724
  // src/airbnb/select/Select.tsx
10339
10725
  import { jsx as jsx130, jsxs as jsxs84 } from "react/jsx-runtime";
10340
- var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10726
+ var AirbnbSelect = React38.forwardRef(function AirbnbSelect2({
10341
10727
  options = [],
10342
10728
  value,
10343
10729
  onChange,
@@ -10364,8 +10750,8 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10364
10750
  noOptionsMessage
10365
10751
  }, ref) {
10366
10752
  const { isMatch: isMobile } = useScreenResize(DEVICE.mobileXL);
10367
- const [isOpen, setIsOpen] = React37.useState(false);
10368
- const containerRef = React37.useRef(null);
10753
+ const [isOpen, setIsOpen] = React38.useState(false);
10754
+ const containerRef = React38.useRef(null);
10369
10755
  const hasValue = Boolean(value);
10370
10756
  const helperText = placeholder ?? label;
10371
10757
  const isBlocked = Boolean(disabled) || Boolean(loading);
@@ -10419,12 +10805,12 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10419
10805
  const activeMobileIndex = getOptionIndex(options, pendingValue);
10420
10806
  const valueLabel = value ? getValueLabel?.(value) ?? String(value.label) : void 0;
10421
10807
  useOutsideClick(containerRef, isOpen && !isMobile ? () => setIsOpen(false) : null);
10422
- React37.useEffect(() => {
10808
+ React38.useEffect(() => {
10423
10809
  if (isBlocked) {
10424
10810
  setIsOpen(false);
10425
10811
  }
10426
10812
  }, [isBlocked]);
10427
- React37.useEffect(
10813
+ React38.useEffect(
10428
10814
  function setCorrectOptionIfThereIsOnlyValue() {
10429
10815
  if (value?.value === void 0 || value.value === null || value.label !== "") {
10430
10816
  return;
@@ -10436,7 +10822,7 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10436
10822
  },
10437
10823
  [onChange, options, value]
10438
10824
  );
10439
- const handleMobileOpenChange = React37.useCallback(
10825
+ const handleMobileOpenChange = React38.useCallback(
10440
10826
  (nextOpen) => {
10441
10827
  if (isBlocked && nextOpen) return;
10442
10828
  setIsOpen(nextOpen);
@@ -10447,7 +10833,7 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10447
10833
  },
10448
10834
  [focusTrigger, isBlocked, syncPendingValue, value]
10449
10835
  );
10450
- const handleMobileDone = React37.useCallback(() => {
10836
+ const handleMobileDone = React38.useCallback(() => {
10451
10837
  if (isBlocked) return;
10452
10838
  const finalOption = pendingValue;
10453
10839
  if (finalOption && finalOption.value !== value?.value) {
@@ -10456,7 +10842,7 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10456
10842
  setIsOpen(false);
10457
10843
  focusTrigger();
10458
10844
  }, [focusTrigger, isBlocked, onChange, pendingValue, value]);
10459
- const handleTriggerClick = React37.useCallback(() => {
10845
+ const handleTriggerClick = React38.useCallback(() => {
10460
10846
  if (isBlocked) return;
10461
10847
  setIsOpen((prev) => {
10462
10848
  const nextOpen = !prev;
@@ -10625,7 +11011,7 @@ var AirbnbSelect = React37.forwardRef(function AirbnbSelect2({
10625
11011
 
10626
11012
  // src/airbnb/phone-field/PhoneField.tsx
10627
11013
  import { jsx as jsx131, jsxs as jsxs85 } from "react/jsx-runtime";
10628
- var PhoneField = React38.forwardRef(
11014
+ var PhoneField = React39.forwardRef(
10629
11015
  ({
10630
11016
  variant = "default",
10631
11017
  label,
@@ -10649,8 +11035,8 @@ var PhoneField = React38.forwardRef(
10649
11035
  mobileTitle,
10650
11036
  codePlaceholder = "+00"
10651
11037
  }, ref) => {
10652
- const inputId = React38.useId();
10653
- const codeOptions = React38.useMemo(
11038
+ const inputId = React39.useId();
11039
+ const codeOptions = React39.useMemo(
10654
11040
  () => options.map((option) => ({
10655
11041
  value: option.value,
10656
11042
  label: `${option.label} (${option.value})`,
@@ -10658,7 +11044,7 @@ var PhoneField = React38.forwardRef(
10658
11044
  })),
10659
11045
  [options]
10660
11046
  );
10661
- const selectedCodeOption = React38.useMemo(
11047
+ const selectedCodeOption = React39.useMemo(
10662
11048
  () => codeOptions.find((option) => option.value === value?.code) ?? null,
10663
11049
  [codeOptions, value?.code]
10664
11050
  );
@@ -10800,11 +11186,11 @@ var PhoneField = React38.forwardRef(
10800
11186
  PhoneField.displayName = "PhoneField";
10801
11187
 
10802
11188
  // src/airbnb/search-input/SearchInput.tsx
10803
- import * as React39 from "react";
11189
+ import * as React40 from "react";
10804
11190
  import { useTranslation as useTranslation23 } from "react-i18next";
10805
11191
  import { Search as Search3, X as X8 } from "lucide-react";
10806
11192
  import { jsx as jsx132, jsxs as jsxs86 } from "react/jsx-runtime";
10807
- var AirbnbSearchInput = React39.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
11193
+ var AirbnbSearchInput = React40.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
10808
11194
  const { t } = useTranslation23();
10809
11195
  const placeholderText = placeholder || t("search_property") + "...";
10810
11196
  return /* @__PURE__ */ jsxs86("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
@@ -10842,28 +11228,10 @@ var AirbnbSearchInput = React39.forwardRef(({ onReset, placeholder, wrapperClass
10842
11228
  AirbnbSearchInput.displayName = "SearchInput";
10843
11229
 
10844
11230
  // src/searchable-select/SearchableSelect.tsx
10845
- import * as React40 from "react";
11231
+ import * as React41 from "react";
10846
11232
  import { ChevronDown as ChevronDown3, Search as Search4 } from "lucide-react";
10847
11233
  import { useVirtualizer } from "@tanstack/react-virtual";
10848
- import { useCallback as useCallback21 } from "react";
10849
-
10850
- // src/lib/use-event.ts
10851
- import { useCallback as useCallback20, useLayoutEffect as useLayoutEffect5, useRef as useRef18 } from "react";
10852
- function useEvent(fn) {
10853
- const fnRef = useRef18(fn);
10854
- useLayoutEffect5(() => {
10855
- fnRef.current = fn;
10856
- }, [fn]);
10857
- const eventCb = useCallback20(
10858
- (...args) => {
10859
- return fnRef.current?.apply(null, args);
10860
- },
10861
- [fnRef]
10862
- );
10863
- return eventCb;
10864
- }
10865
-
10866
- // src/searchable-select/SearchableSelect.tsx
11234
+ import { useCallback as useCallback25 } from "react";
10867
11235
  import { jsx as jsx133, jsxs as jsxs87 } from "react/jsx-runtime";
10868
11236
  var ROW_HEIGHT = 48;
10869
11237
  var DESKTOP_LIST_HEIGHT = 280;
@@ -10905,13 +11273,13 @@ var SearchableSelectInternal = ({
10905
11273
  loadingMessage
10906
11274
  }, ref) => {
10907
11275
  const { isMatch: isMobile } = useScreenResize(DEVICE.mobileXL);
10908
- const reactId = React40.useId();
10909
- const [open, setOpen] = React40.useState(false);
10910
- const [internalSearchValue, setInternalSearchValue] = React40.useState("");
10911
- const [highlightedIndex, setHighlightedIndex] = React40.useState(-1);
10912
- const containerRef = React40.useRef(null);
10913
- const triggerRef = React40.useRef(null);
10914
- const inputRef = React40.useRef(null);
11276
+ const reactId = React41.useId();
11277
+ const [open, setOpen] = React41.useState(false);
11278
+ const [internalSearchValue, setInternalSearchValue] = React41.useState("");
11279
+ const [highlightedIndex, setHighlightedIndex] = React41.useState(-1);
11280
+ const containerRef = React41.useRef(null);
11281
+ const triggerRef = React41.useRef(null);
11282
+ const inputRef = React41.useRef(null);
10915
11283
  const listboxId = `${reactId}-listbox`;
10916
11284
  const labelId = `${reactId}-label`;
10917
11285
  const valueId = `${reactId}-value`;
@@ -10920,13 +11288,13 @@ var SearchableSelectInternal = ({
10920
11288
  const searchInputId = `${reactId}-search`;
10921
11289
  const effectiveSearchValue = searchValue ?? internalSearchValue;
10922
11290
  const shouldFilterLocally = !onSearchChange && filterOption !== null;
10923
- const visibleOptions = React40.useMemo(() => {
11291
+ const visibleOptions = React41.useMemo(() => {
10924
11292
  if (!shouldFilterLocally || !effectiveSearchValue) {
10925
11293
  return options;
10926
11294
  }
10927
11295
  return options.filter((option) => filterOption(option, effectiveSearchValue));
10928
11296
  }, [effectiveSearchValue, filterOption, options, shouldFilterLocally]);
10929
- const selectedIndex = React40.useMemo(
11297
+ const selectedIndex = React41.useMemo(
10930
11298
  () => visibleOptions.findIndex((option) => option.value === value?.value),
10931
11299
  [value?.value, visibleOptions]
10932
11300
  );
@@ -10938,7 +11306,7 @@ var SearchableSelectInternal = ({
10938
11306
  const activeOptionId = highlightedIndex >= 0 ? getOptionId(reactId, highlightedIndex) : void 0;
10939
11307
  useOutsideClick(containerRef, open && !isMobile ? () => closeSelect() : null);
10940
11308
  const handleOnOpenChange = useEvent(onOpenChange);
10941
- const setSelectOpen = useCallback21(
11309
+ const setSelectOpen = useCallback25(
10942
11310
  (nextOpen, options2) => {
10943
11311
  setOpen(nextOpen);
10944
11312
  handleOnOpenChange?.(nextOpen);
@@ -10948,7 +11316,7 @@ var SearchableSelectInternal = ({
10948
11316
  },
10949
11317
  [handleOnOpenChange]
10950
11318
  );
10951
- React40.useEffect(() => {
11319
+ React41.useEffect(() => {
10952
11320
  if (isBlocked) {
10953
11321
  setSelectOpen(false);
10954
11322
  return;
@@ -10961,7 +11329,7 @@ var SearchableSelectInternal = ({
10961
11329
  window.cancelAnimationFrame(frameId);
10962
11330
  };
10963
11331
  }, [isBlocked, open, setSelectOpen]);
10964
- React40.useEffect(() => {
11332
+ React41.useEffect(() => {
10965
11333
  if (!open) {
10966
11334
  setHighlightedIndex(-1);
10967
11335
  return;
@@ -11056,7 +11424,7 @@ var SearchableSelectInternal = ({
11056
11424
  onOptionHover: setHighlightedIndex
11057
11425
  }
11058
11426
  );
11059
- React40.useImperativeHandle(ref, () => triggerRef.current, []);
11427
+ React41.useImperativeHandle(ref, () => triggerRef.current, []);
11060
11428
  return /* @__PURE__ */ jsxs87(
11061
11429
  "div",
11062
11430
  {
@@ -11142,7 +11510,7 @@ var SearchableSelectInternal = ({
11142
11510
  }
11143
11511
  );
11144
11512
  };
11145
- var SearchableSelect = React40.forwardRef(
11513
+ var SearchableSelect = React41.forwardRef(
11146
11514
  SearchableSelectInternal
11147
11515
  );
11148
11516
  function SearchableSelectContent({
@@ -11169,9 +11537,9 @@ function SearchableSelectContent({
11169
11537
  onOptionClick,
11170
11538
  onOptionHover
11171
11539
  }) {
11172
- const listRef = React40.useRef(null);
11173
- const lastLoadMoreOptionsLengthRef = React40.useRef(null);
11174
- const previousHighlightedIndexRef = React40.useRef(highlightedIndex);
11540
+ const listRef = React41.useRef(null);
11541
+ const lastLoadMoreOptionsLengthRef = React41.useRef(null);
11542
+ const previousHighlightedIndexRef = React41.useRef(highlightedIndex);
11175
11543
  const rowCount = options.length + (loading && options.length > 0 ? 1 : 0);
11176
11544
  const virtualizer = useVirtualizer({
11177
11545
  count: rowCount,
@@ -11182,7 +11550,7 @@ function SearchableSelectContent({
11182
11550
  const virtualItems = virtualizer.getVirtualItems();
11183
11551
  const emptyMessage = noOptionsMessage?.() ?? "No matches found";
11184
11552
  const loadingText = loadingMessage?.() ?? "Loading...";
11185
- React40.useEffect(() => {
11553
+ React41.useEffect(() => {
11186
11554
  const lastItem = virtualItems[virtualItems.length - 1];
11187
11555
  const shouldLoadMore = !!lastItem && hasNextPage && !loading && lastItem.index >= options.length - LOAD_MORE_THRESHOLD;
11188
11556
  if (shouldLoadMore && lastLoadMoreOptionsLengthRef.current !== options.length) {
@@ -11190,7 +11558,7 @@ function SearchableSelectContent({
11190
11558
  onLoadMore?.();
11191
11559
  }
11192
11560
  }, [hasNextPage, loading, onLoadMore, options.length, virtualItems]);
11193
- React40.useEffect(() => {
11561
+ React41.useEffect(() => {
11194
11562
  const hasHighlightedIndexChanged = previousHighlightedIndexRef.current !== highlightedIndex;
11195
11563
  previousHighlightedIndexRef.current = highlightedIndex;
11196
11564
  if (highlightedIndex >= 0 && hasHighlightedIndexChanged) {
@@ -11306,6 +11674,39 @@ function getNextEnabledIndex(options, startIndex, step) {
11306
11674
  }
11307
11675
  return -1;
11308
11676
  }
11677
+
11678
+ // src/lib/copy-to-clipboard.ts
11679
+ function copyToClipboardFallback(value) {
11680
+ const targetDocument = getDocument();
11681
+ const targetBody = targetDocument.body;
11682
+ if (!targetBody) {
11683
+ return;
11684
+ }
11685
+ const el = targetDocument.createElement("textarea");
11686
+ el.value = value;
11687
+ el.setAttribute("readonly", "");
11688
+ el.style.position = "fixed";
11689
+ el.style.opacity = "0";
11690
+ el.style.pointerEvents = "none";
11691
+ el.style.left = "-9999px";
11692
+ targetBody.appendChild(el);
11693
+ el.focus();
11694
+ el.select();
11695
+ targetDocument.execCommand("copy");
11696
+ targetBody.removeChild(el);
11697
+ }
11698
+ function copyToClipboard2(value) {
11699
+ const text = typeof value === "number" ? value.toString() : value;
11700
+ const targetDocument = getDocument();
11701
+ const clipboard = targetDocument.defaultView?.navigator?.clipboard ?? globalThis.navigator?.clipboard;
11702
+ if (!clipboard?.writeText) {
11703
+ copyToClipboardFallback(text);
11704
+ return;
11705
+ }
11706
+ void clipboard.writeText(text).catch(() => {
11707
+ copyToClipboardFallback(text);
11708
+ });
11709
+ }
11309
11710
  export {
11310
11711
  Accordion,
11311
11712
  AccordionContent,
@@ -11557,6 +11958,7 @@ export {
11557
11958
  buttonVariants,
11558
11959
  calendarClassNames,
11559
11960
  cn,
11961
+ copyToClipboard2 as copyToClipboard,
11560
11962
  emptyMediaVariants,
11561
11963
  getSidebarState,
11562
11964
  inputVariants,
@@ -11570,10 +11972,28 @@ export {
11570
11972
  toggleVariants,
11571
11973
  uiKitI18nResources,
11572
11974
  uiKitTranslations,
11975
+ useAbortController,
11976
+ useClickEscape,
11977
+ useCombinedRef,
11978
+ useDebounce,
11979
+ useDebouncedFunction,
11980
+ useEvent,
11981
+ useHover,
11982
+ useIsMobile,
11983
+ useIsMounted,
11984
+ useModalControls,
11985
+ useOutsideClick,
11986
+ usePagination,
11987
+ usePrevious,
11573
11988
  useRadioOptions,
11989
+ useScreenResize,
11990
+ useScrollFrameIntoView,
11991
+ useScrollToTop,
11574
11992
  useSidebar,
11575
11993
  useSidebarMenuButton,
11576
11994
  useSidebarSafe,
11995
+ useTimeout,
11996
+ useTimer,
11577
11997
  useUpdateToast
11578
11998
  };
11579
11999
  //# sourceMappingURL=index.js.map