@helpwave/hightide 0.12.3 → 0.12.5
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 +11 -9
- package/dist/index.d.ts +11 -9
- package/dist/index.js +721 -689
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +91 -59
- package/dist/index.mjs.map +1 -1
- package/dist/style/globals.css +20 -3
- package/dist/style/uncompiled/theme/components/app-page.css +2 -2
- package/dist/style/uncompiled/theme/components/vertical-navigation.css +5 -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 }));
|
|
@@ -14546,7 +14557,7 @@ function VerticalNavigationItem({
|
|
|
14546
14557
|
tabIndex: -1,
|
|
14547
14558
|
children: [
|
|
14548
14559
|
label,
|
|
14549
|
-
/* @__PURE__ */ jsx41(ExternalLink2, { className: "
|
|
14560
|
+
/* @__PURE__ */ jsx41(ExternalLink2, { className: "vertical-navigation-item-link-external-icon" })
|
|
14550
14561
|
]
|
|
14551
14562
|
}
|
|
14552
14563
|
) : /* @__PURE__ */ jsx41(
|
|
@@ -14566,11 +14577,12 @@ function VerticalNavigationItem({
|
|
|
14566
14577
|
role: "treeitem",
|
|
14567
14578
|
"data-name": "vertical-navigation-item",
|
|
14568
14579
|
"data-depth": depth,
|
|
14569
|
-
"data-
|
|
14580
|
+
"data-focused": isFocused ? "" : void 0,
|
|
14570
14581
|
"aria-selected": isFocused ? true : void 0,
|
|
14571
14582
|
tabIndex: isFocused ? 0 : -1,
|
|
14572
14583
|
onKeyDown: handleKeyDown,
|
|
14573
14584
|
onClick: handleLeafActivate,
|
|
14585
|
+
className: "group/tree-leaf",
|
|
14574
14586
|
children: labelContent
|
|
14575
14587
|
}
|
|
14576
14588
|
);
|
|
@@ -14582,7 +14594,7 @@ function VerticalNavigationItem({
|
|
|
14582
14594
|
role: "treeitem",
|
|
14583
14595
|
"data-name": "vertical-navigation-node",
|
|
14584
14596
|
"data-depth": depth,
|
|
14585
|
-
"data-
|
|
14597
|
+
"data-focused": isFocused ? "" : void 0,
|
|
14586
14598
|
"data-expanded": expanded ? "" : void 0,
|
|
14587
14599
|
"aria-expanded": expanded,
|
|
14588
14600
|
tabIndex: isFocused ? 0 : -1,
|
|
@@ -14594,7 +14606,7 @@ function VerticalNavigationItem({
|
|
|
14594
14606
|
{
|
|
14595
14607
|
ref: headerRef,
|
|
14596
14608
|
"data-name": "vertical-navigation-node-header",
|
|
14597
|
-
"data-
|
|
14609
|
+
"data-focused": isFocused ? "" : void 0,
|
|
14598
14610
|
onClick: handleHeaderActivate,
|
|
14599
14611
|
children: [
|
|
14600
14612
|
label,
|
|
@@ -14635,7 +14647,7 @@ function VerticalNavigationTree({
|
|
|
14635
14647
|
|
|
14636
14648
|
// src/components/layout/app/AppPage.tsx
|
|
14637
14649
|
import { Fragment as Fragment5, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
14638
|
-
var AppSidebar = ({ isOpen, onClose, children, ...props }) => {
|
|
14650
|
+
var AppSidebar = ({ isOpen = false, onClose, children, ...props }) => {
|
|
14639
14651
|
const translation = useHightideTranslation();
|
|
14640
14652
|
const { zIndex } = useOverlayRegistry({ isActive: isOpen });
|
|
14641
14653
|
const ref = useRef25(null);
|
|
@@ -14694,11 +14706,12 @@ var AppPageSidebarWithNavigation = ({
|
|
|
14694
14706
|
footer,
|
|
14695
14707
|
navigationItems,
|
|
14696
14708
|
contentOverwrite,
|
|
14709
|
+
initialActiveId,
|
|
14697
14710
|
...props
|
|
14698
14711
|
}) => {
|
|
14699
14712
|
return /* @__PURE__ */ jsx43(AppSidebar, { ...props, children: /* @__PURE__ */ jsxs24("div", { className: "app-page-sidebar-with-navigation", children: [
|
|
14700
14713
|
header && /* @__PURE__ */ jsx43("div", { className: "app-page-sidebar-with-navigation-header", children: header }),
|
|
14701
|
-
navigationItems && !contentOverwrite && /* @__PURE__ */ jsx43("div", { className: "app-page-sidebar-with-navigation-scroll", children: /* @__PURE__ */ jsx43(VerticalNavigationTree, { items: navigationItems }) }),
|
|
14714
|
+
navigationItems && !contentOverwrite && /* @__PURE__ */ jsx43("div", { className: "app-page-sidebar-with-navigation-scroll", children: /* @__PURE__ */ jsx43(VerticalNavigationTree, { items: navigationItems, initialActiveId }) }),
|
|
14702
14715
|
contentOverwrite && /* @__PURE__ */ jsx43("div", { className: "app-page-sidebar-with-navigation-scroll", children: contentOverwrite }),
|
|
14703
14716
|
footer && /* @__PURE__ */ jsx43("div", { className: "app-page-sidebar-with-navigation-footer", children: footer })
|
|
14704
14717
|
] }) });
|
|
@@ -14707,20 +14720,38 @@ var AppPage = ({ children, headerActions, sidebarProps, ...props }) => {
|
|
|
14707
14720
|
const translation = useHightideTranslation();
|
|
14708
14721
|
const [isSidebarOpen, setIsSidebarOpen] = useState22(false);
|
|
14709
14722
|
const toNavigationItems = useCallback28((items) => {
|
|
14710
|
-
return items?.map((item) =>
|
|
14711
|
-
|
|
14712
|
-
|
|
14713
|
-
|
|
14714
|
-
item
|
|
14715
|
-
|
|
14716
|
-
|
|
14717
|
-
|
|
14718
|
-
|
|
14719
|
-
|
|
14720
|
-
|
|
14723
|
+
return items?.map((item) => {
|
|
14724
|
+
const isActive = sidebarProps.activeUrl === item.url && !!sidebarProps.activeUrl || item.id === sidebarProps.initialActiveId;
|
|
14725
|
+
return {
|
|
14726
|
+
id: item.id,
|
|
14727
|
+
label: /* @__PURE__ */ jsxs24("span", { className: "app-page-navigation-item-label", "data-active-page": isActive ? "" : void 0, children: [
|
|
14728
|
+
item.icon && /* @__PURE__ */ jsx43("span", { className: "size-5", children: item.icon }),
|
|
14729
|
+
item.label
|
|
14730
|
+
] }),
|
|
14731
|
+
url: item.url,
|
|
14732
|
+
external: item.external,
|
|
14733
|
+
items: toNavigationItems(item.items)
|
|
14734
|
+
};
|
|
14735
|
+
}) ?? void 0;
|
|
14736
|
+
}, [sidebarProps.activeUrl, sidebarProps.initialActiveId]);
|
|
14721
14737
|
const navigationItems = useMemo22(() => toNavigationItems(
|
|
14722
|
-
sidebarProps.
|
|
14723
|
-
), [sidebarProps.
|
|
14738
|
+
sidebarProps.items
|
|
14739
|
+
), [sidebarProps.items, toNavigationItems]);
|
|
14740
|
+
const initialActiveId = useMemo22(() => {
|
|
14741
|
+
if (sidebarProps.initialActiveId) return sidebarProps.initialActiveId;
|
|
14742
|
+
if (!navigationItems) return void 0;
|
|
14743
|
+
const findActiveId = (items) => {
|
|
14744
|
+
for (const item of items) {
|
|
14745
|
+
if (item.url === sidebarProps.activeUrl) return item.id;
|
|
14746
|
+
if (item.items) {
|
|
14747
|
+
const found = findActiveId(item.items);
|
|
14748
|
+
if (found) return found;
|
|
14749
|
+
}
|
|
14750
|
+
}
|
|
14751
|
+
return void 0;
|
|
14752
|
+
};
|
|
14753
|
+
return findActiveId(navigationItems);
|
|
14754
|
+
}, [navigationItems, sidebarProps.activeUrl, sidebarProps.initialActiveId]);
|
|
14724
14755
|
return /* @__PURE__ */ jsxs24(
|
|
14725
14756
|
"div",
|
|
14726
14757
|
{
|
|
@@ -14736,7 +14767,8 @@ var AppPage = ({ children, headerActions, sidebarProps, ...props }) => {
|
|
|
14736
14767
|
header: sidebarProps.header,
|
|
14737
14768
|
footer: sidebarProps.footer,
|
|
14738
14769
|
navigationItems,
|
|
14739
|
-
contentOverwrite: sidebarProps.contentOverwrite
|
|
14770
|
+
contentOverwrite: sidebarProps.contentOverwrite,
|
|
14771
|
+
initialActiveId
|
|
14740
14772
|
}
|
|
14741
14773
|
),
|
|
14742
14774
|
/* @__PURE__ */ jsxs24("div", { "data-name": "app-page-content", children: [
|
|
@@ -14764,7 +14796,7 @@ var AppPage = ({ children, headerActions, sidebarProps, ...props }) => {
|
|
|
14764
14796
|
};
|
|
14765
14797
|
|
|
14766
14798
|
// src/components/layout/dialog/Dialog.tsx
|
|
14767
|
-
import { forwardRef as forwardRef16, useCallback as useCallback29, useContext as useContext14, useId as useId12, useImperativeHandle as
|
|
14799
|
+
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
14800
|
import { X as X2 } from "lucide-react";
|
|
14769
14801
|
|
|
14770
14802
|
// src/components/layout/dialog/DialogContext.tsx
|
|
@@ -14808,7 +14840,7 @@ var Dialog = forwardRef16(function Dialog2({
|
|
|
14808
14840
|
const { refAssignment, isPresent, ref } = usePresenceRef({
|
|
14809
14841
|
isOpen
|
|
14810
14842
|
});
|
|
14811
|
-
|
|
14843
|
+
useImperativeHandle9(forwardedRef, () => ref.current, [ref]);
|
|
14812
14844
|
const onCloseStable = useEventCallbackStabilizer(onClose);
|
|
14813
14845
|
const onCloseWrapper = useCallback29(() => {
|
|
14814
14846
|
if (!isModal) return;
|
|
@@ -15235,7 +15267,7 @@ var ThemeDialog = ({
|
|
|
15235
15267
|
import { forwardRef as forwardRef18 } from "react";
|
|
15236
15268
|
|
|
15237
15269
|
// src/components/layout/drawer/DrawerContent.tsx
|
|
15238
|
-
import { forwardRef as forwardRef17, useId as useId13, useImperativeHandle as
|
|
15270
|
+
import { forwardRef as forwardRef17, useId as useId13, useImperativeHandle as useImperativeHandle10, useMemo as useMemo26, useRef as useRef27 } from "react";
|
|
15239
15271
|
|
|
15240
15272
|
// src/components/layout/drawer/DrawerContext.tsx
|
|
15241
15273
|
import { createContext as createContext14, useContext as useContext16 } from "react";
|
|
@@ -15266,7 +15298,7 @@ var DrawerContent = forwardRef17(function DrawerContent2({
|
|
|
15266
15298
|
content: props.id ?? `dialog-content-${generatedId}`
|
|
15267
15299
|
}), [generatedId, props.id]);
|
|
15268
15300
|
const ref = useRef27(null);
|
|
15269
|
-
|
|
15301
|
+
useImperativeHandle10(forwardedRef, () => ref.current, [ref]);
|
|
15270
15302
|
const { isVisible, transitionState } = useTransitionState({ isOpen, ref });
|
|
15271
15303
|
useFocusTrap({
|
|
15272
15304
|
container: ref,
|
|
@@ -17501,7 +17533,7 @@ import { Check as Check3, TrashIcon } from "lucide-react";
|
|
|
17501
17533
|
import { forwardRef as forwardRef25, useEffect as useEffect45, useId as useId19, useMemo as useMemo38, useState as useState36 } from "react";
|
|
17502
17534
|
|
|
17503
17535
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
17504
|
-
import { forwardRef as forwardRef20, useCallback as useCallback36, useEffect as useEffect39, useId as useId16, useImperativeHandle as
|
|
17536
|
+
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
17537
|
import { CalendarIcon, X as X4 } from "lucide-react";
|
|
17506
17538
|
import clsx31 from "clsx";
|
|
17507
17539
|
|
|
@@ -18802,7 +18834,7 @@ var DateTimeInput = forwardRef20(function DateTimeInput2({
|
|
|
18802
18834
|
}), [generatedId, inputId]);
|
|
18803
18835
|
const controlRef = useRef35(null);
|
|
18804
18836
|
const fieldRef = useRef35(null);
|
|
18805
|
-
|
|
18837
|
+
useImperativeHandle11(forwardedRef, () => controlRef.current);
|
|
18806
18838
|
useEffect39(() => {
|
|
18807
18839
|
if (readOnly || disabled) {
|
|
18808
18840
|
changeOpenWrapper(false);
|
|
@@ -19330,7 +19362,7 @@ function MultiSelectRoot({
|
|
|
19330
19362
|
}
|
|
19331
19363
|
|
|
19332
19364
|
// src/components/user-interaction/MultiSelect/MultiSelectButton.tsx
|
|
19333
|
-
import { forwardRef as forwardRef22, useEffect as useEffect43, useImperativeHandle as
|
|
19365
|
+
import { forwardRef as forwardRef22, useEffect as useEffect43, useImperativeHandle as useImperativeHandle12, useRef as useRef37 } from "react";
|
|
19334
19366
|
|
|
19335
19367
|
// src/components/user-interaction/MultiSelect/MultiSelectOption.tsx
|
|
19336
19368
|
import clsx32 from "clsx";
|
|
@@ -19447,7 +19479,7 @@ var MultiSelectButton = forwardRef22(function MultiSelectButton2({
|
|
|
19447
19479
|
if (id) setIds((prev) => ({ ...prev, trigger: id }));
|
|
19448
19480
|
}, [id, setIds]);
|
|
19449
19481
|
const innerRef = useRef37(null);
|
|
19450
|
-
|
|
19482
|
+
useImperativeHandle12(ref, () => innerRef.current);
|
|
19451
19483
|
useEffect43(() => {
|
|
19452
19484
|
const unregister = registerTrigger(innerRef);
|
|
19453
19485
|
return () => unregister();
|
|
@@ -19516,14 +19548,14 @@ var MultiSelectButton = forwardRef22(function MultiSelectButton2({
|
|
|
19516
19548
|
});
|
|
19517
19549
|
|
|
19518
19550
|
// src/components/user-interaction/MultiSelect/MultiSelectContent.tsx
|
|
19519
|
-
import { forwardRef as forwardRef23, useCallback as useCallback40, useEffect as useEffect44, useImperativeHandle as
|
|
19551
|
+
import { forwardRef as forwardRef23, useCallback as useCallback40, useEffect as useEffect44, useImperativeHandle as useImperativeHandle13, useRef as useRef38 } from "react";
|
|
19520
19552
|
import clsx33 from "clsx";
|
|
19521
19553
|
import { jsx as jsx82, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
19522
19554
|
var MultiSelectContent = forwardRef23(function MultiSelectContent2({ id, options, showSearch: showSearchOverride, searchInputProps, ...props }, ref) {
|
|
19523
19555
|
const translation = useHightideTranslation();
|
|
19524
19556
|
const innerRef = useRef38(null);
|
|
19525
19557
|
const searchInputRef = useRef38(null);
|
|
19526
|
-
|
|
19558
|
+
useImperativeHandle13(ref, () => innerRef.current);
|
|
19527
19559
|
const context = useMultiSelectContext();
|
|
19528
19560
|
const { config, highlightNext, highlightPrevious, highlightFirst, highlightLast, highlightedId, handleTypeaheadKey, toggleSelection } = context;
|
|
19529
19561
|
const { setIds } = config;
|
|
@@ -21840,7 +21872,7 @@ var Menu = ({
|
|
|
21840
21872
|
};
|
|
21841
21873
|
|
|
21842
21874
|
// src/components/user-interaction/MultiSelect/MultiSelectChipDisplay.tsx
|
|
21843
|
-
import { forwardRef as forwardRef30, useEffect as useEffect52, useImperativeHandle as
|
|
21875
|
+
import { forwardRef as forwardRef30, useEffect as useEffect52, useImperativeHandle as useImperativeHandle14, useRef as useRef45 } from "react";
|
|
21844
21876
|
import { XIcon as XIcon2, Plus as Plus2 } from "lucide-react";
|
|
21845
21877
|
import { jsx as jsx103, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
21846
21878
|
var MultiSelectChipDisplayButton = forwardRef30(function MultiSelectChipDisplayButton2({ id, ...props }, ref) {
|
|
@@ -21853,7 +21885,7 @@ var MultiSelectChipDisplayButton = forwardRef30(function MultiSelectChipDisplayB
|
|
|
21853
21885
|
if (id) setIds((prev) => ({ ...prev, trigger: id }));
|
|
21854
21886
|
}, [id, setIds]);
|
|
21855
21887
|
const innerRef = useRef45(null);
|
|
21856
|
-
|
|
21888
|
+
useImperativeHandle14(ref, () => innerRef.current);
|
|
21857
21889
|
useEffect52(() => {
|
|
21858
21890
|
const unregister = registerTrigger(innerRef);
|
|
21859
21891
|
return () => unregister();
|
|
@@ -22782,7 +22814,7 @@ var SearchBar = ({
|
|
|
22782
22814
|
};
|
|
22783
22815
|
|
|
22784
22816
|
// src/components/user-interaction/input/ToggleableInput.tsx
|
|
22785
|
-
import { forwardRef as forwardRef34, useEffect as useEffect54, useImperativeHandle as
|
|
22817
|
+
import { forwardRef as forwardRef34, useEffect as useEffect54, useImperativeHandle as useImperativeHandle15, useRef as useRef46, useState as useState47 } from "react";
|
|
22786
22818
|
import { Pencil } from "lucide-react";
|
|
22787
22819
|
import clsx48 from "clsx";
|
|
22788
22820
|
import { jsx as jsx113, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
@@ -22801,7 +22833,7 @@ var ToggleableInput = forwardRef34(function ToggleableInput2({
|
|
|
22801
22833
|
});
|
|
22802
22834
|
const [isEditing, setIsEditing] = useState47(initialState !== "display");
|
|
22803
22835
|
const innerRef = useRef46(null);
|
|
22804
|
-
|
|
22836
|
+
useImperativeHandle15(forwardedRef, () => innerRef.current);
|
|
22805
22837
|
useEffect54(() => {
|
|
22806
22838
|
if (isEditing) {
|
|
22807
22839
|
innerRef.current?.focus();
|