@trackunit/react-components 5.0.1 → 6.0.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/index.cjs.js CHANGED
@@ -1270,64 +1270,6 @@ const Popover = ({ children, isModal = false, ...restOptions }) => {
1270
1270
  : children }) }));
1271
1271
  };
1272
1272
 
1273
- /** @internal */
1274
- const PORTAL_CONTAINER = "portal-container";
1275
- /**
1276
- * Creates or retrieves the default portal container element
1277
- *
1278
- * @internal
1279
- */
1280
- const getDefaultPortalContainer = () => {
1281
- let container = document.getElementById(PORTAL_CONTAINER);
1282
- if (!container) {
1283
- container = document.createElement("div");
1284
- container.id = PORTAL_CONTAINER;
1285
- document.body.appendChild(container);
1286
- }
1287
- return container;
1288
- };
1289
-
1290
- /**
1291
- * Portal renders its children into a separate DOM node, outside the normal React tree hierarchy.
1292
- * By default, content is portalled into a z-index-isolated `div#portal-container` in the document body.
1293
- * This is used internally by Popover, Tooltip, and other overlay components.
1294
- *
1295
- * ### When to use
1296
- * Use Portal when you need to render content (modals, popovers, tooltips) outside its parent's DOM hierarchy to avoid z-index or overflow clipping issues.
1297
- *
1298
- * ### When not to use
1299
- * Do not use Portal for regular content rendering. Most overlay components (`Popover`, `Tooltip`) already use Portal internally.
1300
- *
1301
- * @example Rendering into a specific container
1302
- * ```tsx
1303
- * import { Portal } from "@trackunit/react-components";
1304
- *
1305
- * const PortalledContent = () => (
1306
- * <Portal root={document.getElementById('sidebar-container')}>
1307
- * <div className="p-4">This content renders in #sidebar-container</div>
1308
- * </Portal>
1309
- * );
1310
- * ```
1311
- * @example Default portal into document body
1312
- * ```tsx
1313
- * import { Portal } from "@trackunit/react-components";
1314
- *
1315
- * const FloatingContent = ({ isVisible }: { isVisible: boolean }) => (
1316
- * isVisible ? (
1317
- * <Portal>
1318
- * <div className="fixed bottom-4 right-4 bg-white p-4 rounded-lg shadow-lg">
1319
- * Toast notification content
1320
- * </div>
1321
- * </Portal>
1322
- * ) : null
1323
- * );
1324
- * @param {PortalProps} props - The props for the Portal component
1325
- * @returns {ReactElement} Portal component
1326
- */
1327
- const Portal = (props) => {
1328
- return jsxRuntime.jsx(react$1.FloatingPortal, { ...props, root: props.root ?? getDefaultPortalContainer() });
1329
- };
1330
-
1331
1273
  const OVERFLOW_CLIPS = new Set(["auto", "scroll", "hidden", "clip"]);
1332
1274
  const clips = (overflow) => OVERFLOW_CLIPS.has(overflow);
1333
1275
  const rectsDisjoint = (a, b) => a.right <= b.left || a.left >= b.right || a.bottom <= b.top || a.top >= b.bottom;
@@ -1440,7 +1382,7 @@ const PopoverContent = function PopoverContent({ className, "data-testid": dataT
1440
1382
  // Floating UI's own app-wide "previously focused element" tracking, which isn't exposed here to
1441
1383
  // check against.
1442
1384
  const resolvedReturnFocus = typeof returnFocus === "boolean" ? returnFocus : withVisibilityCheck(returnFocus);
1443
- return (jsxRuntime.jsx(Portal, { id: portalId, children: context.isOpen === true ? (jsxRuntime.jsx(react$1.FloatingFocusManager, { closeOnFocusOut: false, context: floatingContext, guards: true, initialFocus: initialFocus, modal: context.isModal, order: ["reference", "content"], returnFocus: resolvedReturnFocus, children: jsxRuntime.jsx("div", { "aria-describedby": context.descriptionId, "aria-labelledby": context.labelId, className: cvaPopoverContainer({ className: className ?? customProps.className }), "data-testid": dataTestId ?? customProps["data-testid"] ?? "popover-content", ref: ref, style: {
1385
+ return (jsxRuntime.jsx(react$1.FloatingPortal, { id: portalId, root: document.body, children: context.isOpen === true ? (jsxRuntime.jsx(react$1.FloatingFocusManager, { closeOnFocusOut: false, context: floatingContext, guards: true, initialFocus: initialFocus, modal: context.isModal, order: ["reference", "content"], returnFocus: resolvedReturnFocus, children: jsxRuntime.jsx("div", { "aria-describedby": context.descriptionId, "aria-labelledby": context.labelId, className: cvaPopoverContainer({ className: className ?? customProps.className }), "data-testid": dataTestId ?? customProps["data-testid"] ?? "popover-content", ref: ref, style: {
1444
1386
  position: context.strategy,
1445
1387
  top: context.y,
1446
1388
  left: context.x,
@@ -11433,7 +11375,7 @@ const useSheetMotionOverflow = ({ panelEl, isDragging, scrollAreaEl, separatorEl
11433
11375
  *
11434
11376
  * Use Sheet for contextual surfaces that slide up from the bottom of a
11435
11377
  * container -- action menus, detail panels, element settings, or filters.
11436
- * Every Sheet renders via Portal into a required `container` element.
11378
+ * Every Sheet renders via a portal into a required `container` element.
11437
11379
  * On small screens, consider using Sheet instead of a Popover for better
11438
11380
  * touch UX. For app-level blocking dialogs, use Modal instead (which
11439
11381
  * automatically renders as a Sheet on small screens).
@@ -11570,7 +11512,7 @@ const Sheet = ({ isOpen, state, snap, onGeometryChange, onSnap, onClickHandle, o
11570
11512
  suppressTransition: skipEntryAnimation && animState.visuallyOpen,
11571
11513
  variant,
11572
11514
  }), style), children: [resizable ? (jsxRuntime.jsx(SheetHandle, { "data-testid": dataTestId !== undefined ? `${dataTestId}-handle` : undefined, isDragging: gestures.isDragging, onClick: handleClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, ...gestureHandlers })) : null, jsxRuntime.jsx("div", { className: "h-px shrink-0 bg-neutral-200 opacity-0 transition-opacity duration-200", ref: setSeparatorEl }), jsxRuntime.jsxs("div", { className: cvaSheetScrollArea({ fillHeight: state.sizingMode !== "fit" }), "data-sheet-scroll-area": true, ref: setScrollAreaEl, children: [persistentContent, state.sizingMode === "docked" ? dockedContent : children] })] }));
11573
- return (jsxRuntime.jsx(Portal, { root: container, children: jsxRuntime.jsxs("div", { className: cvaSheetContainer({
11515
+ return (jsxRuntime.jsx(react$1.FloatingPortal, { root: container, children: jsxRuntime.jsxs("div", { className: cvaSheetContainer({
11574
11516
  docked: state.sizingMode === "docked",
11575
11517
  }), "data-testid": dataTestId !== undefined ? `${dataTestId}-container` : undefined, ref: containerRef, children: [jsxRuntime.jsx(SheetOverlay, { "data-testid": dataTestId !== undefined ? `${dataTestId}-overlay` : undefined, visible: showOverlay }), shouldTrapFocus === true ? (jsxRuntime.jsx(react$1.FloatingFocusManager, { context: floatingUi.context, children: panel })) : (panel)] }) }));
11576
11518
  };
@@ -14667,7 +14609,6 @@ exports.Popover = Popover;
14667
14609
  exports.PopoverContent = PopoverContent;
14668
14610
  exports.PopoverTitle = PopoverTitle;
14669
14611
  exports.PopoverTrigger = PopoverTrigger;
14670
- exports.Portal = Portal;
14671
14612
  exports.PreferenceCard = PreferenceCard;
14672
14613
  exports.PreferenceCardSkeleton = PreferenceCardSkeleton;
14673
14614
  exports.Prompt = Prompt;
package/index.esm.js CHANGED
@@ -12,7 +12,7 @@ import IconSpriteOutline from '@trackunit/ui-icons/icons-sprite-outline.svg';
12
12
  import IconSpriteSolid from '@trackunit/ui-icons/icons-sprite-solid.svg';
13
13
  import { snakeCase, titleCase } from 'string-ts';
14
14
  import { cva } from '@trackunit/css-class-variance-utilities';
15
- import { FloatingTree, useFloatingNodeId, useFloatingParentNodeId, useFloatingTree, offset, flip, shift, size, useFloating, autoUpdate, useClick, useDismiss, useHover as useHover$1, safePolygon, useRole, useInteractions, FloatingNode, FloatingPortal, useMergeRefs as useMergeRefs$1, FloatingFocusManager, arrow, useTransitionStatus, FloatingArrow, useListNavigation, useTypeahead, FloatingList, useListItem } from '@floating-ui/react';
15
+ import { FloatingTree, useFloatingNodeId, useFloatingParentNodeId, useFloatingTree, offset, flip, shift, size, useFloating, autoUpdate, useClick, useDismiss, useHover as useHover$1, safePolygon, useRole, useInteractions, FloatingNode, useMergeRefs as useMergeRefs$1, FloatingPortal, FloatingFocusManager, arrow, useTransitionStatus, FloatingArrow, useListNavigation, useTypeahead, FloatingList, useListItem } from '@floating-ui/react';
16
16
  import { Slot, Slottable } from '@radix-ui/react-slot';
17
17
  import { omit, isEqual } from 'es-toolkit';
18
18
  import { Link, useBlocker } from '@tanstack/react-router';
@@ -1269,64 +1269,6 @@ const Popover = ({ children, isModal = false, ...restOptions }) => {
1269
1269
  : children }) }));
1270
1270
  };
1271
1271
 
1272
- /** @internal */
1273
- const PORTAL_CONTAINER = "portal-container";
1274
- /**
1275
- * Creates or retrieves the default portal container element
1276
- *
1277
- * @internal
1278
- */
1279
- const getDefaultPortalContainer = () => {
1280
- let container = document.getElementById(PORTAL_CONTAINER);
1281
- if (!container) {
1282
- container = document.createElement("div");
1283
- container.id = PORTAL_CONTAINER;
1284
- document.body.appendChild(container);
1285
- }
1286
- return container;
1287
- };
1288
-
1289
- /**
1290
- * Portal renders its children into a separate DOM node, outside the normal React tree hierarchy.
1291
- * By default, content is portalled into a z-index-isolated `div#portal-container` in the document body.
1292
- * This is used internally by Popover, Tooltip, and other overlay components.
1293
- *
1294
- * ### When to use
1295
- * Use Portal when you need to render content (modals, popovers, tooltips) outside its parent's DOM hierarchy to avoid z-index or overflow clipping issues.
1296
- *
1297
- * ### When not to use
1298
- * Do not use Portal for regular content rendering. Most overlay components (`Popover`, `Tooltip`) already use Portal internally.
1299
- *
1300
- * @example Rendering into a specific container
1301
- * ```tsx
1302
- * import { Portal } from "@trackunit/react-components";
1303
- *
1304
- * const PortalledContent = () => (
1305
- * <Portal root={document.getElementById('sidebar-container')}>
1306
- * <div className="p-4">This content renders in #sidebar-container</div>
1307
- * </Portal>
1308
- * );
1309
- * ```
1310
- * @example Default portal into document body
1311
- * ```tsx
1312
- * import { Portal } from "@trackunit/react-components";
1313
- *
1314
- * const FloatingContent = ({ isVisible }: { isVisible: boolean }) => (
1315
- * isVisible ? (
1316
- * <Portal>
1317
- * <div className="fixed bottom-4 right-4 bg-white p-4 rounded-lg shadow-lg">
1318
- * Toast notification content
1319
- * </div>
1320
- * </Portal>
1321
- * ) : null
1322
- * );
1323
- * @param {PortalProps} props - The props for the Portal component
1324
- * @returns {ReactElement} Portal component
1325
- */
1326
- const Portal = (props) => {
1327
- return jsx(FloatingPortal, { ...props, root: props.root ?? getDefaultPortalContainer() });
1328
- };
1329
-
1330
1272
  const OVERFLOW_CLIPS = new Set(["auto", "scroll", "hidden", "clip"]);
1331
1273
  const clips = (overflow) => OVERFLOW_CLIPS.has(overflow);
1332
1274
  const rectsDisjoint = (a, b) => a.right <= b.left || a.left >= b.right || a.bottom <= b.top || a.top >= b.bottom;
@@ -1439,7 +1381,7 @@ const PopoverContent = function PopoverContent({ className, "data-testid": dataT
1439
1381
  // Floating UI's own app-wide "previously focused element" tracking, which isn't exposed here to
1440
1382
  // check against.
1441
1383
  const resolvedReturnFocus = typeof returnFocus === "boolean" ? returnFocus : withVisibilityCheck(returnFocus);
1442
- return (jsx(Portal, { id: portalId, children: context.isOpen === true ? (jsx(FloatingFocusManager, { closeOnFocusOut: false, context: floatingContext, guards: true, initialFocus: initialFocus, modal: context.isModal, order: ["reference", "content"], returnFocus: resolvedReturnFocus, children: jsx("div", { "aria-describedby": context.descriptionId, "aria-labelledby": context.labelId, className: cvaPopoverContainer({ className: className ?? customProps.className }), "data-testid": dataTestId ?? customProps["data-testid"] ?? "popover-content", ref: ref, style: {
1384
+ return (jsx(FloatingPortal, { id: portalId, root: document.body, children: context.isOpen === true ? (jsx(FloatingFocusManager, { closeOnFocusOut: false, context: floatingContext, guards: true, initialFocus: initialFocus, modal: context.isModal, order: ["reference", "content"], returnFocus: resolvedReturnFocus, children: jsx("div", { "aria-describedby": context.descriptionId, "aria-labelledby": context.labelId, className: cvaPopoverContainer({ className: className ?? customProps.className }), "data-testid": dataTestId ?? customProps["data-testid"] ?? "popover-content", ref: ref, style: {
1443
1385
  position: context.strategy,
1444
1386
  top: context.y,
1445
1387
  left: context.x,
@@ -11432,7 +11374,7 @@ const useSheetMotionOverflow = ({ panelEl, isDragging, scrollAreaEl, separatorEl
11432
11374
  *
11433
11375
  * Use Sheet for contextual surfaces that slide up from the bottom of a
11434
11376
  * container -- action menus, detail panels, element settings, or filters.
11435
- * Every Sheet renders via Portal into a required `container` element.
11377
+ * Every Sheet renders via a portal into a required `container` element.
11436
11378
  * On small screens, consider using Sheet instead of a Popover for better
11437
11379
  * touch UX. For app-level blocking dialogs, use Modal instead (which
11438
11380
  * automatically renders as a Sheet on small screens).
@@ -11569,7 +11511,7 @@ const Sheet = ({ isOpen, state, snap, onGeometryChange, onSnap, onClickHandle, o
11569
11511
  suppressTransition: skipEntryAnimation && animState.visuallyOpen,
11570
11512
  variant,
11571
11513
  }), style), children: [resizable ? (jsx(SheetHandle, { "data-testid": dataTestId !== undefined ? `${dataTestId}-handle` : undefined, isDragging: gestures.isDragging, onClick: handleClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, ...gestureHandlers })) : null, jsx("div", { className: "h-px shrink-0 bg-neutral-200 opacity-0 transition-opacity duration-200", ref: setSeparatorEl }), jsxs("div", { className: cvaSheetScrollArea({ fillHeight: state.sizingMode !== "fit" }), "data-sheet-scroll-area": true, ref: setScrollAreaEl, children: [persistentContent, state.sizingMode === "docked" ? dockedContent : children] })] }));
11572
- return (jsx(Portal, { root: container, children: jsxs("div", { className: cvaSheetContainer({
11514
+ return (jsx(FloatingPortal, { root: container, children: jsxs("div", { className: cvaSheetContainer({
11573
11515
  docked: state.sizingMode === "docked",
11574
11516
  }), "data-testid": dataTestId !== undefined ? `${dataTestId}-container` : undefined, ref: containerRef, children: [jsx(SheetOverlay, { "data-testid": dataTestId !== undefined ? `${dataTestId}-overlay` : undefined, visible: showOverlay }), shouldTrapFocus === true ? (jsx(FloatingFocusManager, { context: floatingUi.context, children: panel })) : (panel)] }) }));
11575
11517
  };
@@ -14610,4 +14552,4 @@ const useWindowActivity = ({ onFocus, onBlur, skip = false } = { onBlur: undefin
14610
14552
  */
14611
14553
  setupLibraryTranslations();
14612
14554
 
14613
- export { Alert, Badge, Button, Card, CardBody, CardFooter, CardHeader, Collapse, CompletionStatusIndicator, CopyButton, CopyableValue, DEFAULT_SKELETON_PREFERENCE_CARD_PROPS, DetailsList, EmptyState, EmptyValue, ExternalLink, GridAreas, Heading, Highlight, HorizontalOverflowScroller, Icon, IconButton, IdentityCard, IdentityCardSkeleton, Indicator, KPI, KPICard, KPICardSkeleton, KPISkeleton, LabeledValue, LabeledValueList, List, ListItem, MenuContent, MenuDivider, MenuItem, MenuTree, MoreMenu, Notice, PackageNameStoryComponent, Page, PageContent, PageHeader, PageHeaderKpiMetrics, PageHeaderSecondaryActions, PageHeaderTitle, Pagination, Polygon, Popover, PopoverContent, PopoverTitle, PopoverTrigger, Portal, PreferenceCard, PreferenceCardSkeleton, Prompt, ROLE_CARD, SHEET_TRANSITION_DURATION, SHEET_TRANSITION_DURATION_MS, SHEET_TRANSITION_EASING, SectionHeader, SegmentedValueBar, Sheet, Sidebar, SidebarContentLayout, SkeletonBlock, SkeletonLabel, SkeletonLines, Spacer, Spinner, StarButton, Tab, TabContent, TabList, Tabs, Tag, Text, ToggleGroup, Tooltip, TrendIndicator, TrendIndicators, ValueBar, ZStack, createGrid, cvaButton, cvaButtonPrefixSuffix, cvaButtonSpinner, cvaButtonSpinnerContainer, cvaClickable, cvaContainerStyles, cvaContentContainer, cvaContentWrapper, cvaDescriptionCard, cvaIconBackground, cvaIconButton, cvaImgStyles, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaInputContainer, cvaInteractableItem, cvaList, cvaListContainer, cvaListItem$1 as cvaListItem, cvaMenu, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemStyle, cvaMenuItemSuffix, cvaMenuList, cvaMenuListDivider, cvaMenuListItem, cvaMenuListMultiSelect, cvaPageHeader, cvaPageHeaderContainer, cvaPageHeaderHeading, cvaPreferenceCard, cvaTitleCard, cvaToggleGroup, cvaToggleGroupWithSlidingBackground, cvaToggleItem, cvaToggleItemContent, cvaToggleItemText, cvaZStackContainer, cvaZStackItem, defaultPageSize, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, noPagination, preferenceCardGrid, useBidirectionalScroll, useClickOutside, useContainerBreakpoints, useCopyToClipboard, useCustomEncoding, useDebounce, useDevicePixelRatio, useElevatedReducer, useElevatedState, useGridAreas, useHold, useHover, useInfiniteScroll, useIsFirstRender, useIsFullscreen, useIsTextTruncated, useKeyboardShortcut, useList, useListItemHeight, useLocalStorage, useLocalStorageReducer, useMeasure, useMenuSearchField, useMenuTree, useMergeRefs, useModifierKey, useOptionalPopoverContext, useOverflowBorder, useOverflowItems, usePopoverContext, usePrevious, usePrompt, useRandomCSSLengths, useRelayPagination, useResize, useScrollBlock, useScrollDetection, useSessionStorage, useSessionStorageReducer, useSheet, useSheetSnap, useStorageKey, useStripForeignIdentityHash, useTextSearch, useTimeout, useViewportBreakpoints, useWatch, useWindowActivity };
14555
+ export { Alert, Badge, Button, Card, CardBody, CardFooter, CardHeader, Collapse, CompletionStatusIndicator, CopyButton, CopyableValue, DEFAULT_SKELETON_PREFERENCE_CARD_PROPS, DetailsList, EmptyState, EmptyValue, ExternalLink, GridAreas, Heading, Highlight, HorizontalOverflowScroller, Icon, IconButton, IdentityCard, IdentityCardSkeleton, Indicator, KPI, KPICard, KPICardSkeleton, KPISkeleton, LabeledValue, LabeledValueList, List, ListItem, MenuContent, MenuDivider, MenuItem, MenuTree, MoreMenu, Notice, PackageNameStoryComponent, Page, PageContent, PageHeader, PageHeaderKpiMetrics, PageHeaderSecondaryActions, PageHeaderTitle, Pagination, Polygon, Popover, PopoverContent, PopoverTitle, PopoverTrigger, PreferenceCard, PreferenceCardSkeleton, Prompt, ROLE_CARD, SHEET_TRANSITION_DURATION, SHEET_TRANSITION_DURATION_MS, SHEET_TRANSITION_EASING, SectionHeader, SegmentedValueBar, Sheet, Sidebar, SidebarContentLayout, SkeletonBlock, SkeletonLabel, SkeletonLines, Spacer, Spinner, StarButton, Tab, TabContent, TabList, Tabs, Tag, Text, ToggleGroup, Tooltip, TrendIndicator, TrendIndicators, ValueBar, ZStack, createGrid, cvaButton, cvaButtonPrefixSuffix, cvaButtonSpinner, cvaButtonSpinnerContainer, cvaClickable, cvaContainerStyles, cvaContentContainer, cvaContentWrapper, cvaDescriptionCard, cvaIconBackground, cvaIconButton, cvaImgStyles, cvaIndicator, cvaIndicatorIcon, cvaIndicatorIconBackground, cvaIndicatorLabel, cvaIndicatorPing, cvaInputContainer, cvaInteractableItem, cvaList, cvaListContainer, cvaListItem$1 as cvaListItem, cvaMenu, cvaMenuItem, cvaMenuItemLabel, cvaMenuItemPrefix, cvaMenuItemStyle, cvaMenuItemSuffix, cvaMenuList, cvaMenuListDivider, cvaMenuListItem, cvaMenuListMultiSelect, cvaPageHeader, cvaPageHeaderContainer, cvaPageHeaderHeading, cvaPreferenceCard, cvaTitleCard, cvaToggleGroup, cvaToggleGroupWithSlidingBackground, cvaToggleItem, cvaToggleItemContent, cvaToggleItemText, cvaZStackContainer, cvaZStackItem, defaultPageSize, docs, getDevicePixelRatio, getValueBarColorByValue, iconColorNames, iconPalette, noPagination, preferenceCardGrid, useBidirectionalScroll, useClickOutside, useContainerBreakpoints, useCopyToClipboard, useCustomEncoding, useDebounce, useDevicePixelRatio, useElevatedReducer, useElevatedState, useGridAreas, useHold, useHover, useInfiniteScroll, useIsFirstRender, useIsFullscreen, useIsTextTruncated, useKeyboardShortcut, useList, useListItemHeight, useLocalStorage, useLocalStorageReducer, useMeasure, useMenuSearchField, useMenuTree, useMergeRefs, useModifierKey, useOptionalPopoverContext, useOverflowBorder, useOverflowItems, usePopoverContext, usePrevious, usePrompt, useRandomCSSLengths, useRelayPagination, useResize, useScrollBlock, useScrollDetection, useSessionStorage, useSessionStorageReducer, useSheet, useSheetSnap, useStorageKey, useStripForeignIdentityHash, useTextSearch, useTimeout, useViewportBreakpoints, useWatch, useWindowActivity };
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@trackunit/react-router-components",
3
- "version": "1.2.2",
3
+ "version": "1.3.5",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
7
7
  "node": ">=24.x"
8
8
  },
9
9
  "dependencies": {
10
- "@trackunit/css-class-variance-utilities": "2.6.10",
11
- "@trackunit/i18n-library-translation": "2.13.2",
12
- "@trackunit/react-components": "5.0.1",
13
- "@trackunit/react-drawer": "2.16.2",
14
- "@trackunit/shared-utils": "1.22.10",
10
+ "@trackunit/css-class-variance-utilities": "2.6.14",
11
+ "@trackunit/i18n-library-translation": "2.14.4",
12
+ "@trackunit/react-components": "6.0.4",
13
+ "@trackunit/react-drawer": "2.17.5",
14
+ "@trackunit/shared-utils": "1.22.14",
15
15
  "dequal": "^2.0.3",
16
16
  "zod": "^3.25.76"
17
17
  },
package/migrations.json CHANGED
@@ -40,10 +40,10 @@
40
40
  "description": "Remove the no-longer-supported style property from inline ToggleGroup list items.",
41
41
  "implementation": "./migrations/v2-0-0/togglegroup-remove-item-style"
42
42
  },
43
- "v3-0-0-menulist-rename-to-menucontent": {
44
- "version": "3.0.0",
43
+ "v2-6-0-menulist-rename-to-menucontent": {
44
+ "version": "2.6.0",
45
45
  "description": "Rename MenuList/MenuListProps to MenuContent/MenuContentProps (import specifiers, JSX tags, and type references).",
46
- "implementation": "./migrations/v3-0-0/menulist-rename-to-menucontent"
46
+ "implementation": "./migrations/v2-6-0/menulist-rename-to-menucontent"
47
47
  },
48
48
  "v3-0-0-copyabletext-to-text-copybutton": {
49
49
  "version": "3.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-components",
3
- "version": "5.0.1",
3
+ "version": "6.0.4",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "migrations": "./migrations.json",
@@ -14,15 +14,15 @@
14
14
  "@floating-ui/react": "^0.26.25",
15
15
  "string-ts": "^2.0.0",
16
16
  "tailwind-merge": "^3.7.0",
17
- "@trackunit/ui-design-tokens": "1.21.10",
18
- "@trackunit/css-class-variance-utilities": "2.6.10",
19
- "@trackunit/shared-utils": "1.22.10",
20
- "@trackunit/ui-icons": "1.20.10",
17
+ "@trackunit/ui-design-tokens": "1.21.14",
18
+ "@trackunit/css-class-variance-utilities": "2.6.14",
19
+ "@trackunit/shared-utils": "1.22.14",
20
+ "@trackunit/ui-icons": "1.20.14",
21
21
  "es-toolkit": "^1.52.0",
22
22
  "@tanstack/react-virtual": "^3.14.13",
23
23
  "fflate": "^0.8.3",
24
24
  "zod": "^3.25.76",
25
- "@trackunit/i18n-library-translation": "2.13.2"
25
+ "@trackunit/i18n-library-translation": "2.14.4"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "^19.0.0",
@@ -5,7 +5,7 @@ import type { SheetProps } from "./sheet-types";
5
5
  *
6
6
  * Use Sheet for contextual surfaces that slide up from the bottom of a
7
7
  * container -- action menus, detail panels, element settings, or filters.
8
- * Every Sheet renders via Portal into a required `container` element.
8
+ * Every Sheet renders via a portal into a required `container` element.
9
9
  * On small screens, consider using Sheet instead of a Popover for better
10
10
  * touch UX. For app-level blocking dialogs, use Modal instead (which
11
11
  * automatically renders as a Sheet on small screens).
@@ -185,7 +185,7 @@ export type SheetProps = CommonProps & Styleable & Refable<HTMLDivElement> & {
185
185
  * @default true
186
186
  */
187
187
  readonly trapFocus?: boolean;
188
- /** The container element the sheet renders into via Portal. Required. Use a callback ref (useState setter) so mounting triggers a re-render. */
188
+ /** The container element the sheet renders into via a portal. Required. Use a callback ref (useState setter) so mounting triggers a re-render. */
189
189
  readonly container: HTMLElement | null;
190
190
  /** Content rendered when in docked mode. Presence enables docking behavior. */
191
191
  readonly dockedContent?: ReactNode;
package/src/index.d.ts CHANGED
@@ -79,7 +79,6 @@ export * from "./components/Popover/PopoverContent";
79
79
  export * from "./components/Popover/PopoverTitle";
80
80
  export * from "./components/Popover/PopoverTrigger";
81
81
  export * from "./components/Popover/PopoverTypes";
82
- export * from "./components/Portal/Portal";
83
82
  export * from "./components/PreferenceCard/PreferenceCard";
84
83
  export * from "./components/PreferenceCard/PreferenceCard.variants";
85
84
  export * from "./components/PreferenceCard/PreferenceCardSkeleton";
@@ -1,44 +0,0 @@
1
- import { FloatingPortalProps } from "@floating-ui/react";
2
- import { ReactElement } from "react";
3
- import { CommonProps } from "../../common/CommonProps";
4
- import { Refable } from "../../common/Refable";
5
- import type { Styleable } from "../../common/Styleable";
6
- export type PortalProps = FloatingPortalProps & CommonProps & Styleable & Refable<HTMLDivElement>;
7
- /**
8
- * Portal renders its children into a separate DOM node, outside the normal React tree hierarchy.
9
- * By default, content is portalled into a z-index-isolated `div#portal-container` in the document body.
10
- * This is used internally by Popover, Tooltip, and other overlay components.
11
- *
12
- * ### When to use
13
- * Use Portal when you need to render content (modals, popovers, tooltips) outside its parent's DOM hierarchy to avoid z-index or overflow clipping issues.
14
- *
15
- * ### When not to use
16
- * Do not use Portal for regular content rendering. Most overlay components (`Popover`, `Tooltip`) already use Portal internally.
17
- *
18
- * @example Rendering into a specific container
19
- * ```tsx
20
- * import { Portal } from "@trackunit/react-components";
21
- *
22
- * const PortalledContent = () => (
23
- * <Portal root={document.getElementById('sidebar-container')}>
24
- * <div className="p-4">This content renders in #sidebar-container</div>
25
- * </Portal>
26
- * );
27
- * ```
28
- * @example Default portal into document body
29
- * ```tsx
30
- * import { Portal } from "@trackunit/react-components";
31
- *
32
- * const FloatingContent = ({ isVisible }: { isVisible: boolean }) => (
33
- * isVisible ? (
34
- * <Portal>
35
- * <div className="fixed bottom-4 right-4 bg-white p-4 rounded-lg shadow-lg">
36
- * Toast notification content
37
- * </div>
38
- * </Portal>
39
- * ) : null
40
- * );
41
- * @param {PortalProps} props - The props for the Portal component
42
- * @returns {ReactElement} Portal component
43
- */
44
- export declare const Portal: (props: PortalProps) => ReactElement;
@@ -1,8 +0,0 @@
1
- /** @internal */
2
- export declare const PORTAL_CONTAINER = "portal-container";
3
- /**
4
- * Creates or retrieves the default portal container element
5
- *
6
- * @internal
7
- */
8
- export declare const getDefaultPortalContainer: () => HTMLElement;