@helpwave/hightide 0.8.0 → 0.8.1

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.mjs CHANGED
@@ -10104,13 +10104,13 @@ var DividerInserter = ({
10104
10104
  };
10105
10105
 
10106
10106
  // src/components/layout/Expandable.tsx
10107
- import { useEffect as useEffect13, useImperativeHandle as useImperativeHandle4, useRef as useRef10 } from "react";
10107
+ import { useEffect as useEffect14, useImperativeHandle as useImperativeHandle4, useRef as useRef11 } from "react";
10108
10108
  import { useState as useState12 } from "react";
10109
- import { createContext as createContext6, forwardRef as forwardRef7, useCallback as useCallback9, useContext as useContext6, useId as useId5, useMemo as useMemo11 } from "react";
10109
+ import { createContext as createContext6, forwardRef as forwardRef7, useCallback as useCallback10, useContext as useContext6, useId as useId5, useMemo as useMemo11 } from "react";
10110
10110
  import clsx4 from "clsx";
10111
10111
 
10112
10112
  // src/hooks/useControlledState.ts
10113
- import { useState as useState11 } from "react";
10113
+ import { useCallback as useCallback9, useEffect as useEffect13, useRef as useRef10, useState as useState11 } from "react";
10114
10114
 
10115
10115
  // src/utils/resolveSetState.ts
10116
10116
  function resolveSetState(action, prev) {
@@ -10119,28 +10119,34 @@ function resolveSetState(action, prev) {
10119
10119
 
10120
10120
  // src/hooks/useControlledState.ts
10121
10121
  var useControlledState = ({
10122
- value,
10122
+ value: controlledValue,
10123
10123
  onValueChange,
10124
10124
  defaultValue,
10125
10125
  isControlled: isEnforcingControlled
10126
10126
  }) => {
10127
- const [internalValue, setInternalValue] = useState11(defaultValue);
10128
- const [isControlled] = useState11(isEnforcingControlled || value !== void 0);
10127
+ const [internalValue, setInternalValue] = useState11(() => defaultValue);
10128
+ const [isControlled] = useState11(isEnforcingControlled || controlledValue !== void 0);
10129
10129
  const onValueChangeStable = useEventCallbackStabilizer(onValueChange);
10130
10130
  useLogOnce(
10131
10131
  "useControlledState: Attempted to change from controlled to uncontrolled or vice versa.For a controlled state: isControlled === true OR value !== undefinedFor an uncontrolled state: isControlled === false OR value === undefined",
10132
- isControlled !== (isEnforcingControlled || value !== void 0),
10132
+ isControlled !== (isEnforcingControlled || controlledValue !== void 0),
10133
10133
  { type: "error" }
10134
10134
  );
10135
- if (isControlled) {
10136
- return [value, onValueChangeStable];
10137
- }
10138
- const onChangeWrapper = (action) => {
10139
- const resolved = resolveSetState(action, internalValue);
10140
- setInternalValue(resolved);
10135
+ const lastValue = useRef10(isControlled ? controlledValue : internalValue);
10136
+ useEffect13(() => {
10137
+ lastValue.current = isControlled ? controlledValue : internalValue;
10138
+ }, [isControlled, controlledValue, internalValue]);
10139
+ const setState = useCallback9((action) => {
10140
+ const resolved = resolveSetState(action, lastValue.current);
10141
+ if (resolved === lastValue.current) return;
10142
+ if (!isControlled) {
10143
+ lastValue.current = resolved;
10144
+ setInternalValue(resolved);
10145
+ }
10141
10146
  onValueChangeStable(resolved);
10142
- };
10143
- return [internalValue, onChangeWrapper];
10147
+ }, [onValueChangeStable, isControlled]);
10148
+ const value = isControlled ? controlledValue : internalValue;
10149
+ return [value, setState];
10144
10150
  };
10145
10151
 
10146
10152
  // src/components/layout/Expandable.tsx
@@ -10174,7 +10180,7 @@ var ExpandableRoot = forwardRef7(function ExpandableRoot2({
10174
10180
  onValueChange: onExpandedChange,
10175
10181
  defaultValue: isInitialExpanded
10176
10182
  });
10177
- const toggle = useCallback9(() => {
10183
+ const toggle = useCallback10(() => {
10178
10184
  if (!disabled) {
10179
10185
  setIsExpanded(!isExpanded);
10180
10186
  }
@@ -10213,7 +10219,7 @@ var ExpandableHeader = forwardRef7(function ExpandableHeader2({
10213
10219
  ...props
10214
10220
  }, ref) {
10215
10221
  const { isExpanded, toggle, ids, setIds, disabled } = useExpandableContext();
10216
- useEffect13(() => {
10222
+ useEffect14(() => {
10217
10223
  if (props.id) {
10218
10224
  setIds((prevState) => ({ ...prevState, header: props.id }));
10219
10225
  }
@@ -10248,9 +10254,9 @@ var ExpandableContent = forwardRef7(function ExpandableContent2({
10248
10254
  ...props
10249
10255
  }, forwardedRef) {
10250
10256
  const { isExpanded, ids, setIds } = useExpandableContext();
10251
- const ref = useRef10(null);
10257
+ const ref = useRef11(null);
10252
10258
  useImperativeHandle4(forwardedRef, () => ref.current, [ref]);
10253
- useEffect13(() => {
10259
+ useEffect14(() => {
10254
10260
  if (props.id) {
10255
10261
  setIds((prevState) => ({ ...prevState, content: props.id }));
10256
10262
  }
@@ -10308,11 +10314,11 @@ var FAQSection = ({
10308
10314
 
10309
10315
  // src/components/layout/InifiniteScroll.tsx
10310
10316
  import {
10311
- useRef as useRef11,
10317
+ useRef as useRef12,
10312
10318
  useState as useState13,
10313
10319
  useLayoutEffect as useLayoutEffect5,
10314
10320
  useMemo as useMemo12,
10315
- useCallback as useCallback10
10321
+ useCallback as useCallback11
10316
10322
  } from "react";
10317
10323
  import clsx5 from "clsx";
10318
10324
  import { ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
@@ -10334,8 +10340,8 @@ function InfiniteScroll({
10334
10340
  throw new Error("InfiniteScroll: itemCount > 0 must hold");
10335
10341
  }
10336
10342
  const items = useMemo12(() => range(itemCount), [itemCount]);
10337
- const containerRef = useRef11(null);
10338
- const snapshotRef = useRef11({ scrollHeight: 0, scrollTop: 0, fromTop: false });
10343
+ const containerRef = useRef12(null);
10344
+ const snapshotRef = useRef12({ scrollHeight: 0, scrollTop: 0, fromTop: false });
10339
10345
  const [windowState, setWindowState] = useState13(() => {
10340
10346
  let index = initialIndex;
10341
10347
  if (index < 0) {
@@ -10348,14 +10354,14 @@ function InfiniteScroll({
10348
10354
  end: Math.min(items.length, safeStart + bufferSize)
10349
10355
  };
10350
10356
  });
10351
- const addToStart = useCallback10((amount = stepSize) => {
10357
+ const addToStart = useCallback11((amount = stepSize) => {
10352
10358
  setWindowState((prev) => {
10353
10359
  const newStart = Math.max(0, prev.start - amount);
10354
10360
  const newEnd = Math.min(items.length, newStart + bufferSize);
10355
10361
  return { start: newStart, end: newEnd };
10356
10362
  });
10357
10363
  }, [bufferSize, items.length, stepSize]);
10358
- const addToEnd = useCallback10((amount = stepSize) => {
10364
+ const addToEnd = useCallback11((amount = stepSize) => {
10359
10365
  setWindowState((prev) => {
10360
10366
  const newEnd = Math.min(items.length, prev.end + amount);
10361
10367
  const newStart = Math.max(0, newEnd - bufferSize);
@@ -10403,7 +10409,7 @@ function InfiniteScroll({
10403
10409
  }
10404
10410
 
10405
10411
  // src/components/layout/ListBox.tsx
10406
- import React2, { createContext as createContext7, forwardRef as forwardRef8, useCallback as useCallback11, useContext as useContext7, useEffect as useEffect14, useRef as useRef12, useState as useState14 } from "react";
10412
+ import React2, { createContext as createContext7, forwardRef as forwardRef8, useCallback as useCallback12, useContext as useContext7, useEffect as useEffect15, useRef as useRef13, useState as useState14 } from "react";
10407
10413
  import { clsx as clsx6 } from "clsx";
10408
10414
 
10409
10415
  // src/utils/match.ts
@@ -10431,9 +10437,9 @@ var ListBoxItem = forwardRef8(
10431
10437
  onItemClick,
10432
10438
  isSelected
10433
10439
  } = useListBoxContext();
10434
- const itemRef = useRef12(null);
10440
+ const itemRef = useRef13(null);
10435
10441
  const id = React2.useId();
10436
- useEffect14(() => {
10442
+ useEffect15(() => {
10437
10443
  registerItem({ id, value, disabled, ref: itemRef });
10438
10444
  return () => unregisterItem(id);
10439
10445
  }, [id, value, disabled, registerItem, unregisterItem]);
@@ -10491,9 +10497,9 @@ var ListBoxPrimitive = forwardRef8(
10491
10497
  onValueChange: onSelectionChanged,
10492
10498
  defaultValue: initialValue
10493
10499
  });
10494
- const itemsRef = useRef12([]);
10500
+ const itemsRef = useRef13([]);
10495
10501
  const [highlightedIndex, setHighlightedIndex] = useState14(void 0);
10496
- const registerItem = useCallback11((item) => {
10502
+ const registerItem = useCallback12((item) => {
10497
10503
  itemsRef.current.push(item);
10498
10504
  itemsRef.current.sort((a, b) => {
10499
10505
  const aEl = a.ref.current;
@@ -10502,14 +10508,14 @@ var ListBoxPrimitive = forwardRef8(
10502
10508
  return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
10503
10509
  });
10504
10510
  }, []);
10505
- const unregisterItem = useCallback11((id) => {
10511
+ const unregisterItem = useCallback12((id) => {
10506
10512
  itemsRef.current = itemsRef.current.filter((i) => i.id !== id);
10507
10513
  }, []);
10508
- const isSelected = useCallback11(
10514
+ const isSelected = useCallback12(
10509
10515
  (val) => (value ?? []).includes(val),
10510
10516
  [value]
10511
10517
  );
10512
- const onItemClickedHandler = useCallback11(
10518
+ const onItemClickedHandler = useCallback12(
10513
10519
  (id) => {
10514
10520
  const index = itemsRef.current.findIndex((i) => i.id === id);
10515
10521
  if (index === -1) {
@@ -10533,13 +10539,13 @@ var ListBoxPrimitive = forwardRef8(
10533
10539
  },
10534
10540
  [onItemClicked, isSelection, isMultiple, setValue, isSelected, value]
10535
10541
  );
10536
- const setHighlightedId = useCallback11((id) => {
10542
+ const setHighlightedId = useCallback12((id) => {
10537
10543
  const index = itemsRef.current.findIndex((i) => i.id === id);
10538
10544
  if (index !== -1) {
10539
10545
  setHighlightedIndex(index);
10540
10546
  }
10541
10547
  }, []);
10542
- useEffect14(() => {
10548
+ useEffect15(() => {
10543
10549
  if (highlightedIndex !== void 0) {
10544
10550
  itemsRef.current[highlightedIndex]?.ref.current?.scrollIntoView({ block: "nearest", behavior: "auto" });
10545
10551
  }
@@ -10880,8 +10886,8 @@ var MarkdownInterpreter = ({ text, className }) => {
10880
10886
  };
10881
10887
 
10882
10888
  // src/components/layout/TabSwitcher.tsx
10883
- import { useCallback as useCallback12, useId as useId6, useState as useState15 } from "react";
10884
- import { createContext as createContext8, useContext as useContext8, useEffect as useEffect15, useRef as useRef13 } from "react";
10889
+ import { useCallback as useCallback13, useId as useId6, useState as useState15 } from "react";
10890
+ import { createContext as createContext8, useContext as useContext8, useEffect as useEffect16, useRef as useRef14 } from "react";
10885
10891
  import clsx7 from "clsx";
10886
10892
 
10887
10893
  // src/utils/propsUtil.ts
@@ -11052,7 +11058,7 @@ function TabSwitcher({ children }) {
11052
11058
  infos: []
11053
11059
  });
11054
11060
  const [portalState, setPortalState] = useState15(null);
11055
- const subscribe = useCallback12((info) => {
11061
+ const subscribe = useCallback13((info) => {
11056
11062
  const id = info.id;
11057
11063
  setState((prevState) => {
11058
11064
  const existingIndex = prevState.infos.findIndex((t) => t.id === id);
@@ -11073,10 +11079,10 @@ function TabSwitcher({ children }) {
11073
11079
  });
11074
11080
  };
11075
11081
  }, []);
11076
- const registerPortal = useCallback12((state2) => {
11082
+ const registerPortal = useCallback13((state2) => {
11077
11083
  setPortalState(state2);
11078
11084
  }, []);
11079
- const setActiveId = useCallback12((activeId) => {
11085
+ const setActiveId = useCallback13((activeId) => {
11080
11086
  setState((prevState) => ({ ...prevState, activeId }));
11081
11087
  }, []);
11082
11088
  return /* @__PURE__ */ jsx25(
@@ -11102,7 +11108,7 @@ function TabSwitcher({ children }) {
11102
11108
  function TabList({ ...props }) {
11103
11109
  const { tabs } = useTabContext();
11104
11110
  const { info, activeId, setActiveId: setActive } = tabs;
11105
- const refs = useRef13({});
11111
+ const refs = useRef14({});
11106
11112
  const onKeyDown = (e) => {
11107
11113
  const idx = info.findIndex((tab) => tab.id === activeId);
11108
11114
  if (idx === -1) return;
@@ -11159,8 +11165,8 @@ function TabView({ ...props }) {
11159
11165
  const id = props.id ?? "tab-view-" + generated;
11160
11166
  const { portal } = useTabContext();
11161
11167
  const { setPortal } = portal;
11162
- const ref = useRef13(null);
11163
- useEffect15(() => {
11168
+ const ref = useRef14(null);
11169
+ useEffect16(() => {
11164
11170
  setPortal({ id, ref });
11165
11171
  return () => setPortal(null);
11166
11172
  }, [id, setPortal]);
@@ -11180,8 +11186,8 @@ function TabPanel({ label, forceMount = false, disabled = false, ...props }) {
11180
11186
  const generatedId = useId6();
11181
11187
  const id = props.id ?? "tab-panel-" + generatedId;
11182
11188
  const labelId = "tab-list-button-" + generatedId;
11183
- const ref = useRef13(null);
11184
- useEffect15(() => {
11189
+ const ref = useRef14(null);
11190
+ useEffect16(() => {
11185
11191
  return subscribe({ id, label, labelId, disabled, ref });
11186
11192
  }, [id, label, labelId, disabled, subscribe]);
11187
11193
  const isActive = activeId === id;
@@ -11317,11 +11323,11 @@ var VerticalDivider = ({
11317
11323
  };
11318
11324
 
11319
11325
  // src/components/layout/dialog/Dialog.tsx
11320
- import { forwardRef as forwardRef10, useCallback as useCallback15, useContext as useContext10, useId as useId8, useImperativeHandle as useImperativeHandle6, useMemo as useMemo13, useRef as useRef17 } from "react";
11326
+ import { forwardRef as forwardRef10, useCallback as useCallback16, useContext as useContext10, useId as useId8, useImperativeHandle as useImperativeHandle6, useMemo as useMemo13, useRef as useRef18 } from "react";
11321
11327
  import { X } from "lucide-react";
11322
11328
 
11323
11329
  // src/hooks/focus/useFocusTrap.ts
11324
- import { useCallback as useCallback13, useEffect as useEffect16, useId as useId7, useRef as useRef14, useState as useState16 } from "react";
11330
+ import { useCallback as useCallback14, useEffect as useEffect17, useId as useId7, useRef as useRef15, useState as useState16 } from "react";
11325
11331
  var createFocusGuard = () => {
11326
11332
  const div = document.createElement("div");
11327
11333
  Object.assign(div.style, {
@@ -11437,10 +11443,10 @@ var useFocusTrap = ({
11437
11443
  active,
11438
11444
  initialFocus
11439
11445
  }) => {
11440
- const lastFocusRef = useRef14(null);
11446
+ const lastFocusRef = useRef15(null);
11441
11447
  const [paused, setPaused] = useState16(false);
11442
11448
  const id = useId7();
11443
- const focusElement = useCallback13(() => {
11449
+ const focusElement = useCallback14(() => {
11444
11450
  const containerElement = container.current;
11445
11451
  if (initialFocus?.current) {
11446
11452
  initialFocus.current.focus();
@@ -11454,7 +11460,7 @@ var useFocusTrap = ({
11454
11460
  }
11455
11461
  }
11456
11462
  }, [container, initialFocus]);
11457
- useEffect16(() => {
11463
+ useEffect17(() => {
11458
11464
  if (active) {
11459
11465
  let pause = function() {
11460
11466
  setPaused(true);
@@ -11479,7 +11485,7 @@ var useFocusTrap = ({
11479
11485
  };
11480
11486
  }
11481
11487
  }, [active, container, focusElement, id, initialFocus]);
11482
- useEffect16(() => {
11488
+ useEffect17(() => {
11483
11489
  if (active && !paused) {
11484
11490
  let onKeyDown = function(event) {
11485
11491
  const key = event.key;
@@ -11507,7 +11513,7 @@ var useFocusTrap = ({
11507
11513
  };
11508
11514
 
11509
11515
  // src/components/utils/FocusTrap.tsx
11510
- import { useRef as useRef15 } from "react";
11516
+ import { useRef as useRef16 } from "react";
11511
11517
  import { useImperativeHandle as useImperativeHandle5 } from "react";
11512
11518
  import { forwardRef as forwardRef9 } from "react";
11513
11519
  import { jsx as jsx28 } from "react/jsx-runtime";
@@ -11522,24 +11528,24 @@ var FocusTrapWrapper = forwardRef9(function FocusTrap2({
11522
11528
  initialFocus,
11523
11529
  ...props
11524
11530
  }, forwardedRef) {
11525
- const innerRef = useRef15(null);
11531
+ const innerRef = useRef16(null);
11526
11532
  useImperativeHandle5(forwardedRef, () => innerRef.current);
11527
11533
  useFocusTrap({ container: innerRef, active, initialFocus });
11528
11534
  return /* @__PURE__ */ jsx28("div", { ref: innerRef, ...props });
11529
11535
  });
11530
11536
 
11531
11537
  // src/hooks/usePresenceRef.ts
11532
- import { useCallback as useCallback14, useEffect as useEffect17, useRef as useRef16, useState as useState17 } from "react";
11538
+ import { useCallback as useCallback15, useEffect as useEffect18, useRef as useRef17, useState as useState17 } from "react";
11533
11539
  var usePresenceRef = ({
11534
11540
  isOpen = true
11535
11541
  }) => {
11536
11542
  const [isPresent, setIsPresent] = useState17(false);
11537
- const ref = useRef16(null);
11538
- const refAssignment = useCallback14((node) => {
11543
+ const ref = useRef17(null);
11544
+ const refAssignment = useCallback15((node) => {
11539
11545
  ref.current = node;
11540
11546
  setIsPresent((prev) => prev || !!node);
11541
11547
  }, []);
11542
- useEffect17(() => {
11548
+ useEffect18(() => {
11543
11549
  if (!isOpen) {
11544
11550
  setIsPresent(false);
11545
11551
  }
@@ -11585,7 +11591,7 @@ var Dialog = forwardRef10(function Dialog2({
11585
11591
  title: `dialog-title-${generatedId}`,
11586
11592
  description: `dialog-description-${generatedId}`
11587
11593
  }), [generatedId, props.id]);
11588
- const containerRef = useRef17(null);
11594
+ const containerRef = useRef18(null);
11589
11595
  const context = useContext10(DialogContext);
11590
11596
  const isOpen = isOpenOverwrite ?? context?.isOpen ?? false;
11591
11597
  const isModal = isModalOverwrite ?? context?.isModal ?? true;
@@ -11594,7 +11600,7 @@ var Dialog = forwardRef10(function Dialog2({
11594
11600
  });
11595
11601
  useImperativeHandle6(forwardedRef, () => ref.current, [ref]);
11596
11602
  const onCloseStable = useEventCallbackStabilizer(onClose);
11597
- const onCloseWrapper = useCallback15(() => {
11603
+ const onCloseWrapper = useCallback16(() => {
11598
11604
  if (!isModal) return;
11599
11605
  onCloseStable();
11600
11606
  context?.setIsOpen(false);
@@ -11793,10 +11799,10 @@ var DiscardChangesDialog = ({
11793
11799
  };
11794
11800
 
11795
11801
  // src/components/user-interaction/input/Input.tsx
11796
- import { forwardRef as forwardRef11, useImperativeHandle as useImperativeHandle7, useRef as useRef18 } from "react";
11802
+ import { forwardRef as forwardRef11, useImperativeHandle as useImperativeHandle7, useRef as useRef19 } from "react";
11797
11803
 
11798
11804
  // src/hooks/useDelay.ts
11799
- import { useEffect as useEffect18, useState as useState18 } from "react";
11805
+ import { useEffect as useEffect19, useState as useState18 } from "react";
11800
11806
  var defaultOptions2 = {
11801
11807
  delay: 3e3,
11802
11808
  disabled: false
@@ -11821,12 +11827,12 @@ function useDelay(options) {
11821
11827
  setTimer(void 0);
11822
11828
  }, delay));
11823
11829
  };
11824
- useEffect18(() => {
11830
+ useEffect19(() => {
11825
11831
  return () => {
11826
11832
  clearTimeout(timer);
11827
11833
  };
11828
11834
  }, [timer]);
11829
- useEffect18(() => {
11835
+ useEffect19(() => {
11830
11836
  if (disabled) {
11831
11837
  clearTimeout(timer);
11832
11838
  setTimer(void 0);
@@ -11836,9 +11842,9 @@ function useDelay(options) {
11836
11842
  }
11837
11843
 
11838
11844
  // src/hooks/focus/useFocusManagement.ts
11839
- import { useCallback as useCallback16 } from "react";
11845
+ import { useCallback as useCallback17 } from "react";
11840
11846
  function useFocusManagement() {
11841
- const getFocusableElements = useCallback16(() => {
11847
+ const getFocusableElements = useCallback17(() => {
11842
11848
  return Array.from(
11843
11849
  document.querySelectorAll(
11844
11850
  'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
@@ -11847,7 +11853,7 @@ function useFocusManagement() {
11847
11853
  (el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
11848
11854
  );
11849
11855
  }, []);
11850
- const getNextFocusElement = useCallback16(() => {
11856
+ const getNextFocusElement = useCallback17(() => {
11851
11857
  const elements = getFocusableElements();
11852
11858
  if (elements.length === 0) {
11853
11859
  return void 0;
@@ -11859,11 +11865,11 @@ function useFocusManagement() {
11859
11865
  }
11860
11866
  return nextElement;
11861
11867
  }, [getFocusableElements]);
11862
- const focusNext = useCallback16(() => {
11868
+ const focusNext = useCallback17(() => {
11863
11869
  const nextElement = getNextFocusElement();
11864
11870
  nextElement?.focus();
11865
11871
  }, [getNextFocusElement]);
11866
- const getPreviousFocusElement = useCallback16(() => {
11872
+ const getPreviousFocusElement = useCallback17(() => {
11867
11873
  const elements = getFocusableElements();
11868
11874
  if (elements.length === 0) {
11869
11875
  return void 0;
@@ -11879,7 +11885,7 @@ function useFocusManagement() {
11879
11885
  }
11880
11886
  return previousElement;
11881
11887
  }, [getFocusableElements]);
11882
- const focusPrevious = useCallback16(() => {
11888
+ const focusPrevious = useCallback17(() => {
11883
11889
  const previousElement = getPreviousFocusElement();
11884
11890
  if (previousElement) previousElement.focus();
11885
11891
  }, [getPreviousFocusElement]);
@@ -11924,7 +11930,7 @@ var Input = forwardRef11(function Input2({
11924
11930
  restartTimer,
11925
11931
  clearTimer
11926
11932
  } = useDelay({ delay, disabled: !afterDelay });
11927
- const innerRef = useRef18(null);
11933
+ const innerRef = useRef19(null);
11928
11934
  useImperativeHandle7(forwardedRef, () => innerRef.current);
11929
11935
  const { focusNext } = useFocusManagement();
11930
11936
  return /* @__PURE__ */ jsx33(
@@ -11992,7 +11998,7 @@ import {
11992
11998
  } from "react";
11993
11999
 
11994
12000
  // src/components/user-interaction/select/SelectContext.tsx
11995
- import { createContext as createContext10, useCallback as useCallback17, useContext as useContext11, useEffect as useEffect19, useId as useId9, useMemo as useMemo15, useRef as useRef19, useState as useState19 } from "react";
12001
+ import { createContext as createContext10, useCallback as useCallback18, useContext as useContext11, useEffect as useEffect20, useId as useId9, useMemo as useMemo15, useRef as useRef20, useState as useState19 } from "react";
11996
12002
  import { jsx as jsx35 } from "react/jsx-runtime";
11997
12003
  var defaultToggleOpenOptions = {
11998
12004
  highlightStartPositionBehavior: "first"
@@ -12033,7 +12039,7 @@ var PrimitveSelectRoot = ({
12033
12039
  onValueChange: onValuesChange,
12034
12040
  defaultValue: initialValues ?? []
12035
12041
  });
12036
- const triggerRef = useRef19(null);
12042
+ const triggerRef = useRef20(null);
12037
12043
  const generatedId = useId9();
12038
12044
  const [ids, setIds] = useState19({
12039
12045
  trigger: id ?? (isMultiSelect ? "multi-select-" + generatedId : "select-" + generatedId),
@@ -12064,7 +12070,7 @@ var PrimitveSelectRoot = ({
12064
12070
  isMultiSelect,
12065
12071
  iconAppearance
12066
12072
  };
12067
- const registerItem = useCallback17((item) => {
12073
+ const registerItem = useCallback18((item) => {
12068
12074
  setInternalState((prev) => {
12069
12075
  const updatedOptions = [...prev.options, item];
12070
12076
  updatedOptions.sort((a, b) => {
@@ -12079,7 +12085,7 @@ var PrimitveSelectRoot = ({
12079
12085
  };
12080
12086
  });
12081
12087
  }, []);
12082
- const unregisterItem = useCallback17((value2) => {
12088
+ const unregisterItem = useCallback18((value2) => {
12083
12089
  setInternalState((prev) => {
12084
12090
  const updatedOptions = prev.options.filter((i) => i.value !== value2);
12085
12091
  return {
@@ -12128,10 +12134,10 @@ var PrimitveSelectRoot = ({
12128
12134
  highlightedValue: value2
12129
12135
  }));
12130
12136
  };
12131
- const registerTrigger = useCallback17((ref) => {
12137
+ const registerTrigger = useCallback18((ref) => {
12132
12138
  triggerRef.current = ref.current;
12133
12139
  }, []);
12134
- const unregisterTrigger = useCallback17(() => {
12140
+ const unregisterTrigger = useCallback18(() => {
12135
12141
  triggerRef.current = null;
12136
12142
  }, []);
12137
12143
  const toggleOpen = (isOpen, toggleOpenOptions) => {
@@ -12181,7 +12187,7 @@ var PrimitveSelectRoot = ({
12181
12187
  highlightedValue
12182
12188
  }));
12183
12189
  };
12184
- useEffect19(() => {
12190
+ useEffect20(() => {
12185
12191
  if (!internalState.highlightedValue) return;
12186
12192
  const highlighted = internalState.options.find((value2) => value2.value === internalState.highlightedValue);
12187
12193
  if (highlighted) {
@@ -12245,17 +12251,17 @@ var MultiSelectRoot = ({ value, onValueChange, initialValue, onEditComplete, ...
12245
12251
  };
12246
12252
 
12247
12253
  // src/components/user-interaction/select/SelectComponents.tsx
12248
- import { forwardRef as forwardRef13, useEffect as useEffect21, useImperativeHandle as useImperativeHandle9, useRef as useRef20 } from "react";
12254
+ import { forwardRef as forwardRef13, useEffect as useEffect22, useImperativeHandle as useImperativeHandle9, useRef as useRef21 } from "react";
12249
12255
  import clsx10 from "clsx";
12250
12256
  import { CheckIcon } from "lucide-react";
12251
12257
 
12252
12258
  // src/components/layout/popup/PopUp.tsx
12253
- import { forwardRef as forwardRef12, useCallback as useCallback18, useContext as useContext13, useImperativeHandle as useImperativeHandle8, useMemo as useMemo16 } from "react";
12259
+ import { forwardRef as forwardRef12, useCallback as useCallback19, useContext as useContext13, useImperativeHandle as useImperativeHandle8, useMemo as useMemo16 } from "react";
12254
12260
 
12255
12261
  // src/hooks/useOutsideClick.ts
12256
- import { useEffect as useEffect20 } from "react";
12262
+ import { useEffect as useEffect21 } from "react";
12257
12263
  var useOutsideClick = ({ refs, onOutsideClick, active = true }) => {
12258
- useEffect20(() => {
12264
+ useEffect21(() => {
12259
12265
  if (!active) return;
12260
12266
  const listener = (event) => {
12261
12267
  if (event.target === null) return;
@@ -12308,13 +12314,13 @@ var PopUp = forwardRef12(function PopUp2({
12308
12314
  useImperativeHandle8(forwardRef23, () => ref.current, [ref]);
12309
12315
  const onCloseStable = useEventCallbackStabilizer(onClose);
12310
12316
  const onOutsideClickStable = useEventCallbackStabilizer(onOutsideClick);
12311
- const onCloseWrapper = useCallback18(() => {
12317
+ const onCloseWrapper = useCallback19(() => {
12312
12318
  onCloseStable();
12313
12319
  context?.setIsOpen(false);
12314
12320
  }, [onCloseStable, context]);
12315
12321
  const { zIndex, isInFront } = useOverlayRegistry({ isActive: isOpen, tags: useMemo16(() => ["popup"], []) });
12316
12322
  useOutsideClick({
12317
- onOutsideClick: useCallback18((event) => {
12323
+ onOutsideClick: useCallback19((event) => {
12318
12324
  event.preventDefault();
12319
12325
  onCloseWrapper();
12320
12326
  onOutsideClickStable(event);
@@ -12356,10 +12362,10 @@ var SelectOption = forwardRef13(
12356
12362
  function SelectOption2({ children, value, disabled = false, iconAppearance, className, ...restProps }, ref) {
12357
12363
  const { state, config, item, trigger } = useSelectContext();
12358
12364
  const { register, unregister, toggleSelection, highlightItem } = item;
12359
- const itemRef = useRef20(null);
12365
+ const itemRef = useRef21(null);
12360
12366
  iconAppearance ??= config.iconAppearance;
12361
12367
  const label = children ?? value;
12362
- useEffect21(() => {
12368
+ useEffect22(() => {
12363
12369
  register({
12364
12370
  value,
12365
12371
  label,
@@ -12439,7 +12445,7 @@ var SelectButton = forwardRef13(function SelectButton2({
12439
12445
  const translation = useHightideTranslation();
12440
12446
  const { state, trigger, setIds, ids } = useSelectContext();
12441
12447
  const { register, unregister, toggleOpen } = trigger;
12442
- useEffect21(() => {
12448
+ useEffect22(() => {
12443
12449
  if (id) {
12444
12450
  setIds((prev) => ({
12445
12451
  ...prev,
@@ -12447,9 +12453,9 @@ var SelectButton = forwardRef13(function SelectButton2({
12447
12453
  }));
12448
12454
  }
12449
12455
  }, [id, setIds]);
12450
- const innerRef = useRef20(null);
12456
+ const innerRef = useRef21(null);
12451
12457
  useImperativeHandle9(ref, () => innerRef.current);
12452
- useEffect21(() => {
12458
+ useEffect22(() => {
12453
12459
  register(innerRef);
12454
12460
  return () => unregister();
12455
12461
  }, [register, unregister]);
@@ -12507,10 +12513,10 @@ var SelectContent = forwardRef13(function SelectContent2({
12507
12513
  options,
12508
12514
  ...props
12509
12515
  }, ref) {
12510
- const innerRef = useRef20(null);
12516
+ const innerRef = useRef21(null);
12511
12517
  useImperativeHandle9(ref, () => innerRef.current);
12512
12518
  const { trigger, state, config, item, ids, setIds } = useSelectContext();
12513
- useEffect21(() => {
12519
+ useEffect22(() => {
12514
12520
  if (id) {
12515
12521
  setIds((prev) => ({
12516
12522
  ...prev,
@@ -12655,7 +12661,7 @@ import { MonitorCog, MoonIcon, SunIcon } from "lucide-react";
12655
12661
  import clsx12 from "clsx";
12656
12662
 
12657
12663
  // src/global-contexts/ThemeContext.tsx
12658
- import { createContext as createContext12, useCallback as useCallback19, useContext as useContext14, useEffect as useEffect22, useMemo as useMemo17, useState as useState20 } from "react";
12664
+ import { createContext as createContext12, useCallback as useCallback20, useContext as useContext14, useEffect as useEffect23, useMemo as useMemo17, useState as useState20 } from "react";
12659
12665
  import { jsx as jsx40 } from "react/jsx-runtime";
12660
12666
  var themes = ["light", "dark", "system"];
12661
12667
  var ThemeUtil = {
@@ -12682,7 +12688,7 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
12682
12688
  }
12683
12689
  return initialTheme ?? config.theme.initialTheme;
12684
12690
  }, [config.theme.initialTheme, initialTheme, storedTheme, theme, themePreference]);
12685
- useEffect22(() => {
12691
+ useEffect23(() => {
12686
12692
  if (!theme) return;
12687
12693
  if (theme === "system") {
12688
12694
  deleteStoredTheme();
@@ -12690,18 +12696,18 @@ var ThemeProvider = ({ children, theme, initialTheme }) => {
12690
12696
  setStoredTheme(theme);
12691
12697
  }
12692
12698
  }, [theme, deleteStoredTheme, setStoredTheme]);
12693
- useEffect22(() => {
12699
+ useEffect23(() => {
12694
12700
  document.documentElement.setAttribute("data-theme", resolvedTheme);
12695
12701
  }, [resolvedTheme]);
12696
- const getPreference = useCallback19(() => {
12702
+ const getPreference = useCallback20(() => {
12697
12703
  const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
12698
12704
  const prefersLight = window.matchMedia("(prefers-color-scheme: light)").matches;
12699
12705
  setThemePreference(prefersDark ? "dark" : prefersLight ? "light" : "system");
12700
12706
  }, []);
12701
- useEffect22(() => {
12707
+ useEffect23(() => {
12702
12708
  getPreference();
12703
12709
  }, [getPreference]);
12704
- useEffect22(() => {
12710
+ useEffect23(() => {
12705
12711
  const darkQuery = window.matchMedia("(prefers-color-scheme: dark)");
12706
12712
  const lightQuery = window.matchMedia("(prefers-color-scheme: light)");
12707
12713
  const noPrefQuery = window.matchMedia("(prefers-color-scheme: no-preference)");
@@ -12804,7 +12810,7 @@ var ThemeDialog = ({
12804
12810
  import { forwardRef as forwardRef16 } from "react";
12805
12811
 
12806
12812
  // src/components/layout/drawer/DrawerContent.tsx
12807
- import { forwardRef as forwardRef15, useId as useId10, useImperativeHandle as useImperativeHandle10, useMemo as useMemo18, useRef as useRef21 } from "react";
12813
+ import { forwardRef as forwardRef15, useId as useId10, useImperativeHandle as useImperativeHandle10, useMemo as useMemo18, useRef as useRef22 } from "react";
12808
12814
 
12809
12815
  // src/components/layout/drawer/DrawerContext.tsx
12810
12816
  import { createContext as createContext13, useContext as useContext15 } from "react";
@@ -12834,7 +12840,7 @@ var DrawerContent = forwardRef15(function DrawerContent2({
12834
12840
  background: `dialog-background-${generatedId}`,
12835
12841
  content: props.id ?? `dialog-content-${generatedId}`
12836
12842
  }), [generatedId, props.id]);
12837
- const ref = useRef21(null);
12843
+ const ref = useRef22(null);
12838
12844
  useImperativeHandle10(forwardedRef, () => ref.current, [ref]);
12839
12845
  const { isVisible, transitionState } = useTransitionState({ isOpen, ref });
12840
12846
  useFocusTrap({
@@ -13082,8 +13088,8 @@ var BreadCrumbs = ({ crumbs }) => {
13082
13088
  // src/components/layout/navigation/Navigation.tsx
13083
13089
  var import_link2 = __toESM(require_link2());
13084
13090
  import { Menu as MenuIcon, XIcon } from "lucide-react";
13085
- import { useEffect as useEffect23 } from "react";
13086
- import { useCallback as useCallback20, useId as useId11, useRef as useRef22, useState as useState22 } from "react";
13091
+ import { useEffect as useEffect24 } from "react";
13092
+ import { useCallback as useCallback21, useId as useId11, useRef as useRef23, useState as useState22 } from "react";
13087
13093
  import clsx17 from "clsx";
13088
13094
  import { Fragment as Fragment5, jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
13089
13095
  function isSubItem(item) {
@@ -13096,8 +13102,8 @@ var NavigationItemWithSubItem = ({
13096
13102
  ...options
13097
13103
  }) => {
13098
13104
  const [isOpen, setOpen] = useState22(false);
13099
- const containerRef = useRef22(null);
13100
- const triggerRef = useRef22(null);
13105
+ const containerRef = useRef23(null);
13106
+ const triggerRef = useRef23(null);
13101
13107
  const id = useId11();
13102
13108
  const style = useAnchoredPosition({
13103
13109
  active: isOpen,
@@ -13106,7 +13112,7 @@ var NavigationItemWithSubItem = ({
13106
13112
  horizontalAlignment,
13107
13113
  ...options
13108
13114
  });
13109
- const onBlur = useCallback20((event) => {
13115
+ const onBlur = useCallback21((event) => {
13110
13116
  const nextFocus = event.relatedTarget;
13111
13117
  if (!containerRef.current?.contains(nextFocus) && !triggerRef.current?.contains(nextFocus)) {
13112
13118
  setOpen(false);
@@ -13174,8 +13180,8 @@ var Navigation = ({ ...props }) => {
13174
13180
  const translation = useHightideTranslation();
13175
13181
  const [isMobileOpen, setIsMobileOpen] = useState22(false);
13176
13182
  const id = useId11();
13177
- const menuRef = useRef22(null);
13178
- useEffect23(() => {
13183
+ const menuRef = useRef23(null);
13184
+ useEffect24(() => {
13179
13185
  menuRef.current?.focus();
13180
13186
  }, [isMobileOpen]);
13181
13187
  const { zIndex } = useOverlayRegistry({ isActive: isMobileOpen });
@@ -13243,7 +13249,7 @@ var Navigation = ({ ...props }) => {
13243
13249
  // src/components/layout/navigation/Pagination.tsx
13244
13250
  import { ChevronFirst, ChevronLast, ChevronLeft as ChevronLeft2, ChevronRight as ChevronRight2 } from "lucide-react";
13245
13251
  import clsx18 from "clsx";
13246
- import { useEffect as useEffect24, useState as useState23 } from "react";
13252
+ import { useEffect as useEffect25, useState as useState23 } from "react";
13247
13253
  import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
13248
13254
  var Pagination = ({
13249
13255
  pageIndex,
@@ -13256,7 +13262,7 @@ var Pagination = ({
13256
13262
  const noPages = pageCount === 0;
13257
13263
  const onFirstPage = pageIndex === 0 && !noPages;
13258
13264
  const onLastPage = pageIndex === pageCount - 1;
13259
- useEffect24(() => {
13265
+ useEffect25(() => {
13260
13266
  if (noPages) {
13261
13267
  setValue("0");
13262
13268
  } else {
@@ -13450,12 +13456,12 @@ var StepperBar = ({
13450
13456
  };
13451
13457
 
13452
13458
  // src/components/layout/popup/PopUpOpener.tsx
13453
- import { useEffect as useEffect25, useMemo as useMemo19, useRef as useRef23 } from "react";
13459
+ import { useEffect as useEffect26, useMemo as useMemo19, useRef as useRef24 } from "react";
13454
13460
  function PopUpOpener({ children }) {
13455
13461
  const context = usePopUpContext();
13456
13462
  const { setTriggerRef } = context;
13457
- const ref = useRef23(null);
13458
- useEffect25(() => {
13463
+ const ref = useRef24(null);
13464
+ useEffect26(() => {
13459
13465
  setTriggerRef(ref);
13460
13466
  return () => {
13461
13467
  setTriggerRef(null);
@@ -13686,7 +13692,7 @@ var FillerCell = ({ ...props }) => {
13686
13692
  };
13687
13693
 
13688
13694
  // src/components/layout/table/TableProvider.tsx
13689
- import { useCallback as useCallback21, useEffect as useEffect26, useLayoutEffect as useLayoutEffect6, useMemo as useMemo21, useRef as useRef24, useState as useState25 } from "react";
13695
+ import { useCallback as useCallback22, useEffect as useEffect27, useLayoutEffect as useLayoutEffect6, useMemo as useMemo21, useRef as useRef25, useState as useState25 } from "react";
13690
13696
 
13691
13697
  // src/components/layout/table/TableContext.tsx
13692
13698
  import { createContext as createContext14, useContext as useContext16 } from "react";
@@ -14086,7 +14092,7 @@ var TableProvider = ({
14086
14092
  const onRowClickStable = useEventCallbackStabilizer(onRowClick);
14087
14093
  const onFillerRowClickStable = useEventCallbackStabilizer(onFillerRowClick);
14088
14094
  const [registeredColumns, setRegisteredColumns] = useState25([]);
14089
- const containerRef = useRef24(null);
14095
+ const containerRef = useRef25(null);
14090
14096
  const [, setTableState] = useState25({
14091
14097
  columnSizing: {},
14092
14098
  columnOrder: [],
@@ -14117,11 +14123,11 @@ var TableProvider = ({
14117
14123
  const width = containerRef.current?.getBoundingClientRect().width;
14118
14124
  setTargetWidth(width !== void 0 ? Math.floor(width) : void 0);
14119
14125
  }, [containerRef]);
14120
- useWindowResizeObserver(useCallback21(() => {
14126
+ useWindowResizeObserver(useCallback22(() => {
14121
14127
  const width = containerRef.current?.getBoundingClientRect().width;
14122
14128
  setTargetWidth(width !== void 0 ? Math.floor(width) : void 0);
14123
14129
  }, [containerRef]));
14124
- const registerColumn = useCallback21((column) => {
14130
+ const registerColumn = useCallback22((column) => {
14125
14131
  setRegisteredColumns((prev) => {
14126
14132
  return [...prev, column];
14127
14133
  });
@@ -14148,7 +14154,7 @@ var TableProvider = ({
14148
14154
  defaultColumn: {
14149
14155
  minSize: 60,
14150
14156
  maxSize: 800,
14151
- cell: useCallback21(({ cell }) => {
14157
+ cell: useCallback22(({ cell }) => {
14152
14158
  return /* @__PURE__ */ jsx57(TableCell, { children: String(cell.getValue()) });
14153
14159
  }, []),
14154
14160
  enableResizing: true,
@@ -14189,7 +14195,7 @@ var TableProvider = ({
14189
14195
  });
14190
14196
  const pagination = table.getState().pagination;
14191
14197
  const pageCount = table.getPageCount();
14192
- useEffect26(() => {
14198
+ useEffect27(() => {
14193
14199
  if (pageCount === -1) {
14194
14200
  return;
14195
14201
  }
@@ -14197,13 +14203,13 @@ var TableProvider = ({
14197
14203
  table.setPageIndex(pageCount - 1);
14198
14204
  }
14199
14205
  }, [table, pagination.pageIndex, pageCount]);
14200
- useEffect26(() => {
14206
+ useEffect27(() => {
14201
14207
  table.setColumnOrder((prev) => [...prev]);
14202
14208
  }, [table, columns]);
14203
14209
  const columnVisibility = table.getState().columnVisibility;
14204
14210
  const columnOrder = table.getState().columnOrder;
14205
14211
  const columnPinning = table.getState().columnPinning;
14206
- useEffect26(() => {
14212
+ useEffect27(() => {
14207
14213
  table.setColumnSizing((prev) => ({ ...prev }));
14208
14214
  }, [table, targetWidth, columnVisibility, columnOrder, columnPinning]);
14209
14215
  const tableColumnDefinitionContextValue = useMemo21(() => ({
@@ -14374,10 +14380,10 @@ var TableSortButton = ({
14374
14380
 
14375
14381
  // src/components/layout/table/TableFilterButton.tsx
14376
14382
  import { FilterIcon } from "lucide-react";
14377
- import { useEffect as useEffect31, useId as useId15, useMemo as useMemo26, useRef as useRef29, useState as useState30 } from "react";
14383
+ import { useEffect as useEffect32, useId as useId15, useMemo as useMemo26, useRef as useRef30, useState as useState30 } from "react";
14378
14384
 
14379
14385
  // src/components/user-interaction/input/DateTimeInput.tsx
14380
- import { forwardRef as forwardRef17, useCallback as useCallback24, useEffect as useEffect30, useId as useId13, useImperativeHandle as useImperativeHandle11, useMemo as useMemo24, useRef as useRef28, useState as useState28 } from "react";
14386
+ import { forwardRef as forwardRef17, useCallback as useCallback25, useEffect as useEffect31, useId as useId13, useImperativeHandle as useImperativeHandle11, useMemo as useMemo24, useRef as useRef29, useState as useState28 } from "react";
14381
14387
  import { CalendarIcon } from "lucide-react";
14382
14388
  import clsx25 from "clsx";
14383
14389
 
@@ -14555,7 +14561,7 @@ var DateUtils = {
14555
14561
  import clsx24 from "clsx";
14556
14562
 
14557
14563
  // src/components/user-interaction/date/TimePicker.tsx
14558
- import { useEffect as useEffect27, useRef as useRef25 } from "react";
14564
+ import { useEffect as useEffect28, useRef as useRef26 } from "react";
14559
14565
  import { jsx as jsx60, jsxs as jsxs30 } from "react/jsx-runtime";
14560
14566
  var TimePicker = ({
14561
14567
  value: controlledValue,
@@ -14571,8 +14577,8 @@ var TimePicker = ({
14571
14577
  onValueChange,
14572
14578
  defaultValue: initialValue
14573
14579
  });
14574
- const minuteRef = useRef25(null);
14575
- const hourRef = useRef25(null);
14580
+ const minuteRef = useRef26(null);
14581
+ const hourRef = useRef26(null);
14576
14582
  const isPM = value.getHours() > 11;
14577
14583
  const hours = is24HourFormat ? range(24) : range(12);
14578
14584
  let minutes = range(60);
@@ -14592,13 +14598,13 @@ var TimePicker = ({
14592
14598
  }
14593
14599
  const closestMinute = closestMatch(minutes, (item1, item2) => Math.abs(item1 - value.getMinutes()) < Math.abs(item2 - value.getMinutes()));
14594
14600
  const hour = value.getHours();
14595
- useEffect27(() => {
14601
+ useEffect28(() => {
14596
14602
  minuteRef.current?.scrollIntoView({
14597
14603
  behavior: "smooth",
14598
14604
  block: "nearest"
14599
14605
  });
14600
14606
  }, [closestMinute]);
14601
- useEffect27(() => {
14607
+ useEffect28(() => {
14602
14608
  hourRef.current?.scrollIntoView({
14603
14609
  behavior: "smooth",
14604
14610
  block: "nearest"
@@ -14672,7 +14678,7 @@ import { ArrowDown, ArrowUp, Calendar, ChevronDown as ChevronDown4 } from "lucid
14672
14678
  import clsx23 from "clsx";
14673
14679
 
14674
14680
  // src/components/user-interaction/date/DayPicker.tsx
14675
- import { useCallback as useCallback22, useEffect as useEffect28, useMemo as useMemo22, useRef as useRef26 } from "react";
14681
+ import { useCallback as useCallback23, useEffect as useEffect29, useMemo as useMemo22, useRef as useRef27 } from "react";
14676
14682
  import { jsx as jsx61, jsxs as jsxs31 } from "react/jsx-runtime";
14677
14683
  var DayPicker = ({
14678
14684
  displayedMonth: controlledDisplayedMonth,
@@ -14701,17 +14707,17 @@ var DayPicker = ({
14701
14707
  });
14702
14708
  const month = displayedMonth.getMonth();
14703
14709
  const weeks = getWeeksForCalenderMonth(displayedMonth, weekStart);
14704
- const selectedButtonRef = useRef26(null);
14710
+ const selectedButtonRef = useRef27(null);
14705
14711
  const isValueInDisplayedWeeks = useMemo22(
14706
14712
  () => !!value && weeks.some((week) => week.some((d) => DateUtils.equalDate(value, d))),
14707
14713
  [value, weeks]
14708
14714
  );
14709
- const firstDayOfMonth = useCallback22(
14715
+ const firstDayOfMonth = useCallback23(
14710
14716
  (date) => new Date(date.getFullYear(), date.getMonth(), 1),
14711
14717
  []
14712
14718
  );
14713
14719
  const focusTargetDate = value && isValueInDisplayedWeeks ? value : firstDayOfMonth(displayedMonth);
14714
- useEffect28(() => {
14720
+ useEffect29(() => {
14715
14721
  selectedButtonRef.current?.focus();
14716
14722
  }, [focusTargetDate]);
14717
14723
  const end = useMemo22(() => {
@@ -14722,12 +14728,12 @@ var DayPicker = ({
14722
14728
  if (!providedStart) return;
14723
14729
  return new Date(providedStart.getFullYear(), providedStart.getMonth(), providedStart.getDate());
14724
14730
  }, [providedStart]);
14725
- const clampToRange = useCallback22((date) => {
14731
+ const clampToRange = useCallback23((date) => {
14726
14732
  if (start && date < start) return start;
14727
14733
  if (end && date > end) return end;
14728
14734
  return date;
14729
14735
  }, [start, end]);
14730
- const navigateTo = useCallback22((candidate) => {
14736
+ const navigateTo = useCallback23((candidate) => {
14731
14737
  const clamped = clampToRange(candidate);
14732
14738
  if (!isInTimeSpan(clamped, start, end)) return;
14733
14739
  setValue(clamped);
@@ -14736,7 +14742,7 @@ var DayPicker = ({
14736
14742
  setDisplayedMonth(firstDayOfMonth(clamped));
14737
14743
  }
14738
14744
  }, [clampToRange, start, end, setValue, onEditComplete, displayedMonth, setDisplayedMonth, firstDayOfMonth]);
14739
- const onKeyDown = useCallback22(
14745
+ const onKeyDown = useCallback23(
14740
14746
  (event) => {
14741
14747
  PropsUtil.aria.navigate({
14742
14748
  left: () => focusTargetDate && navigateTo(subtractDuration(focusTargetDate, { days: 1 })),
@@ -14792,7 +14798,7 @@ var DayPicker = ({
14792
14798
  };
14793
14799
 
14794
14800
  // src/components/user-interaction/date/YearMonthPicker.tsx
14795
- import { memo, useCallback as useCallback23, useEffect as useEffect29, useMemo as useMemo23, useRef as useRef27, useState as useState26 } from "react";
14801
+ import { memo, useCallback as useCallback24, useEffect as useEffect30, useMemo as useMemo23, useRef as useRef28, useState as useState26 } from "react";
14796
14802
  import clsx22 from "clsx";
14797
14803
  import { jsx as jsx62, jsxs as jsxs32 } from "react/jsx-runtime";
14798
14804
  var YearRow = memo(function YearRow2({
@@ -14803,10 +14809,10 @@ var YearRow = memo(function YearRow2({
14803
14809
  monthNames,
14804
14810
  onSelect
14805
14811
  }) {
14806
- const ref = useRef27(null);
14812
+ const ref = useRef28(null);
14807
14813
  const isSelectedYear = selectedMonthIndex !== void 0;
14808
14814
  const [isExpanded, setIsExpanded] = useState26(false);
14809
- useEffect29(() => {
14815
+ useEffect30(() => {
14810
14816
  if (isSelectedYear) {
14811
14817
  ref.current?.scrollIntoView({ behavior: "smooth", block: "nearest" });
14812
14818
  }
@@ -14882,7 +14888,7 @@ var YearMonthPicker = ({
14882
14888
  if (!end) return;
14883
14889
  return new Date(end.getFullYear(), end.getMonth() + 1, 0).getTime();
14884
14890
  }, [end]);
14885
- const handleSelect = useCallback23((newDate) => {
14891
+ const handleSelect = useCallback24((newDate) => {
14886
14892
  setValue(newDate);
14887
14893
  onEditCompleteStable(newDate);
14888
14894
  }, [onEditCompleteStable, setValue]);
@@ -15201,10 +15207,10 @@ var DateTimeInput = forwardRef17(function DateTimeInput2({
15201
15207
  defaultValue: initialValue
15202
15208
  });
15203
15209
  const [dialogValue, setDialogValue] = useState28(state ?? /* @__PURE__ */ new Date());
15204
- useEffect30(() => {
15210
+ useEffect31(() => {
15205
15211
  setDialogValue(state ?? /* @__PURE__ */ new Date());
15206
15212
  }, [state]);
15207
- const changeOpenWrapper = useCallback24((isOpen2) => {
15213
+ const changeOpenWrapper = useCallback25((isOpen2) => {
15208
15214
  onDialogOpeningChange?.(isOpen2);
15209
15215
  setIsOpen(isOpen2);
15210
15216
  }, [onDialogOpeningChange]);
@@ -15214,9 +15220,9 @@ var DateTimeInput = forwardRef17(function DateTimeInput2({
15214
15220
  popup: `date-time-input-popup-${id}`,
15215
15221
  label: `date-time-input-label-${id}`
15216
15222
  }), [id]);
15217
- const innerRef = useRef28(null);
15223
+ const innerRef = useRef29(null);
15218
15224
  useImperativeHandle11(forwardedRef, () => innerRef.current);
15219
- useEffect30(() => {
15225
+ useEffect31(() => {
15220
15226
  if (readOnly || disabled) {
15221
15227
  changeOpenWrapper(false);
15222
15228
  }
@@ -15342,7 +15348,7 @@ import {
15342
15348
 
15343
15349
  // src/components/user-interaction/Checkbox.tsx
15344
15350
  import { Check as Check2, Minus as Minus2 } from "lucide-react";
15345
- import { useCallback as useCallback25 } from "react";
15351
+ import { useCallback as useCallback26 } from "react";
15346
15352
  import { jsx as jsx68, jsxs as jsxs38 } from "react/jsx-runtime";
15347
15353
  var Checkbox = ({
15348
15354
  value: controlledValue,
@@ -15360,7 +15366,7 @@ var Checkbox = ({
15360
15366
  }) => {
15361
15367
  const onEditCompleteStable = useEventCallbackStabilizer(onEditComplete);
15362
15368
  const onValueChangeStable = useEventCallbackStabilizer(onValueChange);
15363
- const onChangeWrapper = useCallback25((value2) => {
15369
+ const onChangeWrapper = useCallback26((value2) => {
15364
15370
  onValueChangeStable(value2);
15365
15371
  onEditCompleteStable(value2);
15366
15372
  }, [onValueChangeStable, onEditCompleteStable]);
@@ -15376,16 +15382,16 @@ var Checkbox = ({
15376
15382
  onClick: (event) => {
15377
15383
  if (!disabled) {
15378
15384
  setValue((prev) => !prev);
15379
- props.onClick?.(event);
15380
15385
  }
15386
+ props.onClick?.(event);
15381
15387
  },
15382
15388
  onKeyDown: (event) => {
15383
15389
  if (disabled) return;
15384
15390
  if (event.key === " " || event.key === "Enter") {
15385
15391
  event.preventDefault();
15386
15392
  setValue((prev) => !prev);
15387
- props.onKeyDown?.(event);
15388
15393
  }
15394
+ props.onKeyDown?.(event);
15389
15395
  },
15390
15396
  "data-checked": !indeterminate ? value : "indeterminate",
15391
15397
  "data-size": size ?? void 0,
@@ -16145,8 +16151,8 @@ var TableFilterButton = ({
16145
16151
  const columnFilterValue = column.getFilterValue();
16146
16152
  const [filterValue, setFilterValue] = useState30(columnFilterValue);
16147
16153
  const hasFilter = !!filterValue;
16148
- const anchorRef = useRef29(null);
16149
- const containerRef = useRef29(null);
16154
+ const anchorRef = useRef30(null);
16155
+ const containerRef = useRef30(null);
16150
16156
  const [isOpen, setIsOpen] = useState30(false);
16151
16157
  const id = useId15();
16152
16158
  const ids = useMemo26(() => ({
@@ -16154,7 +16160,7 @@ var TableFilterButton = ({
16154
16160
  popup: `table-filter-popup-${id}`,
16155
16161
  label: `table-filter-label-${id}`
16156
16162
  }), [id]);
16157
- useEffect31(() => {
16163
+ useEffect32(() => {
16158
16164
  setFilterValue(columnFilterValue);
16159
16165
  }, [columnFilterValue]);
16160
16166
  const isTagsFilter = filterType === "multiTags" || filterType === "singleTag";
@@ -16229,11 +16235,11 @@ var TableFilterButton = ({
16229
16235
  };
16230
16236
 
16231
16237
  // src/components/layout/table/TableHeader.tsx
16232
- import { useCallback as useCallback26, useEffect as useEffect32 } from "react";
16238
+ import { useCallback as useCallback27, useEffect as useEffect33 } from "react";
16233
16239
  import { Fragment as Fragment9, jsx as jsx71, jsxs as jsxs41 } from "react/jsx-runtime";
16234
16240
  var TableHeader = ({ isSticky = false }) => {
16235
16241
  const { table } = useTableStateWithoutSizingContext();
16236
- const handleResizeMove = useCallback26((e) => {
16242
+ const handleResizeMove = useCallback27((e) => {
16237
16243
  if (!table.getState().columnSizingInfo.isResizingColumn) return;
16238
16244
  const currentX = "touches" in e ? e.touches[0].clientX : e.clientX;
16239
16245
  const deltaOffset = currentX - (table.getState().columnSizingInfo.startOffset ?? 0);
@@ -16249,7 +16255,7 @@ var TableHeader = ({ isSticky = false }) => {
16249
16255
  deltaOffset
16250
16256
  }));
16251
16257
  }, [table]);
16252
- const handleResizeEnd = useCallback26(() => {
16258
+ const handleResizeEnd = useCallback27(() => {
16253
16259
  if (!table.getState().columnSizingInfo.isResizingColumn) return;
16254
16260
  const newWidth = (table.getState().columnSizingInfo.startSize ?? 0) + (table.getState().columnSizingInfo.deltaOffset ?? 0);
16255
16261
  table.setColumnSizing((prev) => {
@@ -16267,7 +16273,7 @@ var TableHeader = ({ isSticky = false }) => {
16267
16273
  startSize: null
16268
16274
  });
16269
16275
  }, [table]);
16270
- useEffect32(() => {
16276
+ useEffect33(() => {
16271
16277
  window.addEventListener("pointermove", handleResizeMove);
16272
16278
  window.addEventListener("pointerup", handleResizeEnd);
16273
16279
  return () => {
@@ -16436,7 +16442,7 @@ var TablePagination = ({ allowChangingPageSize = true, pageSizeOptions, ...props
16436
16442
  };
16437
16443
 
16438
16444
  // src/components/layout/table/TableWithSelectionProvider.tsx
16439
- import { useCallback as useCallback27, useMemo as useMemo27 } from "react";
16445
+ import { useCallback as useCallback28, useMemo as useMemo27 } from "react";
16440
16446
  import { jsx as jsx74 } from "react/jsx-runtime";
16441
16447
  var TableWithSelectionProvider = ({
16442
16448
  children,
@@ -16492,7 +16498,7 @@ var TableWithSelectionProvider = ({
16492
16498
  TableProvider,
16493
16499
  {
16494
16500
  ...props,
16495
- fillerRowCell: useCallback27((columnId, table) => {
16501
+ fillerRowCell: useCallback28((columnId, table) => {
16496
16502
  if (columnId === selectionRowId) {
16497
16503
  return /* @__PURE__ */ jsx74(Checkbox, { value: false, disabled: true });
16498
16504
  }
@@ -16510,7 +16516,7 @@ var TableWithSelectionProvider = ({
16510
16516
  rowSelection,
16511
16517
  ...state
16512
16518
  },
16513
- onRowClick: useCallback27((row, table) => {
16519
+ onRowClick: useCallback28((row, table) => {
16514
16520
  if (!disableClickRowClickSelection) {
16515
16521
  row.toggleSelected();
16516
16522
  }
@@ -16552,7 +16558,7 @@ var TableWithSelection = ({
16552
16558
  };
16553
16559
 
16554
16560
  // src/components/layout/table/TableColumn.tsx
16555
- import { memo as memo2, useEffect as useEffect33, useMemo as useMemo28, useState as useState31 } from "react";
16561
+ import { memo as memo2, useEffect as useEffect34, useMemo as useMemo28, useState as useState31 } from "react";
16556
16562
  import { jsx as jsx76 } from "react/jsx-runtime";
16557
16563
  var TableColumnComponent = ({
16558
16564
  filterType,
@@ -16568,7 +16574,7 @@ var TableColumnComponent = ({
16568
16574
  ...props,
16569
16575
  filterFn
16570
16576
  });
16571
- useEffect33(() => {
16577
+ useEffect34(() => {
16572
16578
  const unsubscribe = registerColumn(column);
16573
16579
  return () => {
16574
16580
  unsubscribe();
@@ -16588,13 +16594,13 @@ var TableColumn = (props) => {
16588
16594
  };
16589
16595
 
16590
16596
  // src/components/layout/table/TableColumnSwitcher.tsx
16591
- import { useMemo as useMemo29, useRef as useRef30, useId as useId16 } from "react";
16597
+ import { useMemo as useMemo29, useRef as useRef31, useId as useId16 } from "react";
16592
16598
  import { ChevronUp as ChevronUp3, ChevronDown as ChevronDown5, ChevronLeft as ChevronLeft5, ChevronRight as ChevronRight5, Eye, EyeOff, Pin, PinOff, ArrowLeftRightIcon } from "lucide-react";
16593
16599
  import { Fragment as Fragment10, jsx as jsx77, jsxs as jsxs45 } from "react/jsx-runtime";
16594
16600
  var TableColumnSwitcherPopUp = ({ ...props }) => {
16595
16601
  const { table } = useTableStateWithoutSizingContext();
16596
16602
  const translation = useHightideTranslation();
16597
- const containerRef = useRef30(null);
16603
+ const containerRef = useRef31(null);
16598
16604
  const generatedId = useId16();
16599
16605
  const ids = useMemo29(() => ({
16600
16606
  popup: props.id ?? `table-column-picker-popup-${generatedId}`,
@@ -16933,7 +16939,7 @@ var CopyToClipboardWrapper = ({
16933
16939
  };
16934
16940
 
16935
16941
  // src/components/user-interaction/Menu.tsx
16936
- import { useCallback as useCallback28, useRef as useRef31, useState as useState33 } from "react";
16942
+ import { useCallback as useCallback29, useRef as useRef32, useState as useState33 } from "react";
16937
16943
  import clsx30 from "clsx";
16938
16944
  import { Fragment as Fragment11, jsx as jsx79, jsxs as jsxs47 } from "react/jsx-runtime";
16939
16945
  var MenuItem = ({
@@ -16959,7 +16965,7 @@ var Menu = ({
16959
16965
  disabled = false,
16960
16966
  ...props
16961
16967
  }) => {
16962
- const triggerRef = useRef31(null);
16968
+ const triggerRef = useRef32(null);
16963
16969
  const [isOpen, setIsOpen] = useState33(false);
16964
16970
  const bag = {
16965
16971
  isOpen,
@@ -16968,7 +16974,7 @@ var Menu = ({
16968
16974
  disabled
16969
16975
  };
16970
16976
  return /* @__PURE__ */ jsxs47(Fragment11, { children: [
16971
- trigger(bag, useCallback28((el) => triggerRef.current = el, [])),
16977
+ trigger(bag, useCallback29((el) => triggerRef.current = el, [])),
16972
16978
  /* @__PURE__ */ jsx79(
16973
16979
  PopUp,
16974
16980
  {
@@ -16990,7 +16996,7 @@ var Menu = ({
16990
16996
  };
16991
16997
 
16992
16998
  // src/components/user-interaction/ScrollPicker.tsx
16993
- import { useCallback as useCallback29, useEffect as useEffect34, useState as useState34 } from "react";
16999
+ import { useCallback as useCallback30, useEffect as useEffect35, useState as useState34 } from "react";
16994
17000
  import clsx31 from "clsx";
16995
17001
  import { jsx as jsx80, jsxs as jsxs48 } from "react/jsx-runtime";
16996
17002
  var up = 1;
@@ -17027,7 +17033,7 @@ var ScrollPicker = ({
17027
17033
  const itemHeight = 40;
17028
17034
  const distance = 8;
17029
17035
  const containerHeight = itemHeight * (itemsShownCount - 2) + distance * (itemsShownCount - 2 + 1);
17030
- const getDirection = useCallback29((targetIndex, currentIndex2, transition2, length) => {
17036
+ const getDirection = useCallback30((targetIndex, currentIndex2, transition2, length) => {
17031
17037
  if (targetIndex === currentIndex2) {
17032
17038
  return transition2 > 0 ? up : down;
17033
17039
  }
@@ -17037,7 +17043,7 @@ var ScrollPicker = ({
17037
17043
  }
17038
17044
  return distanceForward >= length / 2 ? down : up;
17039
17045
  }, []);
17040
- const animate = useCallback29((timestamp, startTime) => {
17046
+ const animate = useCallback30((timestamp, startTime) => {
17041
17047
  setAnimation((prevState) => {
17042
17048
  const {
17043
17049
  targetIndex,
@@ -17110,7 +17116,7 @@ var ScrollPicker = ({
17110
17116
  };
17111
17117
  });
17112
17118
  }, [disabled, getDirection, onChange]);
17113
- useEffect34(() => {
17119
+ useEffect35(() => {
17114
17120
  requestAnimationFrame((timestamp) => animate(timestamp, lastTimeStamp));
17115
17121
  });
17116
17122
  const opacity = (transition2, index, itemsCount) => {
@@ -17188,7 +17194,7 @@ var ScrollPicker = ({
17188
17194
  };
17189
17195
 
17190
17196
  // src/components/user-interaction/Switch.tsx
17191
- import { useCallback as useCallback30 } from "react";
17197
+ import { useCallback as useCallback31 } from "react";
17192
17198
  import { jsx as jsx81 } from "react/jsx-runtime";
17193
17199
  var Switch = ({
17194
17200
  value: controlledValue,
@@ -17203,7 +17209,7 @@ var Switch = ({
17203
17209
  }) => {
17204
17210
  const onEditCompleteStable = useEventCallbackStabilizer(onEditComplete);
17205
17211
  const onValueChangeStable = useEventCallbackStabilizer(onValueChange);
17206
- const onChangeWrapper = useCallback30((value2) => {
17212
+ const onChangeWrapper = useCallback31((value2) => {
17207
17213
  onValueChangeStable(!value2);
17208
17214
  onEditCompleteStable(!value2);
17209
17215
  }, [onValueChangeStable, onEditCompleteStable]);
@@ -17243,7 +17249,7 @@ var Switch = ({
17243
17249
  };
17244
17250
 
17245
17251
  // src/components/user-interaction/Textarea.tsx
17246
- import { forwardRef as forwardRef19, useCallback as useCallback31, useId as useId17 } from "react";
17252
+ import { forwardRef as forwardRef19, useCallback as useCallback32, useId as useId17 } from "react";
17247
17253
  import clsx32 from "clsx";
17248
17254
  import { jsx as jsx82, jsxs as jsxs49 } from "react/jsx-runtime";
17249
17255
  var Textarea = forwardRef19(function Textarea2({
@@ -17262,7 +17268,7 @@ var Textarea = forwardRef19(function Textarea2({
17262
17268
  });
17263
17269
  const { restartTimer, clearTimer } = useDelay(saveDelayOptions);
17264
17270
  const onEditCompleteStable = useEventCallbackStabilizer(onEditComplete);
17265
- const onEditCompleteWrapper = useCallback31((text) => {
17271
+ const onEditCompleteWrapper = useCallback32((text) => {
17266
17272
  onEditCompleteStable(text);
17267
17273
  clearTimer();
17268
17274
  }, [onEditCompleteStable, clearTimer]);
@@ -17480,7 +17486,7 @@ var SearchBar = ({
17480
17486
  };
17481
17487
 
17482
17488
  // src/components/user-interaction/input/ToggleableInput.tsx
17483
- import { forwardRef as forwardRef21, useEffect as useEffect35, useImperativeHandle as useImperativeHandle12, useRef as useRef32, useState as useState36 } from "react";
17489
+ import { forwardRef as forwardRef21, useEffect as useEffect36, useImperativeHandle as useImperativeHandle12, useRef as useRef33, useState as useState36 } from "react";
17484
17490
  import { Pencil } from "lucide-react";
17485
17491
  import clsx35 from "clsx";
17486
17492
  import { jsx as jsx86, jsxs as jsxs52 } from "react/jsx-runtime";
@@ -17498,9 +17504,9 @@ var ToggleableInput = forwardRef21(function ToggleableInput2({
17498
17504
  defaultValue: initialValue
17499
17505
  });
17500
17506
  const [isEditing, setIsEditing] = useState36(initialState !== "display");
17501
- const innerRef = useRef32(null);
17507
+ const innerRef = useRef33(null);
17502
17508
  useImperativeHandle12(forwardedRef, () => innerRef.current);
17503
- useEffect35(() => {
17509
+ useEffect36(() => {
17504
17510
  if (isEditing) {
17505
17511
  innerRef.current?.focus();
17506
17512
  }
@@ -17710,7 +17716,7 @@ var DateProperty = ({
17710
17716
  import { List } from "lucide-react";
17711
17717
 
17712
17718
  // src/components/user-interaction/select/MultiSelectChipDisplay.tsx
17713
- import { forwardRef as forwardRef22, useEffect as useEffect36, useImperativeHandle as useImperativeHandle13, useRef as useRef33 } from "react";
17719
+ import { forwardRef as forwardRef22, useEffect as useEffect37, useImperativeHandle as useImperativeHandle13, useRef as useRef34 } from "react";
17714
17720
  import { XIcon as XIcon2, Plus } from "lucide-react";
17715
17721
  import { jsx as jsx90, jsxs as jsxs55 } from "react/jsx-runtime";
17716
17722
  var MultiSelectChipDisplayButton = forwardRef22(function MultiSelectChipDisplayButton2({
@@ -17720,7 +17726,7 @@ var MultiSelectChipDisplayButton = forwardRef22(function MultiSelectChipDisplayB
17720
17726
  const translation = useHightideTranslation();
17721
17727
  const { state, trigger, item, ids, setIds } = useSelectContext();
17722
17728
  const { register, unregister, toggleOpen } = trigger;
17723
- useEffect36(() => {
17729
+ useEffect37(() => {
17724
17730
  if (id) {
17725
17731
  setIds((prev) => ({
17726
17732
  ...prev,
@@ -17728,9 +17734,9 @@ var MultiSelectChipDisplayButton = forwardRef22(function MultiSelectChipDisplayB
17728
17734
  }));
17729
17735
  }
17730
17736
  }, [id, setIds]);
17731
- const innerRef = useRef33(null);
17737
+ const innerRef = useRef34(null);
17732
17738
  useImperativeHandle13(ref, () => innerRef.current);
17733
- useEffect36(() => {
17739
+ useEffect37(() => {
17734
17740
  register(innerRef);
17735
17741
  return () => unregister();
17736
17742
  }, [register, unregister]);
@@ -18016,7 +18022,7 @@ var TextProperty = ({
18016
18022
  };
18017
18023
 
18018
18024
  // src/components/utils/Transition.tsx
18019
- import { useEffect as useEffect37, useState as useState37 } from "react";
18025
+ import { useEffect as useEffect38, useState as useState37 } from "react";
18020
18026
  function Transition({
18021
18027
  children,
18022
18028
  show,
@@ -18025,7 +18031,7 @@ function Transition({
18025
18031
  const [isOpen, setIsOpen] = useState37(show);
18026
18032
  const [isTransitioning, setIsTransitioning] = useState37(!isOpen);
18027
18033
  const isUsingReducedMotion = typeof window !== "undefined" && typeof window.matchMedia === "function" ? window.matchMedia("(prefers-reduced-motion: reduce)").matches : true;
18028
- useEffect37(() => {
18034
+ useEffect38(() => {
18029
18035
  setIsOpen(show);
18030
18036
  setIsTransitioning(true);
18031
18037
  }, [show]);
@@ -18061,7 +18067,7 @@ var HightideProvider = ({
18061
18067
  };
18062
18068
 
18063
18069
  // src/hooks/focus/useFocusGuards.ts
18064
- import { useEffect as useEffect38 } from "react";
18070
+ import { useEffect as useEffect39 } from "react";
18065
18071
  var selectorName = "data-hw-focus-guard";
18066
18072
  function FocusGuard() {
18067
18073
  const element = document.createElement("div");
@@ -18099,7 +18105,7 @@ var FocusGuardsService = class _FocusGuardsService {
18099
18105
  }
18100
18106
  };
18101
18107
  var useFocusGuards = () => {
18102
- useEffect38(() => {
18108
+ useEffect39(() => {
18103
18109
  FocusGuardsService.getInstance().add();
18104
18110
  return () => {
18105
18111
  FocusGuardsService.getInstance().remove();
@@ -18108,10 +18114,10 @@ var useFocusGuards = () => {
18108
18114
  };
18109
18115
 
18110
18116
  // src/hooks/focus/useFocusOnceVisible.ts
18111
- import React6, { useEffect as useEffect39 } from "react";
18117
+ import React6, { useEffect as useEffect40 } from "react";
18112
18118
  var useFocusOnceVisible = (ref, disable = false) => {
18113
18119
  const [hasUsedFocus, setHasUsedFocus] = React6.useState(false);
18114
- useEffect39(() => {
18120
+ useEffect40(() => {
18115
18121
  if (disable || hasUsedFocus) {
18116
18122
  return;
18117
18123
  }
@@ -18131,9 +18137,9 @@ var useFocusOnceVisible = (ref, disable = false) => {
18131
18137
  };
18132
18138
 
18133
18139
  // src/hooks/focus/useIsMounted.ts
18134
- import { useEffect as useEffect40, useLayoutEffect as useLayoutEffect7, useState as useState38 } from "react";
18140
+ import { useEffect as useEffect41, useLayoutEffect as useLayoutEffect7, useState as useState38 } from "react";
18135
18141
  var isClient = typeof window !== "undefined" && typeof document !== "undefined";
18136
- var useIsomorphicEffect = isClient ? useLayoutEffect7 : useEffect40;
18142
+ var useIsomorphicEffect = isClient ? useLayoutEffect7 : useEffect41;
18137
18143
  var useIsMounted = () => {
18138
18144
  const [isMounted, setIsMounted] = useState38(false);
18139
18145
  useIsomorphicEffect(() => {
@@ -18146,10 +18152,10 @@ var useIsMounted = () => {
18146
18152
  };
18147
18153
 
18148
18154
  // src/hooks/useHandleRefs.ts
18149
- import { useEffect as useEffect41, useRef as useRef34 } from "react";
18155
+ import { useEffect as useEffect42, useRef as useRef35 } from "react";
18150
18156
  function useHandleRefs(handleRef) {
18151
- const refs = useRef34([]);
18152
- useEffect41(() => {
18157
+ const refs = useRef35([]);
18158
+ useEffect42(() => {
18153
18159
  refs.current = Object.keys(handleRef?.current ?? {}).map(
18154
18160
  () => ({ current: null })
18155
18161
  );
@@ -18187,10 +18193,10 @@ function useLogUnstableDependencies(name, value) {
18187
18193
  }
18188
18194
 
18189
18195
  // src/hooks/useOverwritableState.ts
18190
- import { useEffect as useEffect42, useState as useState39 } from "react";
18196
+ import { useEffect as useEffect43, useState as useState39 } from "react";
18191
18197
  var useOverwritableState = (overwriteValue, onChange) => {
18192
18198
  const [state, setState] = useState39(overwriteValue);
18193
- useEffect42(() => {
18199
+ useEffect43(() => {
18194
18200
  setState(overwriteValue);
18195
18201
  }, [overwriteValue]);
18196
18202
  const onChangeWrapper = (action) => {
@@ -18208,7 +18214,7 @@ var useRerender = () => {
18208
18214
  };
18209
18215
 
18210
18216
  // src/hooks/useSearch.ts
18211
- import { useCallback as useCallback32, useEffect as useEffect43, useMemo as useMemo30, useState as useState40 } from "react";
18217
+ import { useCallback as useCallback33, useEffect as useEffect44, useMemo as useMemo30, useState as useState40 } from "react";
18212
18218
 
18213
18219
  // src/utils/simpleSearch.ts
18214
18220
  var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
@@ -18250,14 +18256,14 @@ var useSearch = ({
18250
18256
  const [search, setSearch] = useState40(initialSearch ?? "");
18251
18257
  const [result, setResult] = useState40(list);
18252
18258
  const searchTags = useMemo30(() => additionalSearchTags ?? [], [additionalSearchTags]);
18253
- const updateSearch = useCallback32((newSearch) => {
18259
+ const updateSearch = useCallback33((newSearch) => {
18254
18260
  const usedSearch = newSearch ?? search;
18255
18261
  if (newSearch) {
18256
18262
  setSearch(search);
18257
18263
  }
18258
18264
  setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
18259
18265
  }, [searchTags, list, search, searchMapping]);
18260
- useEffect43(() => {
18266
+ useEffect44(() => {
18261
18267
  if (isSearchInstant) {
18262
18268
  setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
18263
18269
  }