@helpwave/hightide 0.12.3 → 0.12.4
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.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +683 -672
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -42
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10300,11 +10300,11 @@ var SelectButton = forwardRef4(
|
|
|
10300
10300
|
);
|
|
10301
10301
|
|
|
10302
10302
|
// src/components/user-interaction/Select/SelectContent.tsx
|
|
10303
|
-
import { forwardRef as forwardRef9, useCallback as useCallback15, useEffect as useEffect19, useImperativeHandle as
|
|
10303
|
+
import { forwardRef as forwardRef9, useCallback as useCallback15, useEffect as useEffect19, useImperativeHandle as useImperativeHandle5, useRef as useRef13 } from "react";
|
|
10304
10304
|
import clsx8 from "clsx";
|
|
10305
10305
|
|
|
10306
10306
|
// src/components/layout/popup/PopUp.tsx
|
|
10307
|
-
import { forwardRef as forwardRef7, useCallback as useCallback13, useContext as useContext6, useImperativeHandle as
|
|
10307
|
+
import { forwardRef as forwardRef7, useCallback as useCallback13, useContext as useContext6, useImperativeHandle as useImperativeHandle3, useMemo as useMemo13 } from "react";
|
|
10308
10308
|
|
|
10309
10309
|
// src/components/utils/Portal.tsx
|
|
10310
10310
|
import { createPortal } from "react-dom";
|
|
@@ -10662,7 +10662,6 @@ var AnchoredFloatingContainer = forwardRef5(function FloatingContainer({
|
|
|
10662
10662
|
|
|
10663
10663
|
// src/components/utils/FocusTrap.tsx
|
|
10664
10664
|
import { useRef as useRef10 } from "react";
|
|
10665
|
-
import { useImperativeHandle as useImperativeHandle3 } from "react";
|
|
10666
10665
|
import { forwardRef as forwardRef6 } from "react";
|
|
10667
10666
|
|
|
10668
10667
|
// src/hooks/focus/useFocusTrap.ts
|
|
@@ -10683,7 +10682,7 @@ var createFocusGuard = () => {
|
|
|
10683
10682
|
return div;
|
|
10684
10683
|
};
|
|
10685
10684
|
function getContainedFocusableElements(element) {
|
|
10686
|
-
return element?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
10685
|
+
return [...element?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])') ?? []];
|
|
10687
10686
|
}
|
|
10688
10687
|
var FocusTrapService = class {
|
|
10689
10688
|
constructor() {
|
|
@@ -10693,7 +10692,7 @@ var FocusTrapService = class {
|
|
|
10693
10692
|
const active = this.getActive();
|
|
10694
10693
|
if (!active || !active.container.current) return;
|
|
10695
10694
|
const { container } = active;
|
|
10696
|
-
if (!container.current.contains(event.target)) {
|
|
10695
|
+
if (container.current && !container.current.contains(event.target)) {
|
|
10697
10696
|
this.focusElement();
|
|
10698
10697
|
}
|
|
10699
10698
|
};
|
|
@@ -10709,10 +10708,10 @@ var FocusTrapService = class {
|
|
|
10709
10708
|
const containerElement = container.current;
|
|
10710
10709
|
if (initialFocusElement?.current) {
|
|
10711
10710
|
initialFocusElement.current.focus();
|
|
10712
|
-
} else {
|
|
10711
|
+
} else if (containerElement) {
|
|
10713
10712
|
const elements = getContainedFocusableElements(containerElement);
|
|
10714
10713
|
if (elements && elements.length > 0) {
|
|
10715
|
-
const first = elements
|
|
10714
|
+
const first = elements[0];
|
|
10716
10715
|
first.focus();
|
|
10717
10716
|
} else {
|
|
10718
10717
|
containerElement.focus();
|
|
@@ -10789,10 +10788,10 @@ var useFocusTrap = ({
|
|
|
10789
10788
|
const containerElement = container.current;
|
|
10790
10789
|
if (initialFocus?.current) {
|
|
10791
10790
|
initialFocus.current.focus();
|
|
10792
|
-
} else {
|
|
10791
|
+
} else if (containerElement) {
|
|
10793
10792
|
const elements = getContainedFocusableElements(containerElement);
|
|
10794
10793
|
if (elements && elements.length > 0) {
|
|
10795
|
-
const first = elements
|
|
10794
|
+
const first = elements[0];
|
|
10796
10795
|
first.focus();
|
|
10797
10796
|
} else {
|
|
10798
10797
|
console.warn("No focusable elements found in the focus trap. Affected element: ", containerElement);
|
|
@@ -10820,12 +10819,13 @@ var useFocusTrap = ({
|
|
|
10820
10819
|
service.register({ id, pause, focus, focusLast, unpause, container, initialFocusElement: initialFocus });
|
|
10821
10820
|
return () => {
|
|
10822
10821
|
service.unregister(id);
|
|
10823
|
-
lastFocusRef.current =
|
|
10822
|
+
lastFocusRef.current = null;
|
|
10824
10823
|
};
|
|
10825
10824
|
}
|
|
10826
10825
|
}, [active, container, focusElement, id, initialFocus]);
|
|
10827
10826
|
useEffect14(() => {
|
|
10828
|
-
|
|
10827
|
+
const containerElement = container.current;
|
|
10828
|
+
if (active && !paused && containerElement) {
|
|
10829
10829
|
let onKeyDown = function(event) {
|
|
10830
10830
|
const key = event.key;
|
|
10831
10831
|
const elements = getContainedFocusableElements(containerElement);
|
|
@@ -10842,7 +10842,6 @@ var useFocusTrap = ({
|
|
|
10842
10842
|
event.preventDefault();
|
|
10843
10843
|
}
|
|
10844
10844
|
};
|
|
10845
|
-
const containerElement = container.current;
|
|
10846
10845
|
containerElement.addEventListener("keydown", onKeyDown);
|
|
10847
10846
|
return () => {
|
|
10848
10847
|
containerElement.removeEventListener("keydown", onKeyDown);
|
|
@@ -10865,9 +10864,21 @@ var FocusTrapWrapper = forwardRef6(function FocusTrap2({
|
|
|
10865
10864
|
...props
|
|
10866
10865
|
}, forwardedRef) {
|
|
10867
10866
|
const innerRef = useRef10(null);
|
|
10868
|
-
useImperativeHandle3(forwardedRef, () => innerRef.current);
|
|
10869
10867
|
useFocusTrap({ container: innerRef, active, initialFocus });
|
|
10870
|
-
return /* @__PURE__ */ jsx20(
|
|
10868
|
+
return /* @__PURE__ */ jsx20(
|
|
10869
|
+
"div",
|
|
10870
|
+
{
|
|
10871
|
+
ref: (node) => {
|
|
10872
|
+
innerRef.current = node;
|
|
10873
|
+
if (typeof forwardedRef === "function") {
|
|
10874
|
+
forwardedRef(node);
|
|
10875
|
+
} else if (forwardedRef) {
|
|
10876
|
+
forwardedRef.current = node;
|
|
10877
|
+
}
|
|
10878
|
+
},
|
|
10879
|
+
...props
|
|
10880
|
+
}
|
|
10881
|
+
);
|
|
10871
10882
|
});
|
|
10872
10883
|
|
|
10873
10884
|
// src/hooks/useOutsideClick.ts
|
|
@@ -11041,7 +11052,7 @@ var PopUp = forwardRef7(function PopUp2({
|
|
|
11041
11052
|
const anchor = anchorOverwrite ?? context?.triggerRef ?? void 0;
|
|
11042
11053
|
const id = props.id ?? context?.popUpId;
|
|
11043
11054
|
const { refAssignment, isPresent, ref } = usePresenceRef({ isOpen });
|
|
11044
|
-
|
|
11055
|
+
useImperativeHandle3(forwardRef36, () => ref.current, [ref]);
|
|
11045
11056
|
const onCloseStable = useEventCallbackStabilizer(onClose);
|
|
11046
11057
|
const onOutsideClickStable = useEventCallbackStabilizer(onOutsideClick);
|
|
11047
11058
|
const onCloseWrapper = useCallback13(() => {
|
|
@@ -11089,7 +11100,7 @@ var PopUp = forwardRef7(function PopUp2({
|
|
|
11089
11100
|
});
|
|
11090
11101
|
|
|
11091
11102
|
// src/components/user-interaction/input/Input.tsx
|
|
11092
|
-
import { forwardRef as forwardRef8, useImperativeHandle as
|
|
11103
|
+
import { forwardRef as forwardRef8, useImperativeHandle as useImperativeHandle4, useRef as useRef12 } from "react";
|
|
11093
11104
|
|
|
11094
11105
|
// src/hooks/useDelay.ts
|
|
11095
11106
|
import { useEffect as useEffect18, useState as useState13 } from "react";
|
|
@@ -11221,7 +11232,7 @@ var Input = forwardRef8(function Input2({
|
|
|
11221
11232
|
clearTimer
|
|
11222
11233
|
} = useDelay({ delay, disabled: !afterDelay || props.disabled || props.readOnly });
|
|
11223
11234
|
const innerRef = useRef12(null);
|
|
11224
|
-
|
|
11235
|
+
useImperativeHandle4(forwardedRef, () => innerRef.current);
|
|
11225
11236
|
const { focusNext } = useFocusManagement();
|
|
11226
11237
|
return /* @__PURE__ */ jsx22(
|
|
11227
11238
|
"input",
|
|
@@ -11277,7 +11288,7 @@ var SelectContent = forwardRef9(function SelectContent2({
|
|
|
11277
11288
|
const translation = useHightideTranslation();
|
|
11278
11289
|
const innerRef = useRef13(null);
|
|
11279
11290
|
const searchInputRef = useRef13(null);
|
|
11280
|
-
|
|
11291
|
+
useImperativeHandle5(ref, () => innerRef.current);
|
|
11281
11292
|
const context = useSelectContext();
|
|
11282
11293
|
const { config, handleTypeaheadKey, toggleSelection, highlightNext, highlightPrevious, highlightFirst, highlightLast, highlightedId } = context;
|
|
11283
11294
|
const { setIds } = config;
|
|
@@ -12488,10 +12499,10 @@ import clsx10 from "clsx";
|
|
|
12488
12499
|
import { ChevronLeft, ChevronRight as ChevronRight2 } from "lucide-react";
|
|
12489
12500
|
|
|
12490
12501
|
// src/components/user-interaction/IconButton.tsx
|
|
12491
|
-
import { forwardRef as forwardRef13, useImperativeHandle as
|
|
12502
|
+
import { forwardRef as forwardRef13, useImperativeHandle as useImperativeHandle7, useRef as useRef18 } from "react";
|
|
12492
12503
|
|
|
12493
12504
|
// src/components/user-interaction/Tooltip.tsx
|
|
12494
|
-
import { forwardRef as forwardRef12, useContext as useContext8, useEffect as useEffect23, useImperativeHandle as
|
|
12505
|
+
import { forwardRef as forwardRef12, useContext as useContext8, useEffect as useEffect23, useImperativeHandle as useImperativeHandle6 } from "react";
|
|
12495
12506
|
import { useId as useId8 } from "react";
|
|
12496
12507
|
import { useCallback as useCallback20, useMemo as useMemo16, useRef as useRef17, useState as useState16 } from "react";
|
|
12497
12508
|
|
|
@@ -12718,7 +12729,7 @@ var TooltipDisplay = forwardRef12(function TooltipAnchoredFloatingContainer({
|
|
|
12718
12729
|
[isAnimatedOverwrite, config.tooltip.isAnimated]
|
|
12719
12730
|
);
|
|
12720
12731
|
const container = useRef17(null);
|
|
12721
|
-
|
|
12732
|
+
useImperativeHandle6(forwardRef36, () => container.current);
|
|
12722
12733
|
const isActive = !disabled && isShown;
|
|
12723
12734
|
const { isVisible, transitionState } = useTransitionState(
|
|
12724
12735
|
useMemo16(() => ({ isOpen: isShown, ref: container }), [isShown])
|
|
@@ -12848,8 +12859,8 @@ var IconButtonTooltipTrigger = forwardRef13(function IconButtonTooltipTrigger2({
|
|
|
12848
12859
|
}, ref) {
|
|
12849
12860
|
const { trigger: { ref: triggerRef, props: tooltipTriggerProps } } = useTooltip();
|
|
12850
12861
|
const innerRef = useRef18(null);
|
|
12851
|
-
|
|
12852
|
-
|
|
12862
|
+
useImperativeHandle7(ref, () => innerRef.current);
|
|
12863
|
+
useImperativeHandle7(triggerRef, () => innerRef.current);
|
|
12853
12864
|
return /* @__PURE__ */ jsx30(
|
|
12854
12865
|
IconButtonBase,
|
|
12855
12866
|
{
|
|
@@ -13292,7 +13303,7 @@ var DividerInserter = ({
|
|
|
13292
13303
|
};
|
|
13293
13304
|
|
|
13294
13305
|
// src/components/layout/Expandable.tsx
|
|
13295
|
-
import { useEffect as useEffect25, useImperativeHandle as
|
|
13306
|
+
import { useEffect as useEffect25, useImperativeHandle as useImperativeHandle8, useRef as useRef20 } from "react";
|
|
13296
13307
|
import { useState as useState18 } from "react";
|
|
13297
13308
|
import { createContext as createContext9, forwardRef as forwardRef15, useCallback as useCallback22, useContext as useContext10, useId as useId10, useMemo as useMemo18 } from "react";
|
|
13298
13309
|
import clsx11 from "clsx";
|
|
@@ -13401,7 +13412,7 @@ var ExpandableContent = forwardRef15(function ExpandableContent2({
|
|
|
13401
13412
|
}, forwardedRef) {
|
|
13402
13413
|
const { isExpanded, ids, setIds } = useExpandableContext();
|
|
13403
13414
|
const ref = useRef20(null);
|
|
13404
|
-
|
|
13415
|
+
useImperativeHandle8(forwardedRef, () => ref.current, [ref]);
|
|
13405
13416
|
useEffect25(() => {
|
|
13406
13417
|
if (props.id) {
|
|
13407
13418
|
setIds((prevState) => ({ ...prevState, content: props.id }));
|
|
@@ -14635,7 +14646,7 @@ function VerticalNavigationTree({
|
|
|
14635
14646
|
|
|
14636
14647
|
// src/components/layout/app/AppPage.tsx
|
|
14637
14648
|
import { Fragment as Fragment5, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
14638
|
-
var AppSidebar = ({ isOpen, onClose, children, ...props }) => {
|
|
14649
|
+
var AppSidebar = ({ isOpen = false, onClose, children, ...props }) => {
|
|
14639
14650
|
const translation = useHightideTranslation();
|
|
14640
14651
|
const { zIndex } = useOverlayRegistry({ isActive: isOpen });
|
|
14641
14652
|
const ref = useRef25(null);
|
|
@@ -14719,8 +14730,8 @@ var AppPage = ({ children, headerActions, sidebarProps, ...props }) => {
|
|
|
14719
14730
|
})) ?? void 0;
|
|
14720
14731
|
}, []);
|
|
14721
14732
|
const navigationItems = useMemo22(() => toNavigationItems(
|
|
14722
|
-
sidebarProps.
|
|
14723
|
-
), [sidebarProps.
|
|
14733
|
+
sidebarProps.items
|
|
14734
|
+
), [sidebarProps.items, toNavigationItems]);
|
|
14724
14735
|
return /* @__PURE__ */ jsxs24(
|
|
14725
14736
|
"div",
|
|
14726
14737
|
{
|
|
@@ -14764,7 +14775,7 @@ var AppPage = ({ children, headerActions, sidebarProps, ...props }) => {
|
|
|
14764
14775
|
};
|
|
14765
14776
|
|
|
14766
14777
|
// src/components/layout/dialog/Dialog.tsx
|
|
14767
|
-
import { forwardRef as forwardRef16, useCallback as useCallback29, useContext as useContext14, useId as useId12, useImperativeHandle as
|
|
14778
|
+
import { forwardRef as forwardRef16, useCallback as useCallback29, useContext as useContext14, useId as useId12, useImperativeHandle as useImperativeHandle9, useMemo as useMemo23, useRef as useRef26 } from "react";
|
|
14768
14779
|
import { X as X2 } from "lucide-react";
|
|
14769
14780
|
|
|
14770
14781
|
// src/components/layout/dialog/DialogContext.tsx
|
|
@@ -14808,7 +14819,7 @@ var Dialog = forwardRef16(function Dialog2({
|
|
|
14808
14819
|
const { refAssignment, isPresent, ref } = usePresenceRef({
|
|
14809
14820
|
isOpen
|
|
14810
14821
|
});
|
|
14811
|
-
|
|
14822
|
+
useImperativeHandle9(forwardedRef, () => ref.current, [ref]);
|
|
14812
14823
|
const onCloseStable = useEventCallbackStabilizer(onClose);
|
|
14813
14824
|
const onCloseWrapper = useCallback29(() => {
|
|
14814
14825
|
if (!isModal) return;
|
|
@@ -15235,7 +15246,7 @@ var ThemeDialog = ({
|
|
|
15235
15246
|
import { forwardRef as forwardRef18 } from "react";
|
|
15236
15247
|
|
|
15237
15248
|
// src/components/layout/drawer/DrawerContent.tsx
|
|
15238
|
-
import { forwardRef as forwardRef17, useId as useId13, useImperativeHandle as
|
|
15249
|
+
import { forwardRef as forwardRef17, useId as useId13, useImperativeHandle as useImperativeHandle10, useMemo as useMemo26, useRef as useRef27 } from "react";
|
|
15239
15250
|
|
|
15240
15251
|
// src/components/layout/drawer/DrawerContext.tsx
|
|
15241
15252
|
import { createContext as createContext14, useContext as useContext16 } from "react";
|
|
@@ -15266,7 +15277,7 @@ var DrawerContent = forwardRef17(function DrawerContent2({
|
|
|
15266
15277
|
content: props.id ?? `dialog-content-${generatedId}`
|
|
15267
15278
|
}), [generatedId, props.id]);
|
|
15268
15279
|
const ref = useRef27(null);
|
|
15269
|
-
|
|
15280
|
+
useImperativeHandle10(forwardedRef, () => ref.current, [ref]);
|
|
15270
15281
|
const { isVisible, transitionState } = useTransitionState({ isOpen, ref });
|
|
15271
15282
|
useFocusTrap({
|
|
15272
15283
|
container: ref,
|
|
@@ -17501,7 +17512,7 @@ import { Check as Check3, TrashIcon } from "lucide-react";
|
|
|
17501
17512
|
import { forwardRef as forwardRef25, useEffect as useEffect45, useId as useId19, useMemo as useMemo38, useState as useState36 } from "react";
|
|
17502
17513
|
|
|
17503
17514
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
17504
|
-
import { forwardRef as forwardRef20, useCallback as useCallback36, useEffect as useEffect39, useId as useId16, useImperativeHandle as
|
|
17515
|
+
import { forwardRef as forwardRef20, useCallback as useCallback36, useEffect as useEffect39, useId as useId16, useImperativeHandle as useImperativeHandle11, useMemo as useMemo34, useRef as useRef35, useState as useState33 } from "react";
|
|
17505
17516
|
import { CalendarIcon, X as X4 } from "lucide-react";
|
|
17506
17517
|
import clsx31 from "clsx";
|
|
17507
17518
|
|
|
@@ -18802,7 +18813,7 @@ var DateTimeInput = forwardRef20(function DateTimeInput2({
|
|
|
18802
18813
|
}), [generatedId, inputId]);
|
|
18803
18814
|
const controlRef = useRef35(null);
|
|
18804
18815
|
const fieldRef = useRef35(null);
|
|
18805
|
-
|
|
18816
|
+
useImperativeHandle11(forwardedRef, () => controlRef.current);
|
|
18806
18817
|
useEffect39(() => {
|
|
18807
18818
|
if (readOnly || disabled) {
|
|
18808
18819
|
changeOpenWrapper(false);
|
|
@@ -19330,7 +19341,7 @@ function MultiSelectRoot({
|
|
|
19330
19341
|
}
|
|
19331
19342
|
|
|
19332
19343
|
// src/components/user-interaction/MultiSelect/MultiSelectButton.tsx
|
|
19333
|
-
import { forwardRef as forwardRef22, useEffect as useEffect43, useImperativeHandle as
|
|
19344
|
+
import { forwardRef as forwardRef22, useEffect as useEffect43, useImperativeHandle as useImperativeHandle12, useRef as useRef37 } from "react";
|
|
19334
19345
|
|
|
19335
19346
|
// src/components/user-interaction/MultiSelect/MultiSelectOption.tsx
|
|
19336
19347
|
import clsx32 from "clsx";
|
|
@@ -19447,7 +19458,7 @@ var MultiSelectButton = forwardRef22(function MultiSelectButton2({
|
|
|
19447
19458
|
if (id) setIds((prev) => ({ ...prev, trigger: id }));
|
|
19448
19459
|
}, [id, setIds]);
|
|
19449
19460
|
const innerRef = useRef37(null);
|
|
19450
|
-
|
|
19461
|
+
useImperativeHandle12(ref, () => innerRef.current);
|
|
19451
19462
|
useEffect43(() => {
|
|
19452
19463
|
const unregister = registerTrigger(innerRef);
|
|
19453
19464
|
return () => unregister();
|
|
@@ -19516,14 +19527,14 @@ var MultiSelectButton = forwardRef22(function MultiSelectButton2({
|
|
|
19516
19527
|
});
|
|
19517
19528
|
|
|
19518
19529
|
// src/components/user-interaction/MultiSelect/MultiSelectContent.tsx
|
|
19519
|
-
import { forwardRef as forwardRef23, useCallback as useCallback40, useEffect as useEffect44, useImperativeHandle as
|
|
19530
|
+
import { forwardRef as forwardRef23, useCallback as useCallback40, useEffect as useEffect44, useImperativeHandle as useImperativeHandle13, useRef as useRef38 } from "react";
|
|
19520
19531
|
import clsx33 from "clsx";
|
|
19521
19532
|
import { jsx as jsx82, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
19522
19533
|
var MultiSelectContent = forwardRef23(function MultiSelectContent2({ id, options, showSearch: showSearchOverride, searchInputProps, ...props }, ref) {
|
|
19523
19534
|
const translation = useHightideTranslation();
|
|
19524
19535
|
const innerRef = useRef38(null);
|
|
19525
19536
|
const searchInputRef = useRef38(null);
|
|
19526
|
-
|
|
19537
|
+
useImperativeHandle13(ref, () => innerRef.current);
|
|
19527
19538
|
const context = useMultiSelectContext();
|
|
19528
19539
|
const { config, highlightNext, highlightPrevious, highlightFirst, highlightLast, highlightedId, handleTypeaheadKey, toggleSelection } = context;
|
|
19529
19540
|
const { setIds } = config;
|
|
@@ -21840,7 +21851,7 @@ var Menu = ({
|
|
|
21840
21851
|
};
|
|
21841
21852
|
|
|
21842
21853
|
// src/components/user-interaction/MultiSelect/MultiSelectChipDisplay.tsx
|
|
21843
|
-
import { forwardRef as forwardRef30, useEffect as useEffect52, useImperativeHandle as
|
|
21854
|
+
import { forwardRef as forwardRef30, useEffect as useEffect52, useImperativeHandle as useImperativeHandle14, useRef as useRef45 } from "react";
|
|
21844
21855
|
import { XIcon as XIcon2, Plus as Plus2 } from "lucide-react";
|
|
21845
21856
|
import { jsx as jsx103, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
21846
21857
|
var MultiSelectChipDisplayButton = forwardRef30(function MultiSelectChipDisplayButton2({ id, ...props }, ref) {
|
|
@@ -21853,7 +21864,7 @@ var MultiSelectChipDisplayButton = forwardRef30(function MultiSelectChipDisplayB
|
|
|
21853
21864
|
if (id) setIds((prev) => ({ ...prev, trigger: id }));
|
|
21854
21865
|
}, [id, setIds]);
|
|
21855
21866
|
const innerRef = useRef45(null);
|
|
21856
|
-
|
|
21867
|
+
useImperativeHandle14(ref, () => innerRef.current);
|
|
21857
21868
|
useEffect52(() => {
|
|
21858
21869
|
const unregister = registerTrigger(innerRef);
|
|
21859
21870
|
return () => unregister();
|
|
@@ -22782,7 +22793,7 @@ var SearchBar = ({
|
|
|
22782
22793
|
};
|
|
22783
22794
|
|
|
22784
22795
|
// src/components/user-interaction/input/ToggleableInput.tsx
|
|
22785
|
-
import { forwardRef as forwardRef34, useEffect as useEffect54, useImperativeHandle as
|
|
22796
|
+
import { forwardRef as forwardRef34, useEffect as useEffect54, useImperativeHandle as useImperativeHandle15, useRef as useRef46, useState as useState47 } from "react";
|
|
22786
22797
|
import { Pencil } from "lucide-react";
|
|
22787
22798
|
import clsx48 from "clsx";
|
|
22788
22799
|
import { jsx as jsx113, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
@@ -22801,7 +22812,7 @@ var ToggleableInput = forwardRef34(function ToggleableInput2({
|
|
|
22801
22812
|
});
|
|
22802
22813
|
const [isEditing, setIsEditing] = useState47(initialState !== "display");
|
|
22803
22814
|
const innerRef = useRef46(null);
|
|
22804
|
-
|
|
22815
|
+
useImperativeHandle15(forwardedRef, () => innerRef.current);
|
|
22805
22816
|
useEffect54(() => {
|
|
22806
22817
|
if (isEditing) {
|
|
22807
22818
|
innerRef.current?.focus();
|