@meetreeve/ui 0.16.0 → 0.18.0
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/README.md +5 -0
- package/dist/index.d.mts +33 -3
- package/dist/index.d.ts +33 -3
- package/dist/index.js +126 -44
- package/dist/index.mjs +124 -44
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -158,6 +158,11 @@ single-org case stays a flat list. `collapsed` swaps the trigger for an
|
|
|
158
158
|
icon-only button (56px nav rail); `footer` adds a slot below the list (e.g.
|
|
159
159
|
an "Add brand" CTA).
|
|
160
160
|
|
|
161
|
+
Rows sort by name within each org group. Set `pinned: true` on an item to lead
|
|
162
|
+
its group instead (pinned items keep their input order, and a divider closes
|
|
163
|
+
the pinned block), and `emphasis: true` to render its name in semibold — e.g.
|
|
164
|
+
an org's default context (DEV-14817).
|
|
165
|
+
|
|
161
166
|
## InfoTip (DEV-11387)
|
|
162
167
|
|
|
163
168
|
A "?" circle that reveals a short explanation, so a page can keep caveats and
|
package/dist/index.d.mts
CHANGED
|
@@ -462,6 +462,20 @@ declare function reconcileLadder(ladder: SidebarLadder, registry: FallbackModule
|
|
|
462
462
|
*/
|
|
463
463
|
declare function resolveLadder(raw: unknown, registry: FallbackModuleDef[], groupOrder: string[]): SidebarLadder;
|
|
464
464
|
|
|
465
|
+
/**
|
|
466
|
+
* DEV-13848: how long a hover-opened panel survives the pointer leaving it.
|
|
467
|
+
* It used to close on the very first `mouseleave`, so crossing the gap or
|
|
468
|
+
* cutting diagonally toward a lower row shut it — "a narrow gate" (Matt).
|
|
469
|
+
*/
|
|
470
|
+
declare const HOVER_CLOSE_DELAY_MS = 300;
|
|
471
|
+
/**
|
|
472
|
+
* DEV-13848: hover intent for SWITCHING groups. A diagonal path from one
|
|
473
|
+
* group's trigger to the lower rows of its panel passes over the next
|
|
474
|
+
* group's trigger; opening that one instantly force-closed the panel the
|
|
475
|
+
* user was heading for. AppSidebar passes this as `hoverOpenDelayMs` while a
|
|
476
|
+
* sibling is open, so a pointer merely passing through never claims the slot.
|
|
477
|
+
*/
|
|
478
|
+
declare const HOVER_SWITCH_DELAY_MS = 150;
|
|
465
479
|
interface FlyoutChild {
|
|
466
480
|
moduleId: string;
|
|
467
481
|
label: string;
|
|
@@ -509,6 +523,12 @@ interface FlyoutProps {
|
|
|
509
523
|
*/
|
|
510
524
|
onOpenChange?: (open: boolean) => void;
|
|
511
525
|
forceClosed?: boolean;
|
|
526
|
+
/**
|
|
527
|
+
* DEV-13848: delay before a HOVER opens this instance (clicks stay
|
|
528
|
+
* instant); leaving before it elapses cancels the open. Default 0. A
|
|
529
|
+
* coordinator sets it while a sibling is open — see HOVER_SWITCH_DELAY_MS.
|
|
530
|
+
*/
|
|
531
|
+
hoverOpenDelayMs?: number;
|
|
512
532
|
className?: string;
|
|
513
533
|
}
|
|
514
534
|
/**
|
|
@@ -546,7 +566,7 @@ interface FlyoutProps {
|
|
|
546
566
|
* than working around it. jsdom never computes real scrollable-overflow
|
|
547
567
|
* geometry, so no unit test caught this — only an actual browser render did.
|
|
548
568
|
*/
|
|
549
|
-
declare function Flyout({ label, icon, active, children, linkComponent, collapsed, onOpenChange, forceClosed, className, }: FlyoutProps): react.JSX.Element;
|
|
569
|
+
declare function Flyout({ label, icon, active, children, linkComponent, collapsed, onOpenChange, forceClosed, hoverOpenDelayMs, className, }: FlyoutProps): react.JSX.Element;
|
|
550
570
|
|
|
551
571
|
/**
|
|
552
572
|
* ContextSwitcher (DEV-4408) — promoted out of reeve-frontend's
|
|
@@ -595,13 +615,23 @@ interface ContextSwitcherItem {
|
|
|
595
615
|
* host knows its own vocabulary for telling them apart.
|
|
596
616
|
*/
|
|
597
617
|
kindLabel?: string | null;
|
|
618
|
+
/**
|
|
619
|
+
* Lead this row's org group instead of sorting by name (DEV-14817) — e.g.
|
|
620
|
+
* a host's "all" scope sentinel, or the org's default context. Pinned rows
|
|
621
|
+
* keep the order they were passed in; a divider separates them from the
|
|
622
|
+
* alphabetical rest.
|
|
623
|
+
*/
|
|
624
|
+
pinned?: boolean;
|
|
625
|
+
/** Render the row's name in semibold, to set it apart (DEV-14817). */
|
|
626
|
+
emphasis?: boolean;
|
|
598
627
|
}
|
|
599
628
|
interface ContextOrgGroup {
|
|
600
629
|
orgId: string | null;
|
|
601
630
|
orgName: string | null;
|
|
602
631
|
items: ContextSwitcherItem[];
|
|
603
632
|
}
|
|
604
|
-
/** Group contexts by owning org.
|
|
633
|
+
/** Group contexts by owning org. Pinned items lead their group in input
|
|
634
|
+
* order; the rest sort by name. Groups sort by org name. */
|
|
605
635
|
declare function groupByOrg(items: ContextSwitcherItem[]): ContextOrgGroup[];
|
|
606
636
|
interface ContextSwitcherProps {
|
|
607
637
|
items: ContextSwitcherItem[];
|
|
@@ -925,4 +955,4 @@ interface ConnectorPickerProps {
|
|
|
925
955
|
}
|
|
926
956
|
declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, }: ConnectorPickerProps): react.JSX.Element | null;
|
|
927
957
|
|
|
928
|
-
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, type HeaderNavItem, InfoTip, type InfoTipProps, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|
|
958
|
+
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, HOVER_CLOSE_DELAY_MS, HOVER_SWITCH_DELAY_MS, type HeaderNavItem, InfoTip, type InfoTipProps, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|
package/dist/index.d.ts
CHANGED
|
@@ -462,6 +462,20 @@ declare function reconcileLadder(ladder: SidebarLadder, registry: FallbackModule
|
|
|
462
462
|
*/
|
|
463
463
|
declare function resolveLadder(raw: unknown, registry: FallbackModuleDef[], groupOrder: string[]): SidebarLadder;
|
|
464
464
|
|
|
465
|
+
/**
|
|
466
|
+
* DEV-13848: how long a hover-opened panel survives the pointer leaving it.
|
|
467
|
+
* It used to close on the very first `mouseleave`, so crossing the gap or
|
|
468
|
+
* cutting diagonally toward a lower row shut it — "a narrow gate" (Matt).
|
|
469
|
+
*/
|
|
470
|
+
declare const HOVER_CLOSE_DELAY_MS = 300;
|
|
471
|
+
/**
|
|
472
|
+
* DEV-13848: hover intent for SWITCHING groups. A diagonal path from one
|
|
473
|
+
* group's trigger to the lower rows of its panel passes over the next
|
|
474
|
+
* group's trigger; opening that one instantly force-closed the panel the
|
|
475
|
+
* user was heading for. AppSidebar passes this as `hoverOpenDelayMs` while a
|
|
476
|
+
* sibling is open, so a pointer merely passing through never claims the slot.
|
|
477
|
+
*/
|
|
478
|
+
declare const HOVER_SWITCH_DELAY_MS = 150;
|
|
465
479
|
interface FlyoutChild {
|
|
466
480
|
moduleId: string;
|
|
467
481
|
label: string;
|
|
@@ -509,6 +523,12 @@ interface FlyoutProps {
|
|
|
509
523
|
*/
|
|
510
524
|
onOpenChange?: (open: boolean) => void;
|
|
511
525
|
forceClosed?: boolean;
|
|
526
|
+
/**
|
|
527
|
+
* DEV-13848: delay before a HOVER opens this instance (clicks stay
|
|
528
|
+
* instant); leaving before it elapses cancels the open. Default 0. A
|
|
529
|
+
* coordinator sets it while a sibling is open — see HOVER_SWITCH_DELAY_MS.
|
|
530
|
+
*/
|
|
531
|
+
hoverOpenDelayMs?: number;
|
|
512
532
|
className?: string;
|
|
513
533
|
}
|
|
514
534
|
/**
|
|
@@ -546,7 +566,7 @@ interface FlyoutProps {
|
|
|
546
566
|
* than working around it. jsdom never computes real scrollable-overflow
|
|
547
567
|
* geometry, so no unit test caught this — only an actual browser render did.
|
|
548
568
|
*/
|
|
549
|
-
declare function Flyout({ label, icon, active, children, linkComponent, collapsed, onOpenChange, forceClosed, className, }: FlyoutProps): react.JSX.Element;
|
|
569
|
+
declare function Flyout({ label, icon, active, children, linkComponent, collapsed, onOpenChange, forceClosed, hoverOpenDelayMs, className, }: FlyoutProps): react.JSX.Element;
|
|
550
570
|
|
|
551
571
|
/**
|
|
552
572
|
* ContextSwitcher (DEV-4408) — promoted out of reeve-frontend's
|
|
@@ -595,13 +615,23 @@ interface ContextSwitcherItem {
|
|
|
595
615
|
* host knows its own vocabulary for telling them apart.
|
|
596
616
|
*/
|
|
597
617
|
kindLabel?: string | null;
|
|
618
|
+
/**
|
|
619
|
+
* Lead this row's org group instead of sorting by name (DEV-14817) — e.g.
|
|
620
|
+
* a host's "all" scope sentinel, or the org's default context. Pinned rows
|
|
621
|
+
* keep the order they were passed in; a divider separates them from the
|
|
622
|
+
* alphabetical rest.
|
|
623
|
+
*/
|
|
624
|
+
pinned?: boolean;
|
|
625
|
+
/** Render the row's name in semibold, to set it apart (DEV-14817). */
|
|
626
|
+
emphasis?: boolean;
|
|
598
627
|
}
|
|
599
628
|
interface ContextOrgGroup {
|
|
600
629
|
orgId: string | null;
|
|
601
630
|
orgName: string | null;
|
|
602
631
|
items: ContextSwitcherItem[];
|
|
603
632
|
}
|
|
604
|
-
/** Group contexts by owning org.
|
|
633
|
+
/** Group contexts by owning org. Pinned items lead their group in input
|
|
634
|
+
* order; the rest sort by name. Groups sort by org name. */
|
|
605
635
|
declare function groupByOrg(items: ContextSwitcherItem[]): ContextOrgGroup[];
|
|
606
636
|
interface ContextSwitcherProps {
|
|
607
637
|
items: ContextSwitcherItem[];
|
|
@@ -925,4 +955,4 @@ interface ConnectorPickerProps {
|
|
|
925
955
|
}
|
|
926
956
|
declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, }: ConnectorPickerProps): react.JSX.Element | null;
|
|
927
957
|
|
|
928
|
-
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, type HeaderNavItem, InfoTip, type InfoTipProps, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|
|
958
|
+
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, HOVER_CLOSE_DELAY_MS, HOVER_SWITCH_DELAY_MS, type HeaderNavItem, InfoTip, type InfoTipProps, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|
package/dist/index.js
CHANGED
|
@@ -37,6 +37,8 @@ __export(src_exports, {
|
|
|
37
37
|
ContextSwitcher: () => ContextSwitcher,
|
|
38
38
|
Flyout: () => Flyout,
|
|
39
39
|
GLYPH_CANVAS_FILL: () => GLYPH_CANVAS_FILL,
|
|
40
|
+
HOVER_CLOSE_DELAY_MS: () => HOVER_CLOSE_DELAY_MS,
|
|
41
|
+
HOVER_SWITCH_DELAY_MS: () => HOVER_SWITCH_DELAY_MS,
|
|
40
42
|
InfoTip: () => InfoTip,
|
|
41
43
|
LOCKUP_GAP: () => LOCKUP_GAP,
|
|
42
44
|
LOCKUP_ROW: () => LOCKUP_ROW,
|
|
@@ -796,6 +798,9 @@ function useLadderRung(ladder, containerRef, options = {}) {
|
|
|
796
798
|
var import_react7 = require("react");
|
|
797
799
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
798
800
|
var PANEL_GAP = 4;
|
|
801
|
+
var HOVER_CLOSE_DELAY_MS = 300;
|
|
802
|
+
var HOVER_SLOP = 16;
|
|
803
|
+
var HOVER_SWITCH_DELAY_MS = 150;
|
|
799
804
|
function Flyout({
|
|
800
805
|
label,
|
|
801
806
|
icon,
|
|
@@ -805,6 +810,7 @@ function Flyout({
|
|
|
805
810
|
collapsed = false,
|
|
806
811
|
onOpenChange,
|
|
807
812
|
forceClosed = false,
|
|
813
|
+
hoverOpenDelayMs = 0,
|
|
808
814
|
className
|
|
809
815
|
}) {
|
|
810
816
|
const [hoverOpen, setHoverOpen] = (0, import_react7.useState)(false);
|
|
@@ -816,9 +822,39 @@ function Flyout({
|
|
|
816
822
|
const triggerRef = (0, import_react7.useRef)(null);
|
|
817
823
|
const panelRef = (0, import_react7.useRef)(null);
|
|
818
824
|
const firstItemRef = (0, import_react7.useRef)(null);
|
|
825
|
+
const closeTimer = (0, import_react7.useRef)(null);
|
|
826
|
+
const openTimer = (0, import_react7.useRef)(null);
|
|
819
827
|
const prefersReducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)");
|
|
820
828
|
const Icon = resolveIcon(icon);
|
|
821
829
|
const LinkEl = linkComponent ?? "a";
|
|
830
|
+
const cancelOpen = (0, import_react7.useCallback)(() => {
|
|
831
|
+
if (openTimer.current) clearTimeout(openTimer.current);
|
|
832
|
+
openTimer.current = null;
|
|
833
|
+
}, []);
|
|
834
|
+
const cancelClose = (0, import_react7.useCallback)(() => {
|
|
835
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
836
|
+
closeTimer.current = null;
|
|
837
|
+
cancelOpen();
|
|
838
|
+
}, [cancelOpen]);
|
|
839
|
+
const hoverEnter = () => {
|
|
840
|
+
cancelClose();
|
|
841
|
+
if (hoverOpenDelayMs <= 0) {
|
|
842
|
+
setHoverOpen(true);
|
|
843
|
+
return;
|
|
844
|
+
}
|
|
845
|
+
openTimer.current = setTimeout(() => {
|
|
846
|
+
openTimer.current = null;
|
|
847
|
+
setHoverOpen(true);
|
|
848
|
+
}, hoverOpenDelayMs);
|
|
849
|
+
};
|
|
850
|
+
const hoverLeave = () => {
|
|
851
|
+
cancelClose();
|
|
852
|
+
closeTimer.current = setTimeout(() => {
|
|
853
|
+
closeTimer.current = null;
|
|
854
|
+
setHoverOpen(false);
|
|
855
|
+
}, HOVER_CLOSE_DELAY_MS);
|
|
856
|
+
};
|
|
857
|
+
(0, import_react7.useEffect)(() => cancelClose, [cancelClose]);
|
|
822
858
|
const reposition = (0, import_react7.useCallback)(() => {
|
|
823
859
|
const rect = triggerRef.current?.getBoundingClientRect();
|
|
824
860
|
if (rect) setPanelPosition({ top: rect.top, left: rect.right + PANEL_GAP });
|
|
@@ -830,10 +866,11 @@ function Flyout({
|
|
|
830
866
|
}, [wantsOpen]);
|
|
831
867
|
(0, import_react7.useEffect)(() => {
|
|
832
868
|
if (forceClosed) {
|
|
869
|
+
cancelClose();
|
|
833
870
|
setHoverOpen(false);
|
|
834
871
|
setClickOpen(false);
|
|
835
872
|
}
|
|
836
|
-
}, [forceClosed]);
|
|
873
|
+
}, [forceClosed, cancelClose]);
|
|
837
874
|
(0, import_react7.useLayoutEffect)(() => {
|
|
838
875
|
if (open) reposition();
|
|
839
876
|
}, [open, reposition]);
|
|
@@ -849,6 +886,7 @@ function Flyout({
|
|
|
849
886
|
useDismissableDisclosure({
|
|
850
887
|
open,
|
|
851
888
|
onClose: () => {
|
|
889
|
+
cancelOpen();
|
|
852
890
|
setHoverOpen(false);
|
|
853
891
|
setClickOpen(false);
|
|
854
892
|
},
|
|
@@ -863,8 +901,8 @@ function Flyout({
|
|
|
863
901
|
{
|
|
864
902
|
"data-testid": "ladder-flyout",
|
|
865
903
|
className: cn("relative", className),
|
|
866
|
-
onMouseEnter:
|
|
867
|
-
onMouseLeave:
|
|
904
|
+
onMouseEnter: hoverEnter,
|
|
905
|
+
onMouseLeave: hoverLeave,
|
|
868
906
|
children: [
|
|
869
907
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
870
908
|
"button",
|
|
@@ -875,7 +913,10 @@ function Flyout({
|
|
|
875
913
|
"aria-expanded": open,
|
|
876
914
|
"aria-controls": panelId,
|
|
877
915
|
title: collapsed ? label : void 0,
|
|
878
|
-
onClick: () =>
|
|
916
|
+
onClick: () => {
|
|
917
|
+
cancelOpen();
|
|
918
|
+
setClickOpen((v) => !v);
|
|
919
|
+
},
|
|
879
920
|
className: cn(
|
|
880
921
|
"group flex w-full items-center gap-2.5 rounded-md px-3 py-1.5 text-sm transition-colors",
|
|
881
922
|
collapsed && "justify-center px-0",
|
|
@@ -904,44 +945,61 @@ function Flyout({
|
|
|
904
945
|
]
|
|
905
946
|
}
|
|
906
947
|
),
|
|
907
|
-
open && panelPosition &&
|
|
948
|
+
open && panelPosition && // DEV-13848 hit area: a DOM child of the wrapper above, so the pointer
|
|
949
|
+
// moving through it never fires the wrapper's mouseleave. Starts at
|
|
950
|
+
// the trigger's right edge (bridging PANEL_GAP) and pads HOVER_SLOP
|
|
951
|
+
// around the panel; the panel itself renders exactly where it did.
|
|
952
|
+
// `panelRef` lives here so a click in the slop isn't an "outside" one.
|
|
953
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
908
954
|
"div",
|
|
909
955
|
{
|
|
910
956
|
ref: panelRef,
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
style: {
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
ref
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
)
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
957
|
+
"data-testid": "ladder-flyout-hit-area",
|
|
958
|
+
className: "z-50",
|
|
959
|
+
style: {
|
|
960
|
+
position: "fixed",
|
|
961
|
+
top: panelPosition.top - HOVER_SLOP,
|
|
962
|
+
left: panelPosition.left - PANEL_GAP,
|
|
963
|
+
padding: `${HOVER_SLOP}px ${HOVER_SLOP}px ${HOVER_SLOP}px ${PANEL_GAP}px`
|
|
964
|
+
},
|
|
965
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
966
|
+
"div",
|
|
967
|
+
{
|
|
968
|
+
id: panelId,
|
|
969
|
+
"data-testid": "ladder-flyout-panel",
|
|
970
|
+
className: cn(
|
|
971
|
+
"flex min-w-[12rem] flex-col gap-0.5 rounded-md border border-border bg-background p-2 shadow-lg",
|
|
972
|
+
!prefersReducedMotion && "transition-all duration-150 ease-out"
|
|
973
|
+
),
|
|
974
|
+
children: children.map((child, i) => (
|
|
975
|
+
// `ref` on the first row (DEV-4391): the "focus moves into the
|
|
976
|
+
// panel on click open" behavior above needs a real
|
|
977
|
+
// HTMLAnchorElement here. A custom `linkComponent` must forward
|
|
978
|
+
// its ref to the underlying <a> for that to keep working —
|
|
979
|
+
// true for `next/link` (the intended consumer here) and for any
|
|
980
|
+
// React 19 function component (ref-as-prop, no forwardRef
|
|
981
|
+
// needed). A non-forwarding custom component on React <19 just
|
|
982
|
+
// silently loses the focus-on-open behavior (a console ref
|
|
983
|
+
// warning, not a crash) — same tradeoff any Link-injection
|
|
984
|
+
// pattern accepts; not a regression from today's plain `<a>`.
|
|
985
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
986
|
+
LinkEl,
|
|
987
|
+
{
|
|
988
|
+
ref: i === 0 ? firstItemRef : void 0,
|
|
989
|
+
href: child.href,
|
|
990
|
+
"aria-current": child.active ? "page" : void 0,
|
|
991
|
+
style: TOUCH_TARGET_STYLE,
|
|
992
|
+
className: cn(
|
|
993
|
+
"flex items-center truncate rounded-md px-3 py-1.5 text-sm transition-colors",
|
|
994
|
+
child.active ? "bg-primary/10 text-foreground" : "text-muted-foreground hover:bg-foreground/5 hover:text-foreground"
|
|
995
|
+
),
|
|
996
|
+
children: child.label
|
|
997
|
+
},
|
|
998
|
+
child.moduleId
|
|
999
|
+
)
|
|
1000
|
+
))
|
|
1001
|
+
}
|
|
1002
|
+
)
|
|
945
1003
|
}
|
|
946
1004
|
)
|
|
947
1005
|
]
|
|
@@ -1122,6 +1180,7 @@ function AppSidebar({
|
|
|
1122
1180
|
linkComponent,
|
|
1123
1181
|
collapsed: collapsedRow,
|
|
1124
1182
|
forceClosed: openFlyoutId !== null && openFlyoutId !== item.id,
|
|
1183
|
+
hoverOpenDelayMs: openFlyoutId !== null && openFlyoutId !== item.id ? HOVER_SWITCH_DELAY_MS : 0,
|
|
1125
1184
|
onOpenChange: (isOpen) => handleFlyoutOpenChange(item.id, isOpen),
|
|
1126
1185
|
children
|
|
1127
1186
|
},
|
|
@@ -1303,8 +1362,12 @@ function groupItemsByOrg(rows, get) {
|
|
|
1303
1362
|
group.items.push(row);
|
|
1304
1363
|
}
|
|
1305
1364
|
const groups = [...byOrg.values()];
|
|
1365
|
+
const isPinned = get.pinned ?? (() => false);
|
|
1306
1366
|
for (const g of groups) {
|
|
1307
|
-
|
|
1367
|
+
const pinned = g.items.filter(isPinned);
|
|
1368
|
+
const rest = g.items.filter((row) => !isPinned(row));
|
|
1369
|
+
rest.sort((a, b) => get.name(a).localeCompare(get.name(b)));
|
|
1370
|
+
g.items = [...pinned, ...rest];
|
|
1308
1371
|
}
|
|
1309
1372
|
groups.sort((a, b) => (a.orgName ?? "").localeCompare(b.orgName ?? ""));
|
|
1310
1373
|
return groups;
|
|
@@ -1373,7 +1436,8 @@ function groupByOrg(items) {
|
|
|
1373
1436
|
return groupItemsByOrg(items, {
|
|
1374
1437
|
orgId: (it) => it.orgId,
|
|
1375
1438
|
orgName: (it) => it.orgName,
|
|
1376
|
-
name: (it) => it.name
|
|
1439
|
+
name: (it) => it.name,
|
|
1440
|
+
pinned: (it) => it.pinned === true
|
|
1377
1441
|
});
|
|
1378
1442
|
}
|
|
1379
1443
|
function toBrand(item) {
|
|
@@ -1432,17 +1496,33 @@ function ContextSwitcher({
|
|
|
1432
1496
|
children: [
|
|
1433
1497
|
groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { children: [
|
|
1434
1498
|
showOrgHeaders && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DropdownMenuLabel, { className: "px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: group.orgName ?? "Other" }),
|
|
1435
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn(showOrgHeaders && "ml-5 border-l border-border/60"), children: group.items.map((item) => {
|
|
1499
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: cn(showOrgHeaders && "ml-5 border-l border-border/60"), children: group.items.map((item, i) => {
|
|
1436
1500
|
const isActive = item.refId === activeRefId;
|
|
1501
|
+
const next = group.items[i + 1];
|
|
1502
|
+
const endsPinned = item.pinned === true && next !== void 0 && next.pinned !== true;
|
|
1437
1503
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1438
1504
|
DropdownMenuItem,
|
|
1439
1505
|
{
|
|
1440
1506
|
"data-active": isActive || void 0,
|
|
1507
|
+
"data-pinned": item.pinned || void 0,
|
|
1508
|
+
"data-emphasis": item.emphasis || void 0,
|
|
1441
1509
|
onSelect: () => onSelect(item),
|
|
1442
|
-
className:
|
|
1510
|
+
className: cn(
|
|
1511
|
+
"flex w-full items-center gap-2.5 rounded-none px-3 py-2 text-sm",
|
|
1512
|
+
endsPinned && "border-b border-border/60"
|
|
1513
|
+
),
|
|
1443
1514
|
children: [
|
|
1444
1515
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BrandGlyph, { brand: toBrand(item), subtle: true }),
|
|
1445
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1516
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1517
|
+
"span",
|
|
1518
|
+
{
|
|
1519
|
+
className: cn(
|
|
1520
|
+
"flex-1 truncate text-left",
|
|
1521
|
+
item.emphasis ? "font-semibold text-foreground" : "text-foreground/90"
|
|
1522
|
+
),
|
|
1523
|
+
children: item.name
|
|
1524
|
+
}
|
|
1525
|
+
),
|
|
1446
1526
|
item.kindLabel && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1447
1527
|
" ",
|
|
1448
1528
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: item.kindLabel })
|
|
@@ -2591,6 +2671,8 @@ function ManageSharing({
|
|
|
2591
2671
|
ContextSwitcher,
|
|
2592
2672
|
Flyout,
|
|
2593
2673
|
GLYPH_CANVAS_FILL,
|
|
2674
|
+
HOVER_CLOSE_DELAY_MS,
|
|
2675
|
+
HOVER_SWITCH_DELAY_MS,
|
|
2594
2676
|
InfoTip,
|
|
2595
2677
|
LOCKUP_GAP,
|
|
2596
2678
|
LOCKUP_ROW,
|
package/dist/index.mjs
CHANGED
|
@@ -739,6 +739,9 @@ function useLadderRung(ladder, containerRef, options = {}) {
|
|
|
739
739
|
import { useCallback as useCallback2, useEffect as useEffect4, useId as useId2, useLayoutEffect as useLayoutEffect2, useRef as useRef3, useState as useState5 } from "react";
|
|
740
740
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
741
741
|
var PANEL_GAP = 4;
|
|
742
|
+
var HOVER_CLOSE_DELAY_MS = 300;
|
|
743
|
+
var HOVER_SLOP = 16;
|
|
744
|
+
var HOVER_SWITCH_DELAY_MS = 150;
|
|
742
745
|
function Flyout({
|
|
743
746
|
label,
|
|
744
747
|
icon,
|
|
@@ -748,6 +751,7 @@ function Flyout({
|
|
|
748
751
|
collapsed = false,
|
|
749
752
|
onOpenChange,
|
|
750
753
|
forceClosed = false,
|
|
754
|
+
hoverOpenDelayMs = 0,
|
|
751
755
|
className
|
|
752
756
|
}) {
|
|
753
757
|
const [hoverOpen, setHoverOpen] = useState5(false);
|
|
@@ -759,9 +763,39 @@ function Flyout({
|
|
|
759
763
|
const triggerRef = useRef3(null);
|
|
760
764
|
const panelRef = useRef3(null);
|
|
761
765
|
const firstItemRef = useRef3(null);
|
|
766
|
+
const closeTimer = useRef3(null);
|
|
767
|
+
const openTimer = useRef3(null);
|
|
762
768
|
const prefersReducedMotion = useMediaQuery("(prefers-reduced-motion: reduce)");
|
|
763
769
|
const Icon = resolveIcon(icon);
|
|
764
770
|
const LinkEl = linkComponent ?? "a";
|
|
771
|
+
const cancelOpen = useCallback2(() => {
|
|
772
|
+
if (openTimer.current) clearTimeout(openTimer.current);
|
|
773
|
+
openTimer.current = null;
|
|
774
|
+
}, []);
|
|
775
|
+
const cancelClose = useCallback2(() => {
|
|
776
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
777
|
+
closeTimer.current = null;
|
|
778
|
+
cancelOpen();
|
|
779
|
+
}, [cancelOpen]);
|
|
780
|
+
const hoverEnter = () => {
|
|
781
|
+
cancelClose();
|
|
782
|
+
if (hoverOpenDelayMs <= 0) {
|
|
783
|
+
setHoverOpen(true);
|
|
784
|
+
return;
|
|
785
|
+
}
|
|
786
|
+
openTimer.current = setTimeout(() => {
|
|
787
|
+
openTimer.current = null;
|
|
788
|
+
setHoverOpen(true);
|
|
789
|
+
}, hoverOpenDelayMs);
|
|
790
|
+
};
|
|
791
|
+
const hoverLeave = () => {
|
|
792
|
+
cancelClose();
|
|
793
|
+
closeTimer.current = setTimeout(() => {
|
|
794
|
+
closeTimer.current = null;
|
|
795
|
+
setHoverOpen(false);
|
|
796
|
+
}, HOVER_CLOSE_DELAY_MS);
|
|
797
|
+
};
|
|
798
|
+
useEffect4(() => cancelClose, [cancelClose]);
|
|
765
799
|
const reposition = useCallback2(() => {
|
|
766
800
|
const rect = triggerRef.current?.getBoundingClientRect();
|
|
767
801
|
if (rect) setPanelPosition({ top: rect.top, left: rect.right + PANEL_GAP });
|
|
@@ -773,10 +807,11 @@ function Flyout({
|
|
|
773
807
|
}, [wantsOpen]);
|
|
774
808
|
useEffect4(() => {
|
|
775
809
|
if (forceClosed) {
|
|
810
|
+
cancelClose();
|
|
776
811
|
setHoverOpen(false);
|
|
777
812
|
setClickOpen(false);
|
|
778
813
|
}
|
|
779
|
-
}, [forceClosed]);
|
|
814
|
+
}, [forceClosed, cancelClose]);
|
|
780
815
|
useLayoutEffect2(() => {
|
|
781
816
|
if (open) reposition();
|
|
782
817
|
}, [open, reposition]);
|
|
@@ -792,6 +827,7 @@ function Flyout({
|
|
|
792
827
|
useDismissableDisclosure({
|
|
793
828
|
open,
|
|
794
829
|
onClose: () => {
|
|
830
|
+
cancelOpen();
|
|
795
831
|
setHoverOpen(false);
|
|
796
832
|
setClickOpen(false);
|
|
797
833
|
},
|
|
@@ -806,8 +842,8 @@ function Flyout({
|
|
|
806
842
|
{
|
|
807
843
|
"data-testid": "ladder-flyout",
|
|
808
844
|
className: cn("relative", className),
|
|
809
|
-
onMouseEnter:
|
|
810
|
-
onMouseLeave:
|
|
845
|
+
onMouseEnter: hoverEnter,
|
|
846
|
+
onMouseLeave: hoverLeave,
|
|
811
847
|
children: [
|
|
812
848
|
/* @__PURE__ */ jsxs4(
|
|
813
849
|
"button",
|
|
@@ -818,7 +854,10 @@ function Flyout({
|
|
|
818
854
|
"aria-expanded": open,
|
|
819
855
|
"aria-controls": panelId,
|
|
820
856
|
title: collapsed ? label : void 0,
|
|
821
|
-
onClick: () =>
|
|
857
|
+
onClick: () => {
|
|
858
|
+
cancelOpen();
|
|
859
|
+
setClickOpen((v) => !v);
|
|
860
|
+
},
|
|
822
861
|
className: cn(
|
|
823
862
|
"group flex w-full items-center gap-2.5 rounded-md px-3 py-1.5 text-sm transition-colors",
|
|
824
863
|
collapsed && "justify-center px-0",
|
|
@@ -847,44 +886,61 @@ function Flyout({
|
|
|
847
886
|
]
|
|
848
887
|
}
|
|
849
888
|
),
|
|
850
|
-
open && panelPosition &&
|
|
889
|
+
open && panelPosition && // DEV-13848 hit area: a DOM child of the wrapper above, so the pointer
|
|
890
|
+
// moving through it never fires the wrapper's mouseleave. Starts at
|
|
891
|
+
// the trigger's right edge (bridging PANEL_GAP) and pads HOVER_SLOP
|
|
892
|
+
// around the panel; the panel itself renders exactly where it did.
|
|
893
|
+
// `panelRef` lives here so a click in the slop isn't an "outside" one.
|
|
894
|
+
/* @__PURE__ */ jsx4(
|
|
851
895
|
"div",
|
|
852
896
|
{
|
|
853
897
|
ref: panelRef,
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
style: {
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
ref
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
898
|
+
"data-testid": "ladder-flyout-hit-area",
|
|
899
|
+
className: "z-50",
|
|
900
|
+
style: {
|
|
901
|
+
position: "fixed",
|
|
902
|
+
top: panelPosition.top - HOVER_SLOP,
|
|
903
|
+
left: panelPosition.left - PANEL_GAP,
|
|
904
|
+
padding: `${HOVER_SLOP}px ${HOVER_SLOP}px ${HOVER_SLOP}px ${PANEL_GAP}px`
|
|
905
|
+
},
|
|
906
|
+
children: /* @__PURE__ */ jsx4(
|
|
907
|
+
"div",
|
|
908
|
+
{
|
|
909
|
+
id: panelId,
|
|
910
|
+
"data-testid": "ladder-flyout-panel",
|
|
911
|
+
className: cn(
|
|
912
|
+
"flex min-w-[12rem] flex-col gap-0.5 rounded-md border border-border bg-background p-2 shadow-lg",
|
|
913
|
+
!prefersReducedMotion && "transition-all duration-150 ease-out"
|
|
914
|
+
),
|
|
915
|
+
children: children.map((child, i) => (
|
|
916
|
+
// `ref` on the first row (DEV-4391): the "focus moves into the
|
|
917
|
+
// panel on click open" behavior above needs a real
|
|
918
|
+
// HTMLAnchorElement here. A custom `linkComponent` must forward
|
|
919
|
+
// its ref to the underlying <a> for that to keep working —
|
|
920
|
+
// true for `next/link` (the intended consumer here) and for any
|
|
921
|
+
// React 19 function component (ref-as-prop, no forwardRef
|
|
922
|
+
// needed). A non-forwarding custom component on React <19 just
|
|
923
|
+
// silently loses the focus-on-open behavior (a console ref
|
|
924
|
+
// warning, not a crash) — same tradeoff any Link-injection
|
|
925
|
+
// pattern accepts; not a regression from today's plain `<a>`.
|
|
926
|
+
/* @__PURE__ */ jsx4(
|
|
927
|
+
LinkEl,
|
|
928
|
+
{
|
|
929
|
+
ref: i === 0 ? firstItemRef : void 0,
|
|
930
|
+
href: child.href,
|
|
931
|
+
"aria-current": child.active ? "page" : void 0,
|
|
932
|
+
style: TOUCH_TARGET_STYLE,
|
|
933
|
+
className: cn(
|
|
934
|
+
"flex items-center truncate rounded-md px-3 py-1.5 text-sm transition-colors",
|
|
935
|
+
child.active ? "bg-primary/10 text-foreground" : "text-muted-foreground hover:bg-foreground/5 hover:text-foreground"
|
|
936
|
+
),
|
|
937
|
+
children: child.label
|
|
938
|
+
},
|
|
939
|
+
child.moduleId
|
|
940
|
+
)
|
|
941
|
+
))
|
|
942
|
+
}
|
|
943
|
+
)
|
|
888
944
|
}
|
|
889
945
|
)
|
|
890
946
|
]
|
|
@@ -1065,6 +1121,7 @@ function AppSidebar({
|
|
|
1065
1121
|
linkComponent,
|
|
1066
1122
|
collapsed: collapsedRow,
|
|
1067
1123
|
forceClosed: openFlyoutId !== null && openFlyoutId !== item.id,
|
|
1124
|
+
hoverOpenDelayMs: openFlyoutId !== null && openFlyoutId !== item.id ? HOVER_SWITCH_DELAY_MS : 0,
|
|
1068
1125
|
onOpenChange: (isOpen) => handleFlyoutOpenChange(item.id, isOpen),
|
|
1069
1126
|
children
|
|
1070
1127
|
},
|
|
@@ -1246,8 +1303,12 @@ function groupItemsByOrg(rows, get) {
|
|
|
1246
1303
|
group.items.push(row);
|
|
1247
1304
|
}
|
|
1248
1305
|
const groups = [...byOrg.values()];
|
|
1306
|
+
const isPinned = get.pinned ?? (() => false);
|
|
1249
1307
|
for (const g of groups) {
|
|
1250
|
-
|
|
1308
|
+
const pinned = g.items.filter(isPinned);
|
|
1309
|
+
const rest = g.items.filter((row) => !isPinned(row));
|
|
1310
|
+
rest.sort((a, b) => get.name(a).localeCompare(get.name(b)));
|
|
1311
|
+
g.items = [...pinned, ...rest];
|
|
1251
1312
|
}
|
|
1252
1313
|
groups.sort((a, b) => (a.orgName ?? "").localeCompare(b.orgName ?? ""));
|
|
1253
1314
|
return groups;
|
|
@@ -1316,7 +1377,8 @@ function groupByOrg(items) {
|
|
|
1316
1377
|
return groupItemsByOrg(items, {
|
|
1317
1378
|
orgId: (it) => it.orgId,
|
|
1318
1379
|
orgName: (it) => it.orgName,
|
|
1319
|
-
name: (it) => it.name
|
|
1380
|
+
name: (it) => it.name,
|
|
1381
|
+
pinned: (it) => it.pinned === true
|
|
1320
1382
|
});
|
|
1321
1383
|
}
|
|
1322
1384
|
function toBrand(item) {
|
|
@@ -1375,17 +1437,33 @@ function ContextSwitcher({
|
|
|
1375
1437
|
children: [
|
|
1376
1438
|
groups.map((group) => /* @__PURE__ */ jsxs6("div", { children: [
|
|
1377
1439
|
showOrgHeaders && /* @__PURE__ */ jsx7(DropdownMenuLabel, { className: "px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground", children: group.orgName ?? "Other" }),
|
|
1378
|
-
/* @__PURE__ */ jsx7("div", { className: cn(showOrgHeaders && "ml-5 border-l border-border/60"), children: group.items.map((item) => {
|
|
1440
|
+
/* @__PURE__ */ jsx7("div", { className: cn(showOrgHeaders && "ml-5 border-l border-border/60"), children: group.items.map((item, i) => {
|
|
1379
1441
|
const isActive = item.refId === activeRefId;
|
|
1442
|
+
const next = group.items[i + 1];
|
|
1443
|
+
const endsPinned = item.pinned === true && next !== void 0 && next.pinned !== true;
|
|
1380
1444
|
return /* @__PURE__ */ jsxs6(
|
|
1381
1445
|
DropdownMenuItem,
|
|
1382
1446
|
{
|
|
1383
1447
|
"data-active": isActive || void 0,
|
|
1448
|
+
"data-pinned": item.pinned || void 0,
|
|
1449
|
+
"data-emphasis": item.emphasis || void 0,
|
|
1384
1450
|
onSelect: () => onSelect(item),
|
|
1385
|
-
className:
|
|
1451
|
+
className: cn(
|
|
1452
|
+
"flex w-full items-center gap-2.5 rounded-none px-3 py-2 text-sm",
|
|
1453
|
+
endsPinned && "border-b border-border/60"
|
|
1454
|
+
),
|
|
1386
1455
|
children: [
|
|
1387
1456
|
/* @__PURE__ */ jsx7(BrandGlyph, { brand: toBrand(item), subtle: true }),
|
|
1388
|
-
/* @__PURE__ */ jsx7(
|
|
1457
|
+
/* @__PURE__ */ jsx7(
|
|
1458
|
+
"span",
|
|
1459
|
+
{
|
|
1460
|
+
className: cn(
|
|
1461
|
+
"flex-1 truncate text-left",
|
|
1462
|
+
item.emphasis ? "font-semibold text-foreground" : "text-foreground/90"
|
|
1463
|
+
),
|
|
1464
|
+
children: item.name
|
|
1465
|
+
}
|
|
1466
|
+
),
|
|
1389
1467
|
item.kindLabel && /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
1390
1468
|
" ",
|
|
1391
1469
|
/* @__PURE__ */ jsx7("span", { className: "shrink-0 text-[11px] text-muted-foreground", children: item.kindLabel })
|
|
@@ -2533,6 +2611,8 @@ export {
|
|
|
2533
2611
|
ContextSwitcher,
|
|
2534
2612
|
Flyout,
|
|
2535
2613
|
GLYPH_CANVAS_FILL,
|
|
2614
|
+
HOVER_CLOSE_DELAY_MS,
|
|
2615
|
+
HOVER_SWITCH_DELAY_MS,
|
|
2536
2616
|
InfoTip,
|
|
2537
2617
|
LOCKUP_GAP,
|
|
2538
2618
|
LOCKUP_ROW,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meetreeve/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Shared brand-adaptive UI primitives for MindFortress frontends — min-size tokens, a favicon→logo→monogram BrandGlyph, a responsive header that keeps the search bar usable on mobile, AppSidebar's viewport-driven auto-collapse ladder, and the StageRail flow-of-cards primitives.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"main": "./dist/index.js",
|