pixelize-design-library 2.4.2-beta.62 → 2.4.2-beta.63

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.
Files changed (166) hide show
  1. package/CHANGELOG.md +75 -2
  2. package/COMPONENT-GOTCHAS.md +25 -6
  3. package/DESIGN-GUIDE.md +12 -5
  4. package/dist/Components/Button/Button.styles.js +51 -21
  5. package/dist/Components/Card/CardProps.d.ts +2 -2
  6. package/dist/Components/ConfirmDialog/ConfirmDialog.js +2 -1
  7. package/dist/Components/CustomModulesTable/CustomModulesTable.js +6 -4
  8. package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -1
  9. package/dist/Components/DatePicker/RangeDatePicker.js +2 -1
  10. package/dist/Components/DatePicker/SingleDatePicker.js +2 -1
  11. package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -1
  12. package/dist/Components/DatePicker/dayStates.js +2 -1
  13. package/dist/Components/Drawer/Drawer.js +2 -1
  14. package/dist/Components/Dropdown/DropDown.js +2 -1
  15. package/dist/Components/FileUpload/FileUpload.js +9 -2
  16. package/dist/Components/FilterSidebar/FilterSidebar.js +7 -4
  17. package/dist/Components/KanbanBoard/AccountCard.js +4 -2
  18. package/dist/Components/NavigationBar/NavigationBar.js +3 -2
  19. package/dist/Components/Notification/Notification.js +4 -3
  20. package/dist/Components/NotificationBell/NotificationPanel.js +4 -3
  21. package/dist/Components/OrganizationDetails/CreateOrgModal.js +2 -1
  22. package/dist/Components/OrganizationDetails/OrganizationDetails.js +5 -3
  23. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +7 -3
  24. package/dist/Components/SearchSelect/SearchSelect.js +42 -21
  25. package/dist/Components/SearchSelect/searchSelectNav.d.ts +13 -0
  26. package/dist/Components/SearchSelect/searchSelectNav.js +40 -0
  27. package/dist/Components/Select/SelectPopup.js +2 -1
  28. package/dist/Components/SelectSearch/SelectSearch.js +2 -1
  29. package/dist/Components/SettingRow/SettingRow.js +2 -1
  30. package/dist/Components/SettingRow/SettingsSection.js +2 -1
  31. package/dist/Components/SideBar/SecondaryBar.js +4 -3
  32. package/dist/Components/SideBar/SideBar.js +16 -13
  33. package/dist/Components/SideBar/SideBarProps.d.ts +1 -1
  34. package/dist/Components/SideBar/components/MenuItemBox.js +7 -4
  35. package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -1
  36. package/dist/Components/SideBar/components/OtherApps.js +2 -1
  37. package/dist/Components/SideBar/components/PinnedSection.js +7 -4
  38. package/dist/Components/SideBar/sidebarMotion.d.ts +2 -0
  39. package/dist/Components/SideBar/sidebarMotion.js +6 -0
  40. package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -4
  41. package/dist/Components/StageProgress/StageItem.js +5 -2
  42. package/dist/Components/StageProgress/StepperStage.js +2 -2
  43. package/dist/Components/StatCard/StatCard.js +2 -1
  44. package/dist/Components/Table/Table.js +6 -2
  45. package/dist/Components/Table/components/TableActions.js +3 -2
  46. package/dist/Components/Table/filters/CompactSelect.js +2 -1
  47. package/dist/Components/Table/settings/TableSettings.js +7 -2
  48. package/dist/Components/Table/variants/classic.js +3 -2
  49. package/dist/Components/Timeline/Timeline.js +11 -4
  50. package/dist/Components/Toaster/Toaster.js +19 -8
  51. package/dist/Components/Toggle/TableToggle.js +5 -2
  52. package/dist/Components/UserDetails/AddUserModal.js +2 -1
  53. package/dist/Components/UserDetails/ChangeRoleModal.js +2 -1
  54. package/dist/Components/UserDetails/UserDetails.js +3 -1
  55. package/dist/Theme/chakra/Card.styles.d.ts +7 -1
  56. package/dist/Theme/chakra/Card.styles.js +4 -1
  57. package/dist/Theme/chakra/Menu.styles.d.ts +3 -5
  58. package/dist/Theme/chakra/Menu.styles.js +3 -0
  59. package/dist/Theme/chakra/Popover.styles.d.ts +2 -11
  60. package/dist/Theme/chakra/Popover.styles.js +2 -0
  61. package/dist/Theme/chakra/common.web.d.ts +4 -0
  62. package/dist/Theme/chakra/componentStyles.d.ts +11 -3
  63. package/dist/Theme/chakra/componentStyles.js +10 -6
  64. package/dist/Theme/chakra/motion.d.ts +1 -0
  65. package/dist/Theme/chakra/motion.js +2 -1
  66. package/dist/Theme/chakra/overlay.styles.d.ts +5 -0
  67. package/dist/Theme/chakra/overlay.styles.js +4 -1
  68. package/dist/Theme/themeProps.d.ts +4 -0
  69. package/dist/Theme/tokens/brands/index.d.ts +1 -0
  70. package/dist/Theme/tokens/brands/index.js +17 -1
  71. package/dist/Theme/tokens/brands/radiant/palette.light.js +15 -0
  72. package/dist/Theme/tokens/brands/rosewood/palette.light.js +10 -10
  73. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +7 -29
  74. package/dist/Theme/tokens/brands/zinc/palette.dark.js +3 -35
  75. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +6 -1
  76. package/dist/Theme/tokens/builders/buildDarkPalette.js +37 -8
  77. package/dist/Theme/tokens/builders/mutedText.d.ts +1 -1
  78. package/dist/Theme/tokens/builders/mutedText.js +13 -3
  79. package/dist/Theme/tokens/builders/planeStep.d.ts +4 -0
  80. package/dist/Theme/tokens/builders/planeStep.js +20 -0
  81. package/dist/Theme/tokens/builders/planes.d.ts +4 -0
  82. package/dist/Theme/tokens/builders/planes.js +33 -0
  83. package/dist/Theme/tokens/builders/skeletonShimmer.d.ts +9 -0
  84. package/dist/Theme/tokens/builders/skeletonShimmer.js +25 -0
  85. package/dist/Theme/tokens/builders/surfaceRaised.d.ts +3 -1
  86. package/dist/Theme/tokens/builders/surfaceRaised.js +18 -8
  87. package/dist/Theme/tokens/builders/surfaceRungs.js +3 -1
  88. package/dist/Theme/tokens/primitives/index.d.ts +2 -2
  89. package/dist/Theme/tokens/primitives/index.js +4 -1
  90. package/dist/Theme/tokens/primitives/motion.d.ts +1 -0
  91. package/dist/Theme/tokens/primitives/motion.js +2 -1
  92. package/dist/Theme/tokens/primitives/shadows.d.ts +16 -0
  93. package/dist/Theme/tokens/primitives/shadows.js +56 -6
  94. package/dist/Theme/tokens/primitives/typography.js +1 -1
  95. package/dist/esm/Components/Button/Button.styles.js +54 -24
  96. package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +2 -1
  97. package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +6 -4
  98. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -1
  99. package/dist/esm/Components/DatePicker/RangeDatePicker.js +2 -1
  100. package/dist/esm/Components/DatePicker/SingleDatePicker.js +2 -1
  101. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -1
  102. package/dist/esm/Components/DatePicker/dayStates.js +2 -1
  103. package/dist/esm/Components/Drawer/Drawer.js +2 -1
  104. package/dist/esm/Components/Dropdown/DropDown.js +2 -1
  105. package/dist/esm/Components/FileUpload/FileUpload.js +10 -3
  106. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +7 -4
  107. package/dist/esm/Components/KanbanBoard/AccountCard.js +4 -2
  108. package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -2
  109. package/dist/esm/Components/Notification/Notification.js +4 -3
  110. package/dist/esm/Components/NotificationBell/NotificationPanel.js +4 -3
  111. package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +2 -1
  112. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -3
  113. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +7 -3
  114. package/dist/esm/Components/SearchSelect/SearchSelect.js +42 -21
  115. package/dist/esm/Components/SearchSelect/searchSelectNav.js +32 -0
  116. package/dist/esm/Components/Select/SelectPopup.js +2 -1
  117. package/dist/esm/Components/SelectSearch/SelectSearch.js +2 -1
  118. package/dist/esm/Components/SettingRow/SettingRow.js +2 -1
  119. package/dist/esm/Components/SettingRow/SettingsSection.js +2 -1
  120. package/dist/esm/Components/SideBar/SecondaryBar.js +4 -3
  121. package/dist/esm/Components/SideBar/SideBar.js +17 -14
  122. package/dist/esm/Components/SideBar/components/MenuItemBox.js +7 -4
  123. package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -1
  124. package/dist/esm/Components/SideBar/components/OtherApps.js +2 -1
  125. package/dist/esm/Components/SideBar/components/PinnedSection.js +7 -4
  126. package/dist/esm/Components/SideBar/sidebarMotion.js +3 -0
  127. package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -4
  128. package/dist/esm/Components/StageProgress/StageItem.js +5 -2
  129. package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
  130. package/dist/esm/Components/StatCard/StatCard.js +2 -1
  131. package/dist/esm/Components/Table/Table.js +8 -4
  132. package/dist/esm/Components/Table/components/TableActions.js +3 -2
  133. package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
  134. package/dist/esm/Components/Table/settings/TableSettings.js +8 -3
  135. package/dist/esm/Components/Table/variants/classic.js +3 -2
  136. package/dist/esm/Components/Timeline/Timeline.js +11 -4
  137. package/dist/esm/Components/Toaster/Toaster.js +20 -9
  138. package/dist/esm/Components/Toggle/TableToggle.js +5 -2
  139. package/dist/esm/Components/UserDetails/AddUserModal.js +2 -1
  140. package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -1
  141. package/dist/esm/Components/UserDetails/UserDetails.js +3 -1
  142. package/dist/esm/Theme/chakra/Card.styles.js +4 -1
  143. package/dist/esm/Theme/chakra/Menu.styles.js +3 -0
  144. package/dist/esm/Theme/chakra/Popover.styles.js +2 -0
  145. package/dist/esm/Theme/chakra/componentStyles.js +10 -6
  146. package/dist/esm/Theme/chakra/motion.js +1 -0
  147. package/dist/esm/Theme/chakra/overlay.styles.js +3 -0
  148. package/dist/esm/Theme/tokens/brands/index.js +16 -0
  149. package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +15 -0
  150. package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +10 -10
  151. package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -35
  152. package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +38 -9
  153. package/dist/esm/Theme/tokens/builders/mutedText.js +12 -2
  154. package/dist/esm/Theme/tokens/builders/planeStep.js +14 -0
  155. package/dist/esm/Theme/tokens/builders/planes.js +28 -0
  156. package/dist/esm/Theme/tokens/builders/skeletonShimmer.js +21 -0
  157. package/dist/esm/Theme/tokens/builders/surfaceRaised.js +16 -7
  158. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +3 -1
  159. package/dist/esm/Theme/tokens/primitives/index.js +1 -1
  160. package/dist/esm/Theme/tokens/primitives/motion.js +1 -0
  161. package/dist/esm/Theme/tokens/primitives/shadows.js +54 -5
  162. package/dist/esm/Theme/tokens/primitives/typography.js +1 -1
  163. package/dist/esm/index.js +1 -0
  164. package/dist/index.d.ts +1 -0
  165. package/dist/index.js +9 -5
  166. package/package.json +1 -1
@@ -2,10 +2,11 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { Box, Divider, Flex, Heading, Text } from "@chakra-ui/react";
3
3
  import Card from "../Card/Card.js";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
+ import { cardRule } from "../../Theme/tokens/builders/planeStep.js";
5
6
  /** Titled Card wrapping SettingRows; rows and an optional footer separate with one divider each, never a nested border. */
6
7
  const SettingsSection = ({ id, title, description, children, footer, action, isDanger = false }) => {
7
8
  const { colors } = useCustomTheme();
8
9
  const titleColor = isDanger ? colors.semanticText.error : colors.header[900];
9
- return (_jsxs(Card, { id: id, scrollMarginTop: 4, borderColor: isDanger ? colors.semanticText.error : undefined, header: _jsxs(Flex, { align: "flex-start", gap: 3, children: [_jsxs(Box, { flex: 1, minW: 0, children: [_jsx(Heading, { as: "h2", fontSize: "md", fontWeight: 600, color: titleColor, children: title }), description && (_jsx(Text, { mt: 0.5, fontSize: "xs", fontWeight: 400, color: colors.textMuted, children: description }))] }), action && _jsx(Box, { flexShrink: 0, children: action })] }), children: [children, footer && (_jsxs(_Fragment, { children: [_jsx(Divider, { borderColor: colors.boxborder[200] }), _jsx(Box, { pt: 4, children: footer })] }))] }));
10
+ return (_jsxs(Card, { id: id, scrollMarginTop: 4, variant: isDanger ? "outline" : undefined, borderColor: isDanger ? colors.semanticText.error : undefined, header: _jsxs(Flex, { align: "flex-start", gap: 3, children: [_jsxs(Box, { flex: 1, minW: 0, children: [_jsx(Heading, { as: "h2", fontSize: "md", fontWeight: 600, color: titleColor, children: title }), description && (_jsx(Text, { mt: 0.5, fontSize: "xs", fontWeight: 400, color: colors.textMuted, children: description }))] }), action && _jsx(Box, { flexShrink: 0, children: action })] }), children: [children, footer && (_jsxs(_Fragment, { children: [_jsx(Divider, { borderColor: cardRule(colors) }), _jsx(Box, { pt: 4, children: footer })] }))] }));
10
11
  };
11
12
  export default SettingsSection;
@@ -17,6 +17,7 @@ import { sidebarRowPeak } from "../../Theme/tokens/builders/sidebarAccent.js";
17
17
  import { scaleFor } from "../../Theme/chakra/paletteFromTheme.js";
18
18
  import { fullViewportHeight } from "../../Theme/tokens/builders/viewportHeight.js";
19
19
  import { SIDEBAR_ROW } from "./sidebarScale.js";
20
+ import { SIDEBAR_BG_TRANSITION, SIDEBAR_INK_TRANSITION } from "./sidebarMotion.js";
20
21
  const softBadge = (colors, colorScheme, surface) => {
21
22
  const tone = resolveSoftTone(colors, scaleFor(colors, colorScheme), surface);
22
23
  return { bg: tone.bg, color: tone.fg };
@@ -48,7 +49,7 @@ const CollapsedItem = ({ item, isActive, itemFontSize, onItemClick }) => {
48
49
  e.preventDefault();
49
50
  if (!blocked)
50
51
  onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item);
51
- }, bg: isActive ? "whiteAlpha.300" : "transparent", transition: "background 0.12s", sx: sidebarFocusStyles(theme.colors), children: _jsxs(Box, { position: "relative", display: "flex", alignItems: "center", children: [_jsx(Icon, { as: item.icon, fontSize: SIDEBAR_ROW.iconSize, color: isActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isActive ? undefined : { color: theme.colors.white }, transition: "color 0.12s" }), badgeVal != null && (_jsx(Box, { position: "absolute", top: "0", right: "0", w: "0.375rem", h: "0.375rem", borderRadius: "full", bg: theme.colors.sidebar.semanticText.error }))] }) }) }), _jsx(Portal, { children: _jsx(PopoverContent, { borderRadius: "lg", bg: theme.colors.sidebar.elevated, boxShadow: "lg", minW: "10rem", maxW: "14rem", py: "0.125rem", ml: "-0.5rem", cursor: blocked ? "not-allowed" : "pointer", zIndex: zIndices.popover, color: theme.colors.white, border: 'none', children: _jsx(PopoverBody, { p: 3, children: _jsxs(Flex, { align: "center", gap: 2, justify: "space-between", children: [_jsxs(Flex, { align: "center", gap: 2, flex: "1", minW: 0, children: [_jsx(Icon, { as: item.icon, fontSize: "md", flexShrink: 0 }), _jsx(OverflowTooltipText, { placement: "right", maxWidth: "100%", fontSize: itemFontSize, fontWeight: 500, as: "p", children: item.title })] }), item.locked ? (item.lockedReason ? (_jsx(ToolTip, { label: item.lockedReason, placement: "top", children: _jsx(Icon, { as: LockKeyhole, fontSize: "sm", flexShrink: 0, color: theme.colors.sidebar.mutedIcon }) })) : (_jsx(Icon, { as: LockKeyhole, fontSize: "sm", flexShrink: 0, color: theme.colors.sidebar.mutedIcon }))) : (badgeVal != null && (_jsx(Badge, { ...softBadge(theme.colors, colorScheme, sidebarRowPeak(theme.colors.sidebar.elevated)), fontSize: "xs", variant: variant, borderRadius: radius, children: badgeVal })))] }) }) }) })] }));
52
+ }, bg: isActive ? "whiteAlpha.300" : "transparent", transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), children: _jsxs(Box, { position: "relative", display: "flex", alignItems: "center", children: [_jsx(Icon, { as: item.icon, fontSize: SIDEBAR_ROW.iconSize, color: isActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isActive ? undefined : { color: theme.colors.white }, transition: SIDEBAR_INK_TRANSITION }), badgeVal != null && (_jsx(Box, { position: "absolute", top: "0", right: "0", w: "0.375rem", h: "0.375rem", borderRadius: "full", bg: theme.colors.sidebar.semanticText.error }))] }) }) }), _jsx(Portal, { children: _jsx(PopoverContent, { borderRadius: "lg", bg: theme.colors.sidebar.elevated, boxShadow: "lg", minW: "10rem", maxW: "14rem", py: "0.125rem", ml: "-0.5rem", cursor: blocked ? "not-allowed" : "pointer", zIndex: zIndices.popover, color: theme.colors.white, border: 'none', children: _jsx(PopoverBody, { p: 3, children: _jsxs(Flex, { align: "center", gap: 2, justify: "space-between", children: [_jsxs(Flex, { align: "center", gap: 2, flex: "1", minW: 0, children: [_jsx(Icon, { as: item.icon, fontSize: "md", flexShrink: 0 }), _jsx(OverflowTooltipText, { placement: "right", maxWidth: "100%", fontSize: itemFontSize, fontWeight: 500, as: "p", children: item.title })] }), item.locked ? (item.lockedReason ? (_jsx(ToolTip, { label: item.lockedReason, placement: "top", children: _jsx(Icon, { as: LockKeyhole, fontSize: "sm", flexShrink: 0, color: theme.colors.sidebar.mutedIcon }) })) : (_jsx(Icon, { as: LockKeyhole, fontSize: "sm", flexShrink: 0, color: theme.colors.sidebar.mutedIcon }))) : (badgeVal != null && (_jsx(Badge, { ...softBadge(theme.colors, colorScheme, sidebarRowPeak(theme.colors.sidebar.elevated)), fontSize: "xs", variant: variant, borderRadius: radius, children: badgeVal })))] }) }) }) })] }));
52
53
  };
53
54
  const ExpandedItem = ({ item, isActive, itemFontSize, onItemClick }) => {
54
55
  var _a;
@@ -62,7 +63,7 @@ const ExpandedItem = ({ item, isActive, itemFontSize, onItemClick }) => {
62
63
  e.preventDefault();
63
64
  if (!blocked)
64
65
  onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(item);
65
- }, borderLeft: "2px solid", borderLeftColor: isActive ? theme.colors.sidebar.activeIcon : "transparent", transition: "background 0.12s", sx: sidebarFocusStyles(theme.colors), children: [_jsxs(Flex, { align: "center", gap: 2, flex: "1", minW: 0, overflow: "hidden", children: [_jsx(Icon, { as: item.icon, fontSize: SIDEBAR_ROW.iconSize, flexShrink: 0, color: isActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isActive ? undefined : { color: theme.colors.white }, transition: "color 0.12s" }), _jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "right", maxWidth: "100%", fontSize: itemFontSize, fontWeight: isActive ? 600 : 500, color: isActive ? activeAccent.label : theme.colors.white, _groupHover: isActive ? undefined : { color: theme.colors.white }, as: "p", children: item.title }) })] }), item.locked ? (_jsx(Icon, { as: LockKeyhole, fontSize: "sm", flexShrink: 0, color: theme.colors.sidebar.mutedIcon })) : (badgeVal != null && (_jsx(Badge, { ...softBadge(theme.colors, colorScheme, sidebarRowPeak(theme.colors.sidebar.background[500])), fontSize: "xs", variant: variant, borderRadius: radius, children: badgeVal })))] }));
66
+ }, borderLeft: "2px solid", borderLeftColor: isActive ? theme.colors.sidebar.activeIcon : "transparent", transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), children: [_jsxs(Flex, { align: "center", gap: 2, flex: "1", minW: 0, overflow: "hidden", children: [_jsx(Icon, { as: item.icon, fontSize: SIDEBAR_ROW.iconSize, flexShrink: 0, color: isActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isActive ? undefined : { color: theme.colors.white }, transition: SIDEBAR_INK_TRANSITION }), _jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "right", maxWidth: "100%", fontSize: itemFontSize, fontWeight: isActive ? 600 : 500, color: isActive ? activeAccent.label : theme.colors.white, _groupHover: isActive ? undefined : { color: theme.colors.white }, as: "p", children: item.title }) })] }), item.locked ? (_jsx(Icon, { as: LockKeyhole, fontSize: "sm", flexShrink: 0, color: theme.colors.sidebar.mutedIcon })) : (badgeVal != null && (_jsx(Badge, { ...softBadge(theme.colors, colorScheme, sidebarRowPeak(theme.colors.sidebar.background[500])), fontSize: "xs", variant: variant, borderRadius: radius, children: badgeVal })))] }));
66
67
  return item.locked && item.lockedReason ? (_jsx(ToolTip, { label: item.lockedReason, placement: "top", children: row })) : (row);
67
68
  };
68
69
  const SecondaryBar = ({ items = [], defaultCollapsed = true, collapsedWidth = "3.5rem", expandedWidth = "10rem", headerFontSize = SIDEBAR_ROW.fontSize, itemFontSize = SIDEBAR_ROW.fontSize, selected, onItemClick, title, icon, }) => {
@@ -71,7 +72,7 @@ const SecondaryBar = ({ items = [], defaultCollapsed = true, collapsedWidth = "3
71
72
  const scrollContainerId = sanitizeId(useId());
72
73
  const [collapsed, setCollapsed] = useState(defaultCollapsed);
73
74
  const width = collapsed ? collapsedWidth : expandedWidth;
74
- return (_jsx(Box, { as: "nav", "aria-label": title ? `${title} navigation` : "Secondary navigation", transition: transitionFor(["width"], "base"), pos: "sticky", top: 0, sx: fullViewportHeight, w: width, bg: theme.colors.sidebar.background[500], borderLeft: "1px solid", borderColor: theme.colors.sidebar.divider, boxShadow: theme.shadows.md, zIndex: 1, children: _jsxs(VStack, { align: "stretch", spacing: 0, h: "100%", children: [_jsxs(Flex, { align: "center", justify: collapsed ? "center" : "space-between", px: collapsed ? 0 : "10px", gap: "7px", h: HEADER_HEIGHT, overflow: "hidden", borderBottom: "1px solid", borderColor: theme.colors.sidebar.divider, flexShrink: 0, children: [!collapsed && (_jsxs(_Fragment, { children: [icon && (_jsx(Icon, { as: icon, fontSize: SIDEBAR_ROW.iconSize, color: activeAccent.icon, flexShrink: 0 })), _jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "right", maxWidth: "100%", fontSize: headerFontSize, fontWeight: 600, color: theme.colors.white, as: "p", children: title !== null && title !== void 0 ? title : "" }) })] })), _jsx(Box, { as: "button", type: "button", "aria-label": collapsed ? "Expand navigation panel" : "Collapse navigation panel", "aria-expanded": !collapsed, border: "none", bg: "transparent", w: "24px", h: "24px", borderRadius: "lg", display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", flexShrink: 0, onClick: () => setCollapsed((c) => !c), _hover: { bg: "whiteAlpha.200" }, transition: "background 0.15s", sx: sidebarFocusStyles(theme.colors), children: collapsed ? (_jsx(ToolTip, { label: title !== null && title !== void 0 ? title : "", placement: "right", children: _jsx(ChevronRight, { size: 13, color: theme.colors.sidebar.mutedIcon }) })) : (_jsx(ChevronLeft, { size: 13, color: theme.colors.sidebar.mutedIcon })) })] }), _jsx(Box, { id: scrollContainerId, flex: "1", minH: 0, overflowY: "auto", overflowX: "hidden", py: 2, px: "6px", sx: cssForScrollBar(theme), children: items.map((item) => {
75
+ return (_jsx(Box, { as: "nav", "aria-label": title ? `${title} navigation` : "Secondary navigation", transition: transitionFor(["width"], "base"), pos: "sticky", top: 0, sx: fullViewportHeight, w: width, bg: theme.colors.sidebar.background[500], borderLeft: "1px solid", borderColor: theme.colors.sidebar.divider, boxShadow: theme.shadows.md, zIndex: 1, children: _jsxs(VStack, { align: "stretch", spacing: 0, h: "100%", children: [_jsxs(Flex, { align: "center", justify: collapsed ? "center" : "space-between", px: collapsed ? 0 : "10px", gap: "7px", h: HEADER_HEIGHT, overflow: "hidden", borderBottom: "1px solid", borderColor: theme.colors.sidebar.divider, flexShrink: 0, children: [!collapsed && (_jsxs(_Fragment, { children: [icon && (_jsx(Icon, { as: icon, fontSize: SIDEBAR_ROW.iconSize, color: activeAccent.icon, flexShrink: 0 })), _jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "right", maxWidth: "100%", fontSize: headerFontSize, fontWeight: 600, color: theme.colors.white, as: "p", children: title !== null && title !== void 0 ? title : "" }) })] })), _jsx(Box, { as: "button", type: "button", "aria-label": collapsed ? "Expand navigation panel" : "Collapse navigation panel", "aria-expanded": !collapsed, border: "none", bg: "transparent", w: "24px", h: "24px", borderRadius: "lg", display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", flexShrink: 0, onClick: () => setCollapsed((c) => !c), _hover: { bg: "whiteAlpha.200" }, transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), children: collapsed ? (_jsx(ToolTip, { label: title !== null && title !== void 0 ? title : "", placement: "right", children: _jsx(ChevronRight, { size: 13, color: theme.colors.sidebar.mutedIcon }) })) : (_jsx(ChevronLeft, { size: 13, color: theme.colors.sidebar.mutedIcon })) })] }), _jsx(Box, { id: scrollContainerId, flex: "1", minH: 0, overflowY: "auto", overflowX: "hidden", py: 2, px: "6px", sx: cssForScrollBar(theme), children: items.map((item) => {
75
76
  var _a;
76
77
  const isActive = String(selected) === String(item.id) ||
77
78
  String(selected) === String(item.title);
@@ -8,7 +8,8 @@ import { cssForScrollBar, HEADER_HEIGHT } from "../../Constants/Sidebar.js";
8
8
  import { overlayScrimStyles } from "../../Theme/chakra/overlay.styles.js";
9
9
  import { REDUCED_MOTION_QUERY } from "../../Theme/chakra/motion.js";
10
10
  import { sidebarFocusStyles } from "./sidebarFocus.js";
11
- import { MOTION_EASE, MOTION_MS } from "../../Theme/tokens/primitives/motion.js";
11
+ import { MOTION_EASE, MOTION_EASE_OUT, MOTION_MS, transitionFor } from "../../Theme/tokens/primitives/motion.js";
12
+ import { SIDEBAR_BG_TRANSITION } from "./sidebarMotion.js";
12
13
  import { ArrowLeftToLine, ArrowRightToLine, ChevronLeft, Maximize2, MoreVertical, PanelLeft, Plus, X } from "lucide-react";
13
14
  // Overlay stacking — mirrors theme.zIndices (overlay=1300 scrim, modal=1400 panel).
14
15
  const Z_SCRIM = 1300;
@@ -17,7 +18,6 @@ const Z_PANEL = 1400;
17
18
  // expanded 13rem for comfortable touch targets, but below the old 16rem that was
18
19
  // too wide on phones. Still capped by `maxW: 88vw` on very small screens.
19
20
  const RAIL_WIDTH = "4.688rem";
20
- const PANEL_EASE = "cubic-bezier(0.22, 1, 0.36, 1)";
21
21
  const EXPANDED_WIDTH = "13rem";
22
22
  const COLLAPSE_MS = { ...MOTION_MS, slow: 260 };
23
23
  const NO_ACTIVE_MENU = "\u0000pinned-active";
@@ -26,13 +26,16 @@ const inlineTransitions = (collapse) => {
26
26
  var _a;
27
27
  if (collapse === "none")
28
28
  return { width: "none", shadow: "none" };
29
- const ms = COLLAPSE_MS[(_a = collapse.speed) !== null && _a !== void 0 ? _a : "slow"];
29
+ const ms = COLLAPSE_MS[(_a = collapse.speed) !== null && _a !== void 0 ? _a : "base"];
30
30
  return {
31
- width: `width ${ms}ms ${PANEL_EASE}`,
31
+ width: `width ${ms}ms ${MOTION_EASE_OUT}`,
32
32
  shadow: collapse.animateShadow === false ? "none" : `box-shadow ${ms}ms ${MOTION_EASE}`,
33
33
  };
34
34
  };
35
35
  const OVERLAY_WIDTH = "14.7rem";
36
+ const SCRIM_TRANSITION = transitionFor(["opacity", "visibility"], "base");
37
+ const OVERLAY_SLIDE = transitionFor(["transform"], "enter", "out");
38
+ const OVERLAY_WIDTH_TRANSITION = transitionFor(["width"], "enter", "out");
36
39
  const FOCUSABLE_SELECTOR = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
37
40
  import MenuItems from "./components/MenuItems.js";
38
41
  import DefaultLogo from "../../Assets/defaultLogo.js";
@@ -56,7 +59,7 @@ const SidebarHeader = ({ logo, companyName, companySubtitle, toggle, isLoading,
56
59
  // Rail-safe pairing, not a raw primary fill: primary[500] equals the rail itself on
57
60
  // some brands (zinc), making the tile disappear. See THEME-CONTRACT.md sidebar rules.
58
61
  bg: theme.colors.sidebar.activeBg, color: activeAccent.label, borderRadius: "lg", boxSize: "1.75rem", display: "flex", alignItems: "center", justifyContent: "center", fontWeight: 700, flexShrink: 0, cursor: toggle ? "pointer" : undefined, onClick: toggle ? onToggle : undefined, children: _jsx(DefaultLogo, {}) }));
59
- return (_jsxs(Flex, { h: HEADER_HEIGHT, w: "100%", alignItems: "center", justifyContent: toggle ? "center" : "flex-start", gap: 2, px: toggle ? "8px" : "10px", borderBottom: "1px solid", borderColor: theme.colors.sidebar.divider, minW: 0, overflow: "hidden", flexShrink: 0, children: [logoNode, !toggle && (_jsxs(Box, { flex: "1", minW: 0, children: [_jsx(OverflowTooltipText, { placement: "right", fontWeight: 600, fontSize: SIDEBAR_CHROME.titleFontSize, textAlign: "left", color: theme.colors.white, lineHeight: "1.3", as: "p", width: "100%", children: companyName !== null && companyName !== void 0 ? companyName : "" }), companySubtitle && (_jsx(Text, { fontSize: SIDEBAR_CHROME.metaFontSize, color: theme.colors.sidebar.mutedLabel, lineHeight: "1.3", isTruncated: true, children: companySubtitle }))] })), !toggle && (_jsx(Box, { as: "button", type: "button", onClick: overlay ? onClose : onToggle, "aria-label": overlay ? "Close menu" : "Collapse sidebar", w: "22px", h: "22px", borderRadius: "lg", bg: "whiteAlpha.200", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, position: "relative", _hover: { bg: "whiteAlpha.300" }, transition: "background 0.15s", sx: {
62
+ return (_jsxs(Flex, { h: HEADER_HEIGHT, w: "100%", alignItems: "center", justifyContent: toggle ? "center" : "flex-start", gap: 2, px: toggle ? "8px" : "10px", borderBottom: "1px solid", borderColor: theme.colors.sidebar.divider, minW: 0, overflow: "hidden", flexShrink: 0, children: [logoNode, !toggle && (_jsxs(Box, { flex: "1", minW: 0, children: [_jsx(OverflowTooltipText, { placement: "right", fontWeight: 600, fontSize: SIDEBAR_CHROME.titleFontSize, textAlign: "left", color: theme.colors.white, lineHeight: "1.3", as: "p", width: "100%", children: companyName !== null && companyName !== void 0 ? companyName : "" }), companySubtitle && (_jsx(Text, { fontSize: SIDEBAR_CHROME.metaFontSize, color: theme.colors.sidebar.mutedLabel, lineHeight: "1.3", isTruncated: true, children: companySubtitle }))] })), !toggle && (_jsx(Box, { as: "button", type: "button", onClick: overlay ? onClose : onToggle, "aria-label": overlay ? "Close menu" : "Collapse sidebar", w: "22px", h: "22px", borderRadius: "lg", bg: "whiteAlpha.200", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, position: "relative", _hover: { bg: "whiteAlpha.300" }, transition: SIDEBAR_BG_TRANSITION, sx: {
60
63
  ...sidebarFocusStyles(theme.colors),
61
64
  "&::after": {
62
65
  content: '""',
@@ -76,7 +79,7 @@ const SkeletonMenuRow = ({ toggle }) => {
76
79
  const AddNewButton = ({ toggle, onClick, overlay }) => {
77
80
  const theme = useCustomTheme();
78
81
  const activeAccent = getSidebarActiveAccent(theme.colors);
79
- return (_jsxs(Flex, { as: "button", type: "button", "data-group": "", "aria-label": "Add New", alignItems: "center", gap: "9px", px: "10px", py: overlay ? "11px" : "7px", borderRadius: "lg", cursor: "pointer", border: "none", bg: "transparent", w: "100%", mb: "2px", justifyContent: toggle ? "center" : "flex-start", _hover: { backgroundColor: "whiteAlpha.200" }, transition: "background 0.12s", sx: sidebarFocusStyles(theme.colors), onClick: onClick, children: [_jsx(Box, { w: "18px", h: "18px", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, children: _jsx(Plus, { size: 16, color: activeAccent.icon }) }), !toggle && (_jsx(Text, { fontSize: SIDEBAR_ROW.fontSize, color: theme.colors.white, fontWeight: 500, children: "Add New" }))] }));
82
+ return (_jsxs(Flex, { as: "button", type: "button", "data-group": "", "aria-label": "Add New", alignItems: "center", gap: "9px", px: "10px", py: overlay ? "11px" : "7px", borderRadius: "lg", cursor: "pointer", border: "none", bg: "transparent", w: "100%", mb: "2px", justifyContent: toggle ? "center" : "flex-start", _hover: { backgroundColor: "whiteAlpha.200" }, transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), onClick: onClick, children: [_jsx(Box, { w: "18px", h: "18px", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, children: _jsx(Plus, { size: 16, color: activeAccent.icon }) }), !toggle && (_jsx(Text, { fontSize: SIDEBAR_ROW.fontSize, color: theme.colors.white, fontWeight: 500, children: "Add New" }))] }));
80
83
  };
81
84
  const deriveInitials = (user) => {
82
85
  if (user.initials)
@@ -94,13 +97,13 @@ const UserFooter = ({ user, toggle, overlay }) => {
94
97
  const avatar = user.avatarUrl ? (_jsx(Image, { src: user.avatarUrl, alt: user.name, boxSize: "26px", borderRadius: "full", objectFit: "cover", flexShrink: 0 })) : (_jsx(Box, { boxSize: "26px", borderRadius: "full",
95
98
  // Same rail-safe pairing as the logo tile — primary.opacity[32] was invisible on zinc/skyline.
96
99
  bg: theme.colors.sidebar.activeBg, color: activeAccent.label, display: "flex", alignItems: "center", justifyContent: "center", fontSize: SIDEBAR_CHROME.metaFontSize, fontWeight: 600, flexShrink: 0, children: deriveInitials(user) }));
97
- return (_jsx(Box, { borderTop: "1px solid", borderColor: theme.colors.sidebar.divider, py: 2, px: "6px", flexShrink: 0, children: _jsxs(Flex, { as: "button", type: "button", onClick: user.onClick, align: "center", gap: 2, px: 2, py: overlay ? "10px" : "6px", w: "100%", borderRadius: "lg", cursor: "pointer", bg: "transparent", border: "none", justify: toggle ? "center" : "flex-start", _hover: { bg: "whiteAlpha.200" }, transition: "background 0.12s", sx: sidebarFocusStyles(theme.colors), children: [avatar, !toggle && (_jsxs(Box, { flex: "1", minW: 0, textAlign: "left", children: [_jsx(Text, { fontSize: SIDEBAR_CHROME.labelFontSize, fontWeight: 500, color: theme.colors.white, isTruncated: true, children: user.name }), user.role && (_jsx(Text, { fontSize: SIDEBAR_CHROME.metaFontSize, color: theme.colors.sidebar.mutedLabel, isTruncated: true, children: user.role }))] })), !toggle && _jsx(MoreVertical, { size: 14, color: theme.colors.sidebar.mutedIcon })] }) }));
100
+ return (_jsx(Box, { borderTop: "1px solid", borderColor: theme.colors.sidebar.divider, py: 2, px: "6px", flexShrink: 0, children: _jsxs(Flex, { as: "button", type: "button", onClick: user.onClick, align: "center", gap: 2, px: 2, py: overlay ? "10px" : "6px", w: "100%", borderRadius: "lg", cursor: "pointer", bg: "transparent", border: "none", justify: toggle ? "center" : "flex-start", _hover: { bg: "whiteAlpha.200" }, transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), children: [avatar, !toggle && (_jsxs(Box, { flex: "1", minW: 0, textAlign: "left", children: [_jsx(Text, { fontSize: SIDEBAR_CHROME.labelFontSize, fontWeight: 500, color: theme.colors.white, isTruncated: true, children: user.name }), user.role && (_jsx(Text, { fontSize: SIDEBAR_CHROME.metaFontSize, color: theme.colors.sidebar.mutedLabel, isTruncated: true, children: user.role }))] })), !toggle && _jsx(MoreVertical, { size: 14, color: theme.colors.sidebar.mutedIcon })] }) }));
98
101
  };
99
102
  // Footer "cell" — one segment of the Collapse | Hide/Show control.
100
103
  const ControlCell = ({ onClick, ariaLabel, label, accent, children }) => {
101
104
  const theme = useCustomTheme();
102
105
  const activeAccent = getSidebarActiveAccent(theme.colors);
103
- return (_jsxs(Flex, { as: "button", type: "button", "aria-label": ariaLabel, flex: "1", minW: 0, alignItems: "center", justifyContent: "center", gap: "7px", px: "10px", py: "14px", cursor: "pointer", border: "none", bg: accent ? "whiteAlpha.300" : "transparent", onClick: onClick, _hover: { bg: accent ? "whiteAlpha.400" : "whiteAlpha.200" }, transition: "background 0.15s", sx: sidebarFocusStyles(theme.colors), children: [children, label && (_jsx(Text, { fontSize: SIDEBAR_CHROME.labelFontSize, color: accent ? activeAccent.label : theme.colors.sidebar.mutedLabel, fontWeight: 500, children: label }))] }));
106
+ return (_jsxs(Flex, { as: "button", type: "button", "aria-label": ariaLabel, flex: "1", minW: 0, alignItems: "center", justifyContent: "center", gap: "7px", px: "10px", py: "14px", cursor: "pointer", border: "none", bg: accent ? "whiteAlpha.300" : "transparent", onClick: onClick, _hover: { bg: accent ? "whiteAlpha.400" : "whiteAlpha.200" }, transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), children: [children, label && (_jsx(Text, { fontSize: SIDEBAR_CHROME.labelFontSize, color: accent ? activeAccent.label : theme.colors.sidebar.mutedLabel, fontWeight: 500, children: label }))] }));
104
107
  };
105
108
  // Collapse (mini-rail) sits next to the Hide/Show navbar-mode toggle. In the
106
109
  // desktop mobile-nav overlay only "Show" (return to the docked sidebar) is shown;
@@ -119,7 +122,7 @@ const FooterControls = ({ toggle, overlay, mobileNav, onToggleCollapse, onToggle
119
122
  return shell(_jsxs(_Fragment, { children: [_jsx(ControlCell, { onClick: onToggleCollapse, ariaLabel: toggle ? "Expand sidebar" : undefined, label: toggle ? undefined : "Collapse", children: toggle ? (_jsx(ArrowRightToLine, { size: 14, color: iconColor })) : (_jsx(ArrowLeftToLine, { size: 14, color: iconColor })) }), onToggleMobileNav && (_jsx(ControlCell, { onClick: onToggleMobileNav, ariaLabel: toggle ? "Show sidebar in overlay mode" : undefined, label: toggle ? undefined : "Hide", children: _jsx(Maximize2, { size: 14, color: iconColor }) }))] }));
120
123
  };
121
124
  // --- Main Sidebar component ---
122
- export default function Sidebar({ menus, activeMenu, handleMenuClick, handleSecondaryNavClick, toggle, changeToggle, logo, companyName, companySubtitle, user, isDisableAddNew = false, onAddNewClick, selectedSubMenu, selectedSecondaryItem, isLoading, loadingLines, open = true, otherApps, mobileOpen = false, onMobileClose, mobileNav = false, onToggleMobileNav, peekOpen = false, onPeekEnd, pinnedItems, pinnedLabel, onUnpin, activePinnedId, pinnedLimit, pinnedLabels, collapseTransition = { speed: "slow" }, autoCollapse = true, }) {
125
+ export default function Sidebar({ menus, activeMenu, handleMenuClick, handleSecondaryNavClick, toggle, changeToggle, logo, companyName, companySubtitle, user, isDisableAddNew = false, onAddNewClick, selectedSubMenu, selectedSecondaryItem, isLoading, loadingLines, open = true, otherApps, mobileOpen = false, onMobileClose, mobileNav = false, onToggleMobileNav, peekOpen = false, onPeekEnd, pinnedItems, pinnedLabel, onUnpin, activePinnedId, pinnedLimit, pinnedLabels, collapseTransition = { speed: "base" }, autoCollapse = true, }) {
123
126
  var _a, _b;
124
127
  const theme = useCustomTheme();
125
128
  const scrollContainerId = sanitizeId(useId());
@@ -329,14 +332,14 @@ export default function Sidebar({ menus, activeMenu, handleMenuClick, handleSeco
329
332
  onMobileClose === null || onMobileClose === void 0 ? void 0 : onMobileClose();
330
333
  };
331
334
  const baseTransform = isOverlayOpen ? "translateX(0)" : "translateX(-100%)";
332
- return (_jsxs(_Fragment, { children: [_jsx(Box, { display: mobileNav ? "block" : { base: "block", lg: "none" }, position: "fixed", inset: 0, ...overlayScrimStyles(theme.colors), zIndex: Z_SCRIM, opacity: isOverlayOpen ? 1 : 0, visibility: isOverlayOpen ? "visible" : "hidden", transition: "opacity 0.28s ease, visibility 0.28s ease", sx: { [REDUCED_MOTION_QUERY]: { transition: "none" } }, onClick: closeOverlay, "aria-hidden": "true" }), _jsxs(Box, { ref: panelRef, onKeyDown: trapTab, tabIndex: overlay ? -1 : undefined, outline: "none", position: mobileNav ? "fixed" : { base: "fixed", lg: "sticky" }, top: 0, left: mobileNav ? 0 : { base: 0, lg: "auto" }, bottom: mobileNav ? 0 : { base: 0, lg: "auto" }, zIndex: mobileNav ? Z_PANEL : { base: Z_PANEL, lg: "auto" }, maxW: mobileNav ? "88vw" : { base: "88vw", lg: "none" }, transform: mobileNav ? baseTransform : { base: baseTransform, lg: "none" }, transition: mobileNav
335
+ return (_jsxs(_Fragment, { children: [_jsx(Box, { display: mobileNav ? "block" : { base: "block", lg: "none" }, position: "fixed", inset: 0, ...overlayScrimStyles(theme.colors), zIndex: Z_SCRIM, opacity: isOverlayOpen ? 1 : 0, visibility: isOverlayOpen ? "visible" : "hidden", transition: SCRIM_TRANSITION, sx: { [REDUCED_MOTION_QUERY]: { transition: "none" } }, onClick: closeOverlay, "aria-hidden": "true" }), _jsxs(Box, { ref: panelRef, onKeyDown: trapTab, tabIndex: overlay ? -1 : undefined, outline: "none", position: mobileNav ? "fixed" : { base: "fixed", lg: "sticky" }, top: 0, left: mobileNav ? 0 : { base: 0, lg: "auto" }, bottom: mobileNav ? 0 : { base: 0, lg: "auto" }, zIndex: mobileNav ? Z_PANEL : { base: Z_PANEL, lg: "auto" }, maxW: mobileNav ? "88vw" : { base: "88vw", lg: "none" }, transform: mobileNav ? baseTransform : { base: baseTransform, lg: "none" }, transition: mobileNav
333
336
  ? dragging
334
337
  ? "none"
335
- : "transform 0.28s cubic-bezier(0.22, 1, 0.36, 1)"
338
+ : OVERLAY_SLIDE
336
339
  : {
337
340
  base: dragging
338
341
  ? "none"
339
- : "transform 0.28s cubic-bezier(0.22, 1, 0.36, 1)",
342
+ : OVERLAY_SLIDE,
340
343
  lg: inline.shadow,
341
344
  }, borderRadius: "none", boxShadow: mobileNav ? theme.shadows["2xl"] : { base: theme.shadows["2xl"], lg: theme.shadows.lg }, display: "flex", background: theme.colors.sidebar.background[500], borderRight: "1px solid", borderColor: theme.colors.sidebar.divider, role: overlay ? "dialog" : undefined, "aria-modal": overlay ? true : undefined, "aria-label": overlay ? "Main navigation" : undefined, ...(overlay && !isOverlayOpen ? { inert: "" } : {}), sx: {
342
345
  ...fullViewportHeight,
@@ -345,6 +348,6 @@ export default function Sidebar({ menus, activeMenu, handleMenuClick, handleSeco
345
348
  }, onMouseLeave: overlayPeeking ? onPeekEnd : undefined, onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, children: [_jsx(Box, { width: mobileNav
346
349
  ? OVERLAY_WIDTH
347
350
  : { base: OVERLAY_WIDTH, lg: effToggle ? RAIL_WIDTH : EXPANDED_WIDTH }, transition: mobileNav
348
- ? `width 0.26s ${PANEL_EASE}`
349
- : { base: `width 0.26s ${PANEL_EASE}`, lg: inline.width }, display: "flex", flexDirection: "column", justifyContent: "space-between", sx: { "@media (prefers-reduced-motion: reduce)": { transition: "none" } }, children: _jsxs(Flex, { flexDir: "column", w: "100%", as: "nav", "aria-label": "Main navigation", h: "100%", children: [_jsx(SidebarHeader, { logo: logo, companyName: companyName, companySubtitle: companySubtitle, toggle: effToggle, isLoading: isLoading, onToggle: changeToggle, overlay: overlay, onClose: onMobileClose }), _jsx(Box, { id: scrollContainerId, flex: "1", minH: 0, w: "100%", overflowY: "auto", overflowX: "hidden", py: 2, px: "6px", sx: cssForScrollBar(theme), children: isLoading ? (Array.from({ length: loadingLines !== null && loadingLines !== void 0 ? loadingLines : 15 }).map((_, i) => (_jsx(SkeletonMenuRow, { toggle: effToggle }, i)))) : (_jsxs(_Fragment, { children: [pinnedItems && pinnedItems.length > 0 && (_jsx(PinnedSection, { items: pinnedItems, label: pinnedLabel, limit: pinnedLimit, toggle: effToggle, overlay: overlay, activeId: activePinnedId, labels: pinnedLabels, onItemClick: handleMenuClickInternal, onUnpin: onUnpin })), _jsx(MenuItems, { activeMenu: pinnedActive ? NO_ACTIVE_MENU : activeMenu, menus: menus, handleMenuClick: handleMenuClickInternal, toggle: effToggle, selectedSubMenu: selectedSubMenu, overlay: overlay, containerId: scrollContainerId })] })) }), _jsxs(Box, { flexShrink: 0, children: [!isDisableAddNew && (_jsx(Box, { borderTop: "1px solid", borderColor: theme.colors.sidebar.divider, py: 2, px: "6px", children: _jsx(AddNewButton, { toggle: effToggle, onClick: onAddNewClick, overlay: overlay }) })), _jsx(OtherApps, { toggle: effToggle, otherApps: otherApps !== null && otherApps !== void 0 ? otherApps : [] }), user && _jsx(UserFooter, { user: user, toggle: effToggle, overlay: overlay }), _jsx(FooterControls, { toggle: effToggle, overlay: overlay, mobileNav: mobileNav, onToggleCollapse: changeToggle, onToggleMobileNav: onToggleMobileNav })] })] }) }), secondaryItems.length > 0 && (_jsx(SecondaryBar, { items: secondaryItems, defaultCollapsed: effToggle, collapsedWidth: "3.5rem", expandedWidth: "10rem", selected: selectedSecondaryItem, onItemClick: handleSecondaryNavClick, title: activeTop === null || activeTop === void 0 ? void 0 : activeTop.title, icon: activeTop === null || activeTop === void 0 ? void 0 : activeTop.icon })), overlay && (_jsx(Box, { display: mobileOpen ? "block" : "none", position: "absolute", top: "50%", right: "6px", transform: "translateY(-50%)", w: "4px", h: "42px", borderRadius: "full", bg: theme.colors.sidebar.mutedIcon, "aria-hidden": "true" }))] })] }));
351
+ ? OVERLAY_WIDTH_TRANSITION
352
+ : { base: OVERLAY_WIDTH_TRANSITION, lg: inline.width }, display: "flex", flexDirection: "column", justifyContent: "space-between", sx: { "@media (prefers-reduced-motion: reduce)": { transition: "none" } }, children: _jsxs(Flex, { flexDir: "column", w: "100%", as: "nav", "aria-label": "Main navigation", h: "100%", children: [_jsx(SidebarHeader, { logo: logo, companyName: companyName, companySubtitle: companySubtitle, toggle: effToggle, isLoading: isLoading, onToggle: changeToggle, overlay: overlay, onClose: onMobileClose }), _jsx(Box, { id: scrollContainerId, flex: "1", minH: 0, w: "100%", overflowY: "auto", overflowX: "hidden", py: 2, px: "6px", sx: cssForScrollBar(theme), children: isLoading ? (Array.from({ length: loadingLines !== null && loadingLines !== void 0 ? loadingLines : 15 }).map((_, i) => (_jsx(SkeletonMenuRow, { toggle: effToggle }, i)))) : (_jsxs(_Fragment, { children: [pinnedItems && pinnedItems.length > 0 && (_jsx(PinnedSection, { items: pinnedItems, label: pinnedLabel, limit: pinnedLimit, toggle: effToggle, overlay: overlay, activeId: activePinnedId, labels: pinnedLabels, onItemClick: handleMenuClickInternal, onUnpin: onUnpin })), _jsx(MenuItems, { activeMenu: pinnedActive ? NO_ACTIVE_MENU : activeMenu, menus: menus, handleMenuClick: handleMenuClickInternal, toggle: effToggle, selectedSubMenu: selectedSubMenu, overlay: overlay, containerId: scrollContainerId })] })) }), _jsxs(Box, { flexShrink: 0, children: [!isDisableAddNew && (_jsx(Box, { borderTop: "1px solid", borderColor: theme.colors.sidebar.divider, py: 2, px: "6px", children: _jsx(AddNewButton, { toggle: effToggle, onClick: onAddNewClick, overlay: overlay }) })), _jsx(OtherApps, { toggle: effToggle, otherApps: otherApps !== null && otherApps !== void 0 ? otherApps : [] }), user && _jsx(UserFooter, { user: user, toggle: effToggle, overlay: overlay }), _jsx(FooterControls, { toggle: effToggle, overlay: overlay, mobileNav: mobileNav, onToggleCollapse: changeToggle, onToggleMobileNav: onToggleMobileNav })] })] }) }), secondaryItems.length > 0 && (_jsx(SecondaryBar, { items: secondaryItems, defaultCollapsed: effToggle, collapsedWidth: "3.5rem", expandedWidth: "10rem", selected: selectedSecondaryItem, onItemClick: handleSecondaryNavClick, title: activeTop === null || activeTop === void 0 ? void 0 : activeTop.title, icon: activeTop === null || activeTop === void 0 ? void 0 : activeTop.icon })), overlay && (_jsx(Box, { display: mobileOpen ? "block" : "none", position: "absolute", top: "50%", right: "6px", transform: "translateY(-50%)", w: "4px", h: "42px", borderRadius: "full", bg: theme.colors.sidebar.mutedIcon, "aria-hidden": "true" }))] })] }));
350
353
  }
@@ -15,6 +15,9 @@ import { sanitizeId } from "../sidebarId.js";
15
15
  import ToolTip from "../../ToolTip/ToolTip.js";
16
16
  import { sidebarFocusStyles } from "../sidebarFocus.js";
17
17
  import { SIDEBAR_ROW } from "../sidebarScale.js";
18
+ import { transitionFor } from "../../../Theme/tokens/primitives/motion.js";
19
+ import { SIDEBAR_BG_TRANSITION, SIDEBAR_INK_TRANSITION } from "../sidebarMotion.js";
20
+ const SUBMENU_REVEAL_TRANSITION = transitionFor(["opacity", "transform"], "base");
18
21
  /**
19
22
  * These rows are real `<a href>`s now, so the browser's own gestures have to keep working —
20
23
  * cmd/ctrl-click for a new tab, shift for a window, middle-click. Only a plain left click is
@@ -87,10 +90,10 @@ const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
87
90
  },
88
91
  cursor: isBlocked ? "not-allowed" : "pointer",
89
92
  opacity: isBlocked ? 0.6 : 1,
90
- transition: "background 0.12s",
93
+ transition: SIDEBAR_BG_TRANSITION,
91
94
  sx: sidebarFocusStyles(theme.colors),
92
95
  };
93
- const buttonContent = (_jsxs(Flex, { align: "center", gap: "9px", justify: toggle ? "center" : "space-between", w: "100%", children: [_jsxs(Flex, { align: "center", gap: "9px", overflow: "hidden", children: [_jsxs(Box, { position: "relative", display: "flex", alignItems: "center", children: [_jsx(Icon, { as: icon, fontSize: "md", verticalAlign: "middle", color: isAnyActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isAnyActive ? undefined : { color: theme.colors.white }, transition: "color 0.12s" }), toggle && (badgeValue != null || hasSubmenuBadge) && (_jsx(Box, { position: "absolute", top: "0", right: "0", w: "0.375rem", h: "0.375rem", borderRadius: "full", bg: theme.colors.sidebar.semanticText.error }))] }), !toggle && (_jsx(TruncatedTextWithTooltip
96
+ const buttonContent = (_jsxs(Flex, { align: "center", gap: "9px", justify: toggle ? "center" : "space-between", w: "100%", children: [_jsxs(Flex, { align: "center", gap: "9px", overflow: "hidden", children: [_jsxs(Box, { position: "relative", display: "flex", alignItems: "center", children: [_jsx(Icon, { as: icon, fontSize: "md", verticalAlign: "middle", color: isAnyActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isAnyActive ? undefined : { color: theme.colors.white }, transition: SIDEBAR_INK_TRANSITION }), toggle && (badgeValue != null || hasSubmenuBadge) && (_jsx(Box, { position: "absolute", top: "0", right: "0", w: "0.375rem", h: "0.375rem", borderRadius: "full", bg: theme.colors.sidebar.semanticText.error }))] }), !toggle && (_jsx(TruncatedTextWithTooltip
94
97
  // open={isOpen}
95
98
  , {
96
99
  // open={isOpen}
@@ -121,7 +124,7 @@ const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
121
124
  handleToggleSubMenu(e);
122
125
  }, "data-menu-id": String((_d = menu.id) !== null && _d !== void 0 ? _d : title), children: buttonContent }));
123
126
  return (_jsxs(_Fragment, { children: [locked && lockedReason ? (_jsx(ToolTip, { label: lockedReason, placement: "top", children: row })) : (row), hasSubMenu && (_jsx(Collapse, { in: isOpen, animateOpacity: true, children: _jsx(Box, { id: submenuPanelId, "data-collapse": "true", "data-menu-id": String((_e = menu.id) !== null && _e !== void 0 ? _e : title), "data-open": isOpen ? "true" : "false", mt: "0.125rem", sx: {
124
- transition: "opacity 0.28s ease, transform 0.28s ease",
127
+ transition: SUBMENU_REVEAL_TRANSITION,
125
128
  opacity: isOpen ? 1 : 0,
126
129
  transform: isOpen ? "translateY(0)" : "translateY(-6px)",
127
130
  }, children: subMenu.map((sub, sIdx) => {
@@ -141,7 +144,7 @@ const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
141
144
  e.preventDefault();
142
145
  if (!isSubBlocked)
143
146
  handleClick === null || handleClick === void 0 ? void 0 : handleClick(sub);
144
- }, display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, transition: "background 0.12s", sx: sidebarFocusStyles(theme.colors), children: [_jsxs(Flex, { align: "center", gap: "9px", overflow: "hidden", flex: "1", children: [sub.icon ? (_jsx(Icon, { as: sub.icon, fontSize: SIDEBAR_ROW.iconSize, flexShrink: 0, color: isSubActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isSubActive ? undefined : { color: theme.colors.white }, transition: "color 0.12s" })) : (_jsx(Box, { w: "5px", h: "5px", borderRadius: "full", flexShrink: 0, bg: isSubActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isSubActive ? undefined : { bg: theme.colors.white }, transition: "background 0.12s" })), _jsx(TruncatedTextWithTooltip, { fontSize: SIDEBAR_ROW.fontSize, fontWeight: isSubActive ? 600 : 500, lineHeight: "1", color: isSubActive ? activeAccent.label : theme.colors.sidebar.mutedLabel, _groupHover: isSubActive ? undefined : { color: theme.colors.white }, children: sub.title })] }), sub.locked ? (_jsx(Icon, { as: LockKeyhole, fontSize: "md", color: theme.colors.sidebar.mutedIcon })) : (() => {
147
+ }, display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), children: [_jsxs(Flex, { align: "center", gap: "9px", overflow: "hidden", flex: "1", children: [sub.icon ? (_jsx(Icon, { as: sub.icon, fontSize: SIDEBAR_ROW.iconSize, flexShrink: 0, color: isSubActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isSubActive ? undefined : { color: theme.colors.white }, transition: SIDEBAR_INK_TRANSITION })) : (_jsx(Box, { w: "5px", h: "5px", borderRadius: "full", flexShrink: 0, bg: isSubActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isSubActive ? undefined : { bg: theme.colors.white }, transition: SIDEBAR_BG_TRANSITION })), _jsx(TruncatedTextWithTooltip, { fontSize: SIDEBAR_ROW.fontSize, fontWeight: isSubActive ? 600 : 500, lineHeight: "1", color: isSubActive ? activeAccent.label : theme.colors.sidebar.mutedLabel, _groupHover: isSubActive ? undefined : { color: theme.colors.white }, children: sub.title })] }), sub.locked ? (_jsx(Icon, { as: LockKeyhole, fontSize: "md", color: theme.colors.sidebar.mutedIcon })) : (() => {
145
148
  var _a, _b, _c, _d;
146
149
  const subCfg = typeof sub.badge === "object" && sub.badge !== null
147
150
  ? sub.badge
@@ -11,6 +11,7 @@ import TruncatedTextWithTooltip from "./TextTruncation.js";
11
11
  import ToolTip from "../../ToolTip/ToolTip.js";
12
12
  import { sidebarFocusStyles } from "../sidebarFocus.js";
13
13
  import { SIDEBAR_ROW } from "../sidebarScale.js";
14
+ import { SIDEBAR_BG_TRANSITION, SIDEBAR_INK_TRANSITION } from "../sidebarMotion.js";
14
15
  const MenuPopoverContent = ({ menu, handleMenuClick, activeMenu, }) => {
15
16
  var _a;
16
17
  const theme = useCustomTheme();
@@ -51,7 +52,7 @@ const MenuPopoverContent = ({ menu, handleMenuClick, activeMenu, }) => {
51
52
  }, px: 2, h: SIDEBAR_ROW.subHeight, mb: "2px", borderRadius: "lg", align: "center", justify: "space-between", gap: 2, borderLeft: "2px solid", borderLeftColor: isSubActive ? theme.colors.sidebar.activeIcon : "transparent", bg: isSubActive ? "whiteAlpha.300" : "transparent", _hover: {
52
53
  bg: isSubBlocked ? "transparent" : isSubActive ? "whiteAlpha.400" : "whiteAlpha.200",
53
54
  cursor: !isSubBlocked ? "pointer" : "not-allowed",
54
- }, opacity: isSubBlocked ? 0.5 : 1, pointerEvents: isSubBlocked ? "none" : "auto", transition: "background 0.12s", sx: sidebarFocusStyles(theme.colors, theme.colors.sidebar.elevated), children: [_jsxs(Flex, { align: "center", gap: "9px", overflow: "hidden", flex: "1", children: [sub.icon ? (_jsx(Icon, { as: sub.icon, fontSize: SIDEBAR_ROW.iconSize, flexShrink: 0, color: isSubActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isSubActive ? undefined : { color: theme.colors.white }, transition: "color 0.12s" })) : (_jsx(Box, { w: "5px", h: "5px", borderRadius: "full", flexShrink: 0, bg: isSubActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isSubActive ? undefined : { bg: theme.colors.white }, transition: "background 0.12s" })), _jsx(TruncatedTextWithTooltip, { fontSize: SIDEBAR_ROW.fontSize, fontWeight: isSubActive ? 600 : 500, flex: 1, color: isSubActive ? activeAccent.label : theme.colors.white, _groupHover: isSubActive ? undefined : { color: theme.colors.white }, children: sub.title })] }), sub.locked ? (sub.lockedReason ? (_jsx(ToolTip, { label: sub.lockedReason, placement: "top", children: _jsx(Icon, { as: LockKeyhole, fontSize: "md", color: theme.colors.sidebar.mutedIcon }) })) : (_jsx(Icon, { as: LockKeyhole, fontSize: "md", color: theme.colors.sidebar.mutedIcon }))) : (() => {
55
+ }, opacity: isSubBlocked ? 0.5 : 1, pointerEvents: isSubBlocked ? "none" : "auto", transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors, theme.colors.sidebar.elevated), children: [_jsxs(Flex, { align: "center", gap: "9px", overflow: "hidden", flex: "1", children: [sub.icon ? (_jsx(Icon, { as: sub.icon, fontSize: SIDEBAR_ROW.iconSize, flexShrink: 0, color: isSubActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isSubActive ? undefined : { color: theme.colors.white }, transition: SIDEBAR_INK_TRANSITION })) : (_jsx(Box, { w: "5px", h: "5px", borderRadius: "full", flexShrink: 0, bg: isSubActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isSubActive ? undefined : { bg: theme.colors.white }, transition: SIDEBAR_BG_TRANSITION })), _jsx(TruncatedTextWithTooltip, { fontSize: SIDEBAR_ROW.fontSize, fontWeight: isSubActive ? 600 : 500, flex: 1, color: isSubActive ? activeAccent.label : theme.colors.white, _groupHover: isSubActive ? undefined : { color: theme.colors.white }, children: sub.title })] }), sub.locked ? (sub.lockedReason ? (_jsx(ToolTip, { label: sub.lockedReason, placement: "top", children: _jsx(Icon, { as: LockKeyhole, fontSize: "md", color: theme.colors.sidebar.mutedIcon }) })) : (_jsx(Icon, { as: LockKeyhole, fontSize: "md", color: theme.colors.sidebar.mutedIcon }))) : (() => {
55
56
  var _a, _b, _c, _d;
56
57
  const cfg = typeof sub.badge === "object" && sub.badge !== null
57
58
  ? sub.badge
@@ -3,6 +3,7 @@ import { Box, Flex, Text, Popover, PopoverTrigger, PopoverContent, PopoverBody,
3
3
  import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
4
4
  import zIndices from "../../../Theme/tokens/primitives/zIndices.js";
5
5
  import { sidebarFocusStyles } from "../sidebarFocus.js";
6
+ import { SIDEBAR_BG_TRANSITION } from "../sidebarMotion.js";
6
7
  const OtherApps = ({ toggle, otherApps }) => {
7
8
  const theme = useCustomTheme();
8
9
  if (!otherApps || otherApps.length === 0)
@@ -12,7 +13,7 @@ const OtherApps = ({ toggle, otherApps }) => {
12
13
  return (_jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", color: theme.colors.sidebar.mutedIcon, fontSize: "15px", flexShrink: 0, children: (_a = app.icon) !== null && _a !== void 0 ? _a : (_jsx(Box, { w: "0.5rem", h: "0.5rem", borderRadius: "full", bg: app.color, boxShadow: `0 0 5px ${app.color}`, flexShrink: 0 })) }));
13
14
  };
14
15
  // Grid cell: icon on top, truncated label below (label hidden when collapsed).
15
- const appCell = (app) => (_jsxs(Flex, { as: "button", type: "button", direction: "column", align: "center", justify: "center", gap: "3px", px: "2px", py: "6px", borderRadius: "lg", cursor: "pointer", border: "none", bg: "transparent", w: "100%", _hover: { backgroundColor: "whiteAlpha.200" }, transition: "background 0.12s", sx: sidebarFocusStyles(theme.colors), onClick: app.onClick, children: [appIcon(app), !toggle && (_jsx(Text, { fontSize: "9.5px", color: theme.colors.sidebar.mutedLabel, textAlign: "center", maxW: "44px", isTruncated: true, children: app.name }))] }));
16
+ const appCell = (app) => (_jsxs(Flex, { as: "button", type: "button", direction: "column", align: "center", justify: "center", gap: "3px", px: "2px", py: "6px", borderRadius: "lg", cursor: "pointer", border: "none", bg: "transparent", w: "100%", _hover: { backgroundColor: "whiteAlpha.200" }, transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), onClick: app.onClick, children: [appIcon(app), !toggle && (_jsx(Text, { fontSize: "9.5px", color: theme.colors.sidebar.mutedLabel, textAlign: "center", maxW: "44px", isTruncated: true, children: app.name }))] }));
16
17
  const flyoutBody = (app) => {
17
18
  var _a;
18
19
  return (_jsxs(_Fragment, { children: [_jsxs(Flex, { alignItems: "center", gap: 2, mb: 1, onClick: app.onClick, children: [(_a = app.icon) !== null && _a !== void 0 ? _a : (_jsx(Box, { w: "0.5rem", h: "0.5rem", borderRadius: "full", bg: app.color, boxShadow: `0 0 5px ${app.color}`, flexShrink: 0 })), _jsx(Text, { fontSize: "sm", fontWeight: 700, color: theme.colors.white, children: app.name })] }), app.description && (_jsx(Text, { fontSize: "xs", color: theme.colors.sidebar.mutedLabel, children: app.description }))] }));
@@ -13,6 +13,8 @@ import { SIDEBAR_ROW } from "../sidebarScale.js";
13
13
  import ToolTip from "../../ToolTip/ToolTip.js";
14
14
  import TruncatedTextWithTooltip from "./TextTruncation.js";
15
15
  import { isBrowserNavigationGesture } from "./MenuItemBox.js";
16
+ import { transitionFor } from "../../../Theme/tokens/primitives/motion.js";
17
+ import { SIDEBAR_BG_TRANSITION, SIDEBAR_INK_TRANSITION } from "../sidebarMotion.js";
16
18
  export const DEFAULT_PINNED_LABEL = "Pinned";
17
19
  export const DEFAULT_PINNED_LIMIT = 5;
18
20
  const DEFAULT_LABELS = {
@@ -21,6 +23,7 @@ const DEFAULT_LABELS = {
21
23
  unpin: "Unpin {title}",
22
24
  };
23
25
  const UNPIN_SIZE = "24px";
26
+ const UNPIN_TRANSITION = transitionFor(["opacity", "background"]);
24
27
  const LADDER = { hover: "whiteAlpha.200", active: "whiteAlpha.300", activeHover: "whiteAlpha.400" };
25
28
  const VISUALLY_HIDDEN = {
26
29
  position: "absolute",
@@ -69,16 +72,16 @@ const PinnedSection = ({ items, label = DEFAULT_PINNED_LABEL, limit = DEFAULT_PI
69
72
  };
70
73
  const renderRow = (item) => {
71
74
  const isActive = activeIndex >= 0 && String(item.id) === String(activeId);
72
- const anchor = (_jsx(Box, { as: "a", href: item.url, "data-group": "", "data-pinned-id": String(item.id), "aria-label": toggle ? item.title : undefined, "aria-current": isActive ? "page" : undefined, display: "flex", alignItems: "center", textAlign: "left", textDecoration: "none", w: "100%", h: rowHeight, borderRadius: "lg", pl: "10px", pr: !toggle && onUnpin ? `calc(10px + ${UNPIN_SIZE})` : "10px", fontWeight: 500, borderLeft: "2px solid", borderLeftColor: isActive ? theme.colors.sidebar.activeIcon : "transparent", backgroundColor: isActive ? LADDER.active : "transparent", color: theme.colors.sidebar.mutedIcon, _hover: { backgroundColor: isActive ? LADDER.activeHover : LADDER.hover }, cursor: "pointer", transition: "background 0.12s", sx: sidebarFocusStyles(theme.colors), onClick: (e) => {
75
+ const anchor = (_jsx(Box, { as: "a", href: item.url, "data-group": "", "data-pinned-id": String(item.id), "aria-label": toggle ? item.title : undefined, "aria-current": isActive ? "page" : undefined, display: "flex", alignItems: "center", textAlign: "left", textDecoration: "none", w: "100%", h: rowHeight, borderRadius: "lg", pl: "10px", pr: !toggle && onUnpin ? `calc(10px + ${UNPIN_SIZE})` : "10px", fontWeight: 500, borderLeft: "2px solid", borderLeftColor: isActive ? theme.colors.sidebar.activeIcon : "transparent", backgroundColor: isActive ? LADDER.active : "transparent", color: theme.colors.sidebar.mutedIcon, _hover: { backgroundColor: isActive ? LADDER.activeHover : LADDER.hover }, cursor: "pointer", transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), onClick: (e) => {
73
76
  if (item.url && isBrowserNavigationGesture(e))
74
77
  return;
75
78
  e.preventDefault();
76
79
  onItemClick(item);
77
- }, children: _jsxs(Flex, { align: "center", gap: "9px", justify: toggle ? "center" : "space-between", w: "100%", children: [_jsxs(Flex, { align: "center", gap: "9px", overflow: "hidden", flex: toggle ? undefined : 1, minW: 0, children: [_jsxs(Box, { position: "relative", display: "flex", alignItems: "center", children: [_jsx(Icon, { as: item.icon, fontSize: "md", color: isActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isActive ? undefined : { color: theme.colors.white }, transition: "color 0.12s" }), toggle && readBadge(item.badge).value != null && (_jsx(Box, { position: "absolute", top: "0", right: "0", w: "0.375rem", h: "0.375rem", borderRadius: "full", bg: theme.colors.sidebar.semanticText.error }))] }), !toggle && (_jsx(TruncatedTextWithTooltip, { fontSize: SIDEBAR_ROW.fontSize, lineHeight: "1", flex: "1", color: isActive ? activeAccent.label : theme.colors.white, fontWeight: isActive ? 600 : 500, _groupHover: isActive ? undefined : { color: theme.colors.white }, children: item.title }))] }), !toggle && renderBadge(item.badge)] }) }));
80
+ }, children: _jsxs(Flex, { align: "center", gap: "9px", justify: toggle ? "center" : "space-between", w: "100%", children: [_jsxs(Flex, { align: "center", gap: "9px", overflow: "hidden", flex: toggle ? undefined : 1, minW: 0, children: [_jsxs(Box, { position: "relative", display: "flex", alignItems: "center", children: [_jsx(Icon, { as: item.icon, fontSize: "md", color: isActive ? activeAccent.icon : theme.colors.sidebar.mutedIcon, _groupHover: isActive ? undefined : { color: theme.colors.white }, transition: SIDEBAR_INK_TRANSITION }), toggle && readBadge(item.badge).value != null && (_jsx(Box, { position: "absolute", top: "0", right: "0", w: "0.375rem", h: "0.375rem", borderRadius: "full", bg: theme.colors.sidebar.semanticText.error }))] }), !toggle && (_jsx(TruncatedTextWithTooltip, { fontSize: SIDEBAR_ROW.fontSize, lineHeight: "1", flex: "1", color: isActive ? activeAccent.label : theme.colors.white, fontWeight: isActive ? 600 : 500, _groupHover: isActive ? undefined : { color: theme.colors.white }, children: item.title }))] }), !toggle && renderBadge(item.badge)] }) }));
78
81
  return (_jsxs(Box, { as: "li", listStyleType: "none", position: "relative", "data-group": "", children: [toggle ? (_jsx(ToolTip, { label: item.title, placement: "right", children: anchor })) : (anchor), onUnpin && !toggle && (_jsx(Box, { as: "button", type: "button", "aria-label": text.unpin.replace("{title}", item.title), onClick: () => onUnpin(item), position: "absolute", top: "50%", right: "6px", transform: "translateY(-50%)", w: UNPIN_SIZE, h: UNPIN_SIZE, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: "lg", border: "none", bg: "transparent", cursor: "pointer", color: theme.colors.sidebar.mutedIcon, opacity: overlay ? 1 : 0, _groupHover: { opacity: 1 }, _groupFocusWithin: { opacity: 1 }, _hover: {
79
82
  bg: LADDER.active,
80
83
  color: theme.colors.white,
81
- }, transition: "opacity 0.12s, background 0.12s", sx: sidebarFocusStyles(theme.colors), children: _jsx(Icon, { as: PinOff, fontSize: "sm" }) }))] }, String(item.id)));
84
+ }, transition: UNPIN_TRANSITION, sx: sidebarFocusStyles(theme.colors), children: _jsx(Icon, { as: PinOff, fontSize: "sm" }) }))] }, String(item.id)));
82
85
  };
83
86
  const disclosureLabel = showAll
84
87
  ? text.showLess
@@ -86,7 +89,7 @@ const PinnedSection = ({ items, label = DEFAULT_PINNED_LABEL, limit = DEFAULT_PI
86
89
  const disclosureButton = (_jsxs(Box, { as: "button", type: "button", "aria-expanded": showAll, "aria-label": toggle ? disclosureLabel : undefined, onClick: () => setShowAll((v) => !v), display: "flex", alignItems: "center", justifyContent: toggle ? "center" : "flex-start", gap: "9px", w: "100%", h: rowHeight, px: "10px", borderRadius: "lg", border: "none", borderLeft: "2px solid transparent", bg: "transparent", cursor: "pointer", color: theme.colors.sidebar.mutedLabel, fontSize: SIDEBAR_ROW.fontSize, fontWeight: 500, _hover: {
87
90
  backgroundColor: LADDER.hover,
88
91
  color: theme.colors.white,
89
- }, transition: "background 0.12s", sx: sidebarFocusStyles(theme.colors), children: [_jsx(Icon, { as: showAll ? ChevronUp : ChevronDown, fontSize: "md", flexShrink: 0 }), !toggle && _jsx("span", { children: disclosureLabel })] }));
92
+ }, transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), children: [_jsx(Icon, { as: showAll ? ChevronUp : ChevronDown, fontSize: "md", flexShrink: 0 }), !toggle && _jsx("span", { children: disclosureLabel })] }));
90
93
  return (_jsxs(Box, { mb: toggle ? "5px" : "3px", "data-testid": "sidebar-pinned", children: [_jsx(Box, { id: headingId, as: "h2", px: "10px", pt: overlay ? "6px" : "10px", pb: "3px", fontSize: "9.5px", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.1em", color: theme.colors.sidebar.mutedLabel, whiteSpace: "nowrap", overflow: "hidden", sx: toggle ? VISUALLY_HIDDEN : undefined, children: label }), _jsxs(Box, { as: "ul", "aria-labelledby": headingId, display: "flex", flexDirection: "column", gap: "2px", m: 0, p: 0, children: [visible.map(renderRow), hiddenCount > 0 && (_jsx(Box, { as: "li", listStyleType: "none", children: toggle ? (_jsx(ToolTip, { label: disclosureLabel, placement: "right", children: disclosureButton })) : (disclosureButton) }))] }), _jsx(Box, { h: "1px", bg: theme.colors.sidebar.divider, mx: 2, mt: overlay ? "6px" : "8px", mb: overlay ? "3px" : "5px" })] }));
91
94
  };
92
95
  export default PinnedSection;
@@ -0,0 +1,3 @@
1
+ import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
2
+ export const SIDEBAR_BG_TRANSITION = transitionFor(["background"]);
3
+ export const SIDEBAR_INK_TRANSITION = transitionFor(["color"]);
@@ -3,6 +3,7 @@ import { useMemo } from "react";
3
3
  import { Box, Flex, Heading, Skeleton, Table, Tbody, Td, Text, Th, Thead, Tr, VStack, } from "@chakra-ui/react";
4
4
  import { MonitorSmartphone } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
+ import { bandOn, cardRule } from "../../Theme/tokens/builders/planeStep.js";
6
7
  import EmptyState from "../EmptyState/EmptyState.js";
7
8
  const DEFAULT_LABELS = {
8
9
  title: "Recent Sign-in Devices",
@@ -14,20 +15,21 @@ const DEFAULT_LABELS = {
14
15
  const SignInActivityTable = ({ devices, isLoading = false, labels: labelOverrides, }) => {
15
16
  const { colors } = useCustomTheme();
16
17
  const labels = useMemo(() => ({ ...DEFAULT_LABELS, ...labelOverrides }), [labelOverrides]);
17
- const border = colors.boxborder[200];
18
+ const edge = colors.boxborder[200];
18
19
  const surface = colors.background[50];
20
+ const rule = cardRule(colors);
19
21
  const muted = colors.textMuted;
20
22
  const heading = colors.header[500];
21
- const headBg = colors.backgroundColor.tableHeader;
23
+ const headBg = bandOn(colors.backgroundColor.tableHeader, surface);
22
24
  const shadow = colors.boxShadow.default;
23
25
  const thStyle = {
24
26
  fontSize: "0.7rem",
25
27
  textTransform: "uppercase",
26
28
  letterSpacing: "0.04em",
27
29
  color: muted,
28
- borderColor: border,
30
+ borderColor: rule,
29
31
  py: 3,
30
32
  };
31
- return (_jsxs(Box, { mt: 4, backgroundColor: surface, borderRadius: "xl", border: "1px solid", borderColor: border, boxShadow: `0 1px 2px ${shadow}`, overflow: "hidden", children: [_jsx(Flex, { px: 4, py: 3, borderBottom: "1px solid", borderColor: border, alignItems: "center", children: _jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.title }) }), _jsx(Box, { overflowX: "auto", children: isLoading ? (_jsx(VStack, { spacing: 3, p: 4, align: "stretch", children: Array.from({ length: 4 }).map((_, idx) => (_jsx(Skeleton, { height: "18px", borderRadius: "md" }, idx))) })) : devices.length === 0 ? (_jsx(EmptyState, { icon: MonitorSmartphone, title: labels.noActivity, size: "sm", minH: "160px" })) : (_jsxs(Table, { variant: "simple", size: "sm", children: [_jsx(Thead, { bg: headBg, children: _jsxs(Tr, { children: [_jsx(Th, { ...thStyle, children: labels.browser }), _jsx(Th, { ...thStyle, children: labels.device }), _jsx(Th, { ...thStyle, children: labels.recentActivity })] }) }), _jsx(Tbody, { children: devices.map((device, index) => (_jsxs(Tr, { _hover: { bg: headBg }, transition: "background 0.15s ease", children: [_jsx(Td, { borderColor: border, fontSize: "sm", fontWeight: 500, color: heading, children: device.browser || "—" }), _jsx(Td, { borderColor: border, fontSize: "sm", color: muted, children: device.device }), _jsx(Td, { borderColor: border, fontSize: "sm", color: muted, children: _jsx(Text, { children: device.activity }) })] }, index))) })] })) })] }));
33
+ return (_jsxs(Box, { mt: 4, backgroundColor: surface, borderRadius: "xl", border: "1px solid", borderColor: edge, boxShadow: `0 1px 2px ${shadow}`, overflow: "hidden", children: [_jsx(Flex, { px: 4, py: 3, borderBottom: "1px solid", borderColor: rule, alignItems: "center", children: _jsx(Heading, { size: "sm", fontWeight: 600, color: heading, children: labels.title }) }), _jsx(Box, { overflowX: "auto", children: isLoading ? (_jsx(VStack, { spacing: 3, p: 4, align: "stretch", children: Array.from({ length: 4 }).map((_, idx) => (_jsx(Skeleton, { height: "18px", borderRadius: "md" }, idx))) })) : devices.length === 0 ? (_jsx(EmptyState, { icon: MonitorSmartphone, title: labels.noActivity, size: "sm", minH: "160px" })) : (_jsxs(Table, { variant: "simple", size: "sm", children: [_jsx(Thead, { bg: headBg, children: _jsxs(Tr, { children: [_jsx(Th, { ...thStyle, children: labels.browser }), _jsx(Th, { ...thStyle, children: labels.device }), _jsx(Th, { ...thStyle, children: labels.recentActivity })] }) }), _jsx(Tbody, { children: devices.map((device, index) => (_jsxs(Tr, { _hover: { bg: headBg }, transition: "background 0.15s ease", children: [_jsx(Td, { borderColor: rule, fontSize: "sm", fontWeight: 500, color: heading, children: device.browser || "—" }), _jsx(Td, { borderColor: rule, fontSize: "sm", color: muted, children: device.device }), _jsx(Td, { borderColor: rule, fontSize: "sm", color: muted, children: _jsx(Text, { children: device.activity }) })] }, index))) })] })) })] }));
32
34
  };
33
35
  export default SignInActivityTable;
@@ -4,6 +4,7 @@ import { Box, Flex } from "@chakra-ui/react";
4
4
  import { Check } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
6
  import { focusVisibleStyles } from "../../Theme/chakra/focusRing.styles.js";
7
+ import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
7
8
  import ToolTip from "../ToolTip/ToolTip.js";
8
9
  import { resolveStagePalette, } from "./StageProgressProps.js";
9
10
  import { centerInStrip } from "./centerInStrip.js";
@@ -12,6 +13,8 @@ const sizeMap = {
12
13
  md: { arrow: 16, minW: "160px", h: "36px", px: 4, font: "0.875rem", icon: 14 },
13
14
  lg: { arrow: 20, minW: "200px", h: "44px", px: 5, font: "1rem", icon: 16 },
14
15
  };
16
+ const LABEL_TRANSITION = transitionFor(["color", "filter"], "base");
17
+ const CHEVRON_TRANSITION = transitionFor(["background", "border-color"], "base");
15
18
  const clipFor = (index, total, a) => {
16
19
  const isFirst = index === 0;
17
20
  const isLast = index === total - 1;
@@ -78,12 +81,12 @@ const StageItem = ({ label, index, total, state, variant = "chevron", size = "md
78
81
  : undefined;
79
82
  const showTooltip = ((_a = label === null || label === void 0 ? void 0 : label.length) !== null && _a !== void 0 ? _a : 0) > tooltipThreshold;
80
83
  // clip-path clips box-shadow too, so the focus ring stays on this unclipped outer button.
81
- const content = (_jsxs(Box, { ref: ref, as: (interactive ? "button" : "div"), type: interactive ? "button" : undefined, "aria-current": state === "active" ? "step" : undefined, "aria-disabled": disabled ? true : undefined, onClick: interactive ? onClick : undefined, "data-group": "", position: "relative", flexShrink: 0, minWidth: minWidth || s.minW, height: s.h, ml: `${overlap}px`, p: 0, border: "none", bg: "transparent", color: isOutlinePill ? palette.mutedText : color, fontSize: s.font, fontWeight: state === "active" ? 600 : 500, display: "flex", alignItems: "center", justifyContent: isChevron ? "flex-start" : "center", cursor: interactive ? "pointer" : "default", opacity: disabled ? 0.55 : 1, transition: "color 0.18s ease, filter 0.18s ease", sx: interactive ? focusVisibleStyles(theme.colors) : undefined, _hover: interactive
84
+ const content = (_jsxs(Box, { ref: ref, as: (interactive ? "button" : "div"), type: interactive ? "button" : undefined, "aria-current": state === "active" ? "step" : undefined, "aria-disabled": disabled ? true : undefined, onClick: interactive ? onClick : undefined, "data-group": "", position: "relative", flexShrink: 0, minWidth: minWidth || s.minW, height: s.h, ml: `${overlap}px`, p: 0, border: "none", bg: "transparent", color: isOutlinePill ? palette.mutedText : color, fontSize: s.font, fontWeight: state === "active" ? 600 : 500, display: "flex", alignItems: "center", justifyContent: isChevron ? "flex-start" : "center", cursor: interactive ? "pointer" : "default", opacity: disabled ? 0.55 : 1, transition: LABEL_TRANSITION, sx: interactive ? focusVisibleStyles(theme.colors) : undefined, _hover: interactive
82
85
  ? {
83
86
  color: state === "active" ? undefined : palette.onStrong,
84
87
  filter: "brightness(0.97)",
85
88
  }
86
- : undefined, children: [_jsx(Box, { position: "absolute", inset: 0, bg: isOutlinePill ? "transparent" : bg, border: isOutlinePill ? "1px solid" : "none", borderColor: isOutlinePill ? palette.muted : undefined, borderRadius: borderRadius, transition: "background 0.18s ease, border-color 0.18s ease", sx: { clipPath }, _groupHover: fillHoverStyles }), _jsxs(Flex, { position: "relative", align: "center", justify: isChevron ? "flex-start" : "center", gap: "6px", width: "100%", minW: 0, pl: `${leftPad}px`, pr: `${rightPad}px`, children: [showCheck && state === "completed" && (_jsx(Check, { size: s.icon, style: { flexShrink: 0 } })), _jsx(Box, { as: "span", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", textAlign: "center", flex: "1", children: label })] })] }));
89
+ : undefined, children: [_jsx(Box, { position: "absolute", inset: 0, bg: isOutlinePill ? "transparent" : bg, border: isOutlinePill ? "1px solid" : "none", borderColor: isOutlinePill ? palette.muted : undefined, borderRadius: borderRadius, transition: CHEVRON_TRANSITION, sx: { clipPath }, _groupHover: fillHoverStyles }), _jsxs(Flex, { position: "relative", align: "center", justify: isChevron ? "flex-start" : "center", gap: "6px", width: "100%", minW: 0, pl: `${leftPad}px`, pr: `${rightPad}px`, children: [showCheck && state === "completed" && (_jsx(Check, { size: s.icon, style: { flexShrink: 0 } })), _jsx(Box, { as: "span", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis", textAlign: "center", flex: "1", children: label })] })] }));
87
90
  if (showTooltip) {
88
91
  return (_jsx(ToolTip, { label: label, placement: "top", openDelay: 300, children: content }));
89
92
  }
@@ -28,12 +28,12 @@ const StepperStage = ({ label, number, state, size = "md", colorScheme = "primar
28
28
  const circleBg = filled ? palette.strong : theme.colors.background[50];
29
29
  const circleColor = filled ? palette.onStrong : palette.mutedText;
30
30
  const circleBorder = filled ? palette.strong : palette.muted;
31
- const line = (done, hidden) => (_jsx(Box, { flex: "1", height: "2px", bg: done ? palette.strong : palette.muted, visibility: hidden ? "hidden" : "visible", transition: "background 0.18s ease" }));
31
+ const line = (done, hidden) => (_jsx(Box, { flex: "1", height: "2px", bg: done ? palette.strong : palette.muted, visibility: hidden ? "hidden" : "visible", transition: transitionFor(["background"], "base") }));
32
32
  const node = (_jsxs(Flex, { ref: ref, direction: "column", align: "center", flex: "1", minWidth: s.minW, flexShrink: 0, as: (interactive ? "button" : "div"), type: interactive ? "button" : undefined, "data-group": "", "aria-disabled": disabled ? true : undefined, border: "none", bg: "transparent", cursor: interactive ? "pointer" : "default", opacity: disabled ? 0.55 : 1, onClick: interactive ? onClick : undefined, borderRadius: "lg", sx: interactive ? focusVisibleStyles(theme.colors) : undefined, children: [_jsxs(Flex, { align: "center", width: "100%", children: [line(leftDone, isFirst), _jsx(Flex, { align: "center", justify: "center", boxSize: s.circle, borderRadius: "full", flexShrink: 0, bg: circleBg, color: circleColor, border: "2px solid", borderColor: circleBorder, fontSize: s.font, fontWeight: 600, transition: transitionFor(["background-color", "border-color", "color", "box-shadow"]), "aria-current": state === "active" ? "step" : undefined, sx: state === "active"
33
33
  ? { boxShadow: `0 0 0 4px ${palette.soft}` }
34
34
  : undefined, _groupHover: interactive
35
35
  ? { borderColor: palette.strong, bg: palette.strong, color: palette.onStrong }
36
- : undefined, children: showCheck && state === "completed" ? _jsx(Check, { size: s.icon }) : number }), line(rightDone, isLast)] }), _jsx(Text, { mt: 2, px: 1, borderRadius: "sm", fontSize: s.label, fontWeight: state === "active" ? 600 : 500, color: state === "upcoming" ? palette.mutedText : palette.softText, textAlign: "center", noOfLines: 2, transition: "background 0.18s ease, color 0.18s ease", _groupHover: interactive ? { bg: palette.strong, color: palette.onStrong } : undefined, children: label })] }));
36
+ : undefined, children: showCheck && state === "completed" ? _jsx(Check, { size: s.icon }) : number }), line(rightDone, isLast)] }), _jsx(Text, { mt: 2, px: 1, borderRadius: "sm", fontSize: s.label, fontWeight: state === "active" ? 600 : 500, color: state === "upcoming" ? palette.mutedText : palette.softText, textAlign: "center", noOfLines: 2, transition: transitionFor(["background", "color"], "base"), _groupHover: interactive ? { bg: palette.strong, color: palette.onStrong } : undefined, children: label })] }));
37
37
  if (!asListItem)
38
38
  return node;
39
39
  return (_jsx(Box, { as: "li", display: "flex", flex: "1", minWidth: s.minW, flexShrink: 0, listStyleType: "none", children: node }));
@@ -3,6 +3,7 @@ import { Box, Flex, Text, VisuallyHidden } from "@chakra-ui/react";
3
3
  import { ArrowDownRight, ArrowUpRight } from "lucide-react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
5
  import { resolveSoftTone, toneScale } from "../../Theme/tokens/builders/tone.js";
6
+ import { cardRule } from "../../Theme/tokens/builders/planeStep.js";
6
7
  import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
7
8
  import { NUMERIC_TEXT } from "../../Theme/tokens/primitives/typography.js";
8
9
  import { reducedMotionSx } from "../../Theme/chakra/motion.js";
@@ -33,7 +34,7 @@ const StatCard = ({ label, value, delta, trend, goodDirection = "up", hint, spar
33
34
  px: 5,
34
35
  py: 4,
35
36
  };
36
- const content = isLoading ? (_jsx(StatCardSkeleton, { hasIcon: !!Icon })) : (_jsxs(Flex, { as: "span", direction: "column", gap: 3, children: [_jsxs(Flex, { as: "span", align: "center", gap: 2, children: [Icon && (_jsx(Flex, { as: "span", boxSize: 8, flexShrink: 0, align: "center", justify: "center", borderRadius: "lg", bg: chip.bg, color: chip.fg, "data-icon-tone": iconTone, children: _jsx(Icon, { size: 16, "aria-hidden": true }) })), _jsx(Text, { as: "span", fontSize: "xs", fontWeight: 500, color: colors.textMuted, children: label })] }), _jsxs(Flex, { as: "span", align: "center", justify: "space-between", gap: 3, children: [_jsx(Text, { as: "span", display: "block", fontSize: "2xl", fontWeight: 700, letterSpacing: "-0.02em", lineHeight: "short", color: colors.header[900], sx: NUMERIC_TEXT, children: value }), sparkline && (_jsx(Flex, { as: "span", align: "center", justify: "center", flexShrink: 0, h: 8, minW: 16, maxW: 24, overflow: "hidden", "data-testid": "stat-sparkline", children: sparkline }))] }), (delta !== undefined || hint) && (_jsxs(Flex, { as: "span", align: "center", gap: 1.5, wrap: "wrap", children: [delta !== undefined && (_jsxs(Flex, { as: "span", align: "center", gap: 0.5, color: deltaColor, "data-testid": "stat-delta", children: [trend && _jsx(DeltaIcon, { size: 14, "aria-hidden": true }), trend && _jsx(VisuallyHidden, { children: trend === "up" ? "Up" : "Down" }), _jsx(Text, { as: "span", fontSize: "xs", fontWeight: 600, sx: NUMERIC_TEXT, children: delta })] })), hint && (_jsx(Text, { as: "span", fontSize: "xs", color: colors.textMuted, children: hint }))] })), footer && (_jsx(Box, { as: "span", pt: 3, borderTopWidth: "1px", borderColor: colors.boxborder[200], "data-testid": "stat-footer", children: footer }))] }));
37
+ const content = isLoading ? (_jsx(StatCardSkeleton, { hasIcon: !!Icon })) : (_jsxs(Flex, { as: "span", direction: "column", gap: 3, children: [_jsxs(Flex, { as: "span", align: "center", gap: 2, children: [Icon && (_jsx(Flex, { as: "span", boxSize: 8, flexShrink: 0, align: "center", justify: "center", borderRadius: "lg", bg: chip.bg, color: chip.fg, "data-icon-tone": iconTone, children: _jsx(Icon, { size: 16, "aria-hidden": true }) })), _jsx(Text, { as: "span", fontSize: "xs", fontWeight: 500, color: colors.textMuted, children: label })] }), _jsxs(Flex, { as: "span", align: "center", justify: "space-between", gap: 3, children: [_jsx(Text, { as: "span", display: "block", fontSize: "2xl", fontWeight: 700, letterSpacing: "-0.02em", lineHeight: "short", color: colors.header[900], sx: NUMERIC_TEXT, children: value }), sparkline && (_jsx(Flex, { as: "span", align: "center", justify: "center", flexShrink: 0, h: 8, minW: 16, maxW: 24, overflow: "hidden", "data-testid": "stat-sparkline", children: sparkline }))] }), (delta !== undefined || hint) && (_jsxs(Flex, { as: "span", align: "center", gap: 1.5, wrap: "wrap", children: [delta !== undefined && (_jsxs(Flex, { as: "span", align: "center", gap: 0.5, color: deltaColor, "data-testid": "stat-delta", children: [trend && _jsx(DeltaIcon, { size: 14, "aria-hidden": true }), trend && _jsx(VisuallyHidden, { children: trend === "up" ? "Up" : "Down" }), _jsx(Text, { as: "span", fontSize: "xs", fontWeight: 600, sx: NUMERIC_TEXT, children: delta })] })), hint && (_jsx(Text, { as: "span", fontSize: "xs", color: colors.textMuted, children: hint }))] })), footer && (_jsx(Box, { as: "span", pt: 3, borderTopWidth: "1px", borderColor: cardRule(colors), "data-testid": "stat-footer", children: footer }))] }));
37
38
  if (!isInteractive) {
38
39
  return (_jsx(Box, { ...rest, ...surface, "aria-busy": isLoading || undefined, "data-testid": testId, children: content }));
39
40
  }
@@ -7,13 +7,14 @@ import LeftFilterPane from "./filters/LeftFilterPane.js";
7
7
  import { TABLE_VARIANTS } from "./variants/index.js";
8
8
  import { TableVariantProvider } from "./variants/TableVariantContext.js";
9
9
  import { isDarkCanvas } from "../../Theme/tokens/builders/accentText.js";
10
+ import { cardRule } from "../../Theme/tokens/builders/planeStep.js";
10
11
  import { labelOnFill, solidFillRung, resolveFilledSurface } from "../../Theme/tokens/builders/filledSurface.js";
11
12
  import Pagination from "./components/Pagination.js";
12
13
  import TableHeader from "./components/TableHeader.js";
13
14
  import TableBody from "./components/TableBody.js";
14
15
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
15
- import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
16
- import { reducedMotionSx } from "../../Theme/chakra/motion.js";
16
+ import { MOTION_MS, transitionFor } from "../../Theme/tokens/primitives/motion.js";
17
+ import { reducedMotionSx, usePrefersReducedMotion } from "../../Theme/chakra/motion.js";
17
18
  import { focusVisibleStyles } from "../../Theme/chakra/focusRing.styles.js";
18
19
  import { DENSITY_ROWS, EMPTY_STATE_HEIGHT, GROUP_HEADER_HEIGHT, MAX_TABLE_HEIGHT, TOOLBAR_HEIGHT, pxOf, rowHeightFor } from "./components/rowMetrics.js";
19
20
  import { scrollbarStyles, SCROLLBAR_WIDTH } from "../../Theme/tokens/builders/scrollbar.js";
@@ -32,6 +33,8 @@ import Button from "../Button/Button.js";
32
33
  import ToolTip from "../ToolTip/ToolTip.js";
33
34
  import { Filter, EllipsisVertical, X, RefreshCw } from "lucide-react";
34
35
  const MotionBox = motion(Box);
36
+ // NOTE: MOTION_EASE as framer bezier points; the motion tokens have no points form yet.
37
+ const PANE_EASE = [0.2, 0, 0, 1];
35
38
  /** Data table: virtualized-height rows, pagination, filters, selection, and an optional Monday-style grouped board. */
36
39
  export default function Table({ data, columns, onSelection, isLoading, isCheckbox = false, freezedBgColor, freezedTextColor, noBorders = false, isPagination = true, onRowClick, selections, isActionFreeze = true, preferences = {
37
40
  url: "",
@@ -43,6 +46,7 @@ export default function Table({ data, columns, onSelection, isLoading, isCheckbo
43
46
  }, paginationMode = "client", infiniteScroll = false, hasMore, isLoadingMore = false, groupLoadMore = false, loadMoreText = "Load more", loadMorePosition = "top", loadMoreChunkSize, noOfRowsPerPage = 50, totalRecords = 0, onPagination, isTableSettings = false, headerActions, onGlobalSearch, onNoOfRowsPerPageChange, paginationSelectOptions, tableMaxHeight, minVisibleRows, maxVisibleRows, autoFitViewport, tableSettings, filterSidebar, loadingSkeletonRows, defaultVisibleColumns, density = "normal", variant = "classic", stripe = false, renderRowDetail, expandedRows, onExpandedRowsChange, groupColors, onAddItem, emptyState, onRefresh, isGlobalSearch = true, }) {
44
47
  var _a, _b, _c, _d, _e;
45
48
  const theme = useCustomTheme();
49
+ const prefersReducedMotion = usePrefersReducedMotion();
46
50
  const clearFiltersTone = useMemo(() => resolveFilledSurface(theme.colors.semantic.error, theme.colors), [theme.colors]);
47
51
  const variantTokens = useMemo(() => TABLE_VARIANTS[variant](theme.colors, isDarkCanvas(theme.colors.backgroundColor.main)), [variant, theme.colors]);
48
52
  const [columnsSearch, setColumnsSearch] = useState({});
@@ -382,7 +386,7 @@ export default function Table({ data, columns, onSelection, isLoading, isCheckbo
382
386
  from { transform: rotate(0deg); }
383
387
  to { transform: rotate(360deg); }
384
388
  }
385
- ` }), _jsxs(Box, { bg: theme.colors.background[50], border: `0.063rem solid ${theme.colors.boxborder[200]}`, borderRadius: "xl", overflow: "hidden", children: [filterSidebar && filterMode === "modal" && (_jsxs(Modal, { isOpen: isFilterModalOpen, onClose: onFilterModalClose, size: "4xl", scrollBehavior: "inside", children: [_jsx(ModalOverlay, {}), _jsxs(ModalContent, { bg: theme.colors.surfaceRaised, my: 0, top: "10%", position: "fixed", left: "auto", right: "auto", children: [_jsx(ModalCloseButton, { size: "sm" }), _jsx(ModalBody, { p: 0, children: _jsx(LeftFilterPane, { theme: theme, sections: (_d = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.sidebarOptions) !== null && _d !== void 0 ? _d : [], selected: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.selected, onApply: (sel) => { var _a; (_a = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onApply) === null || _a === void 0 ? void 0 : _a.call(filterSidebar, sel); onFilterModalClose(); }, onClear: () => { var _a; (_a = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onClearAllHandler) === null || _a === void 0 ? void 0 : _a.call(filterSidebar); }, isApplyLoading: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isApplyLoading, filterMode: filterMode }) })] })] })), _jsxs(Flex, { align: "start", children: [filterMode === "sidebar" && (_jsx(MotionBox, { "data-testid": "filter-sidebar-pane", initial: { width: 0 }, animate: { width: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? 180 : 0 }, transition: { type: "tween", duration: 0.5 }, overflow: "hidden", flexShrink: 0, borderRight: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? "1px solid" : "none", borderColor: theme.colors.boxborder[200], style: { height: TOOLBAR_HEIGHT + formulaMaxH }, minHeight: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? "32rem" : "auto", children: _jsx(LeftFilterPane, { height: TOOLBAR_HEIGHT + formulaMaxH, theme: theme, sections: (_e = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.sidebarOptions) !== null && _e !== void 0 ? _e : [], selected: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.selected, onApply: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onApply, onClear: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onClearAllHandler, isApplyLoading: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isApplyLoading, filterMode: filterMode }) })), _jsxs(Box, { flex: "1", minW: 0, children: [_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "space-between", px: 3, py: 0, height: `${TOOLBAR_HEIGHT}px`, gap: 3, flexWrap: "nowrap", bg: theme.colors.background[50], borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [[
389
+ ` }), _jsxs(Box, { bg: theme.colors.background[50], border: `0.063rem solid ${theme.colors.boxborder[200]}`, borderRadius: "xl", overflow: "hidden", children: [filterSidebar && filterMode === "modal" && (_jsxs(Modal, { isOpen: isFilterModalOpen, onClose: onFilterModalClose, size: "4xl", scrollBehavior: "inside", children: [_jsx(ModalOverlay, {}), _jsxs(ModalContent, { bg: theme.colors.surfaceRaised, my: 0, top: "10%", position: "fixed", left: "auto", right: "auto", children: [_jsx(ModalCloseButton, { size: "sm" }), _jsx(ModalBody, { p: 0, children: _jsx(LeftFilterPane, { theme: theme, sections: (_d = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.sidebarOptions) !== null && _d !== void 0 ? _d : [], selected: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.selected, onApply: (sel) => { var _a; (_a = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onApply) === null || _a === void 0 ? void 0 : _a.call(filterSidebar, sel); onFilterModalClose(); }, onClear: () => { var _a; (_a = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onClearAllHandler) === null || _a === void 0 ? void 0 : _a.call(filterSidebar); }, isApplyLoading: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isApplyLoading, filterMode: filterMode }) })] })] })), _jsxs(Flex, { align: "start", children: [filterMode === "sidebar" && (_jsx(MotionBox, { "data-testid": "filter-sidebar-pane", initial: false, animate: { width: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? 180 : 0 }, transition: { type: "tween", ease: PANE_EASE, duration: prefersReducedMotion ? 0 : MOTION_MS.base / 1000 }, overflow: "hidden", flexShrink: 0, borderRight: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? "1px solid" : "none", borderColor: cardRule(theme.colors), style: { height: TOOLBAR_HEIGHT + formulaMaxH }, minHeight: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? "32rem" : "auto", children: _jsx(LeftFilterPane, { height: TOOLBAR_HEIGHT + formulaMaxH, theme: theme, sections: (_e = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.sidebarOptions) !== null && _e !== void 0 ? _e : [], selected: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.selected, onApply: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onApply, onClear: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onClearAllHandler, isApplyLoading: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isApplyLoading, filterMode: filterMode }) })), _jsxs(Box, { flex: "1", minW: 0, children: [_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "space-between", px: 3, py: 0, height: `${TOOLBAR_HEIGHT}px`, gap: 3, flexWrap: "nowrap", bg: theme.colors.background[50], borderBottom: `0.063rem solid ${cardRule(theme.colors)}`, children: [[
386
390
  filterSidebar && (_jsx(ToolTip, { label: "Filter", placement: "top", children: _jsxs(Box, { position: "relative", display: "inline-block", children: [_jsx(Box, { as: "button", type: "button", "aria-label": "Filter", "aria-haspopup": filterMode === "modal" ? "dialog" : undefined, "aria-expanded": filterMode === "modal"
387
391
  ? isFilterModalOpen
388
392
  : !!(filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar), display: "inline-flex", alignItems: "center", justifyContent: "center", p: 0, bg: "transparent", border: "none", borderRadius: "md", cursor: "pointer", onClick: filterMode === "modal" ? onFilterModalOpen : filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.filterSidebarToggle, _hover: {
@@ -446,5 +450,5 @@ export default function Table({ data, columns, onSelection, isLoading, isCheckbo
446
450
  backgroundColor: "transparent",
447
451
  zIndex: 999,
448
452
  },
449
- }, children: [_jsx(Thead, { position: "sticky", top: 0, zIndex: 4, bg: variantTokens.header.bg, children: _jsx(TableHeader, { columns: columnsList, isCheckbox: isCheckbox, freezedTextColor: freezedTextColor !== null && freezedTextColor !== void 0 ? freezedTextColor : theme.colors.text[500], handleSort: handleSort, headerRefs: headerRefs, columnWidths: columnWidths, slotRef: slotRef, slotWidth: slotWidth, columnsSort: columnsSort, noBorders: noBorders, handleCheckbox: handleCheckbox, isLoading: isTableLoading, checked: headerChecked, isContent: isContent, isLink: isLink, hasDetail: !!rowDetail, isActionFreeze: isActionFreeze, setColumnsSearch: setColumnsSearch, columnsSearch: columnsSearch, isSelecting: isSelecting }) }), _jsx(Tbody, { children: _jsx(TableBody, { data: isGrouped ? groupedSource : _filteredData, groups: renderGroups, onAddItem: onAddItem, columns: columnsList, startRow: isGrouped ? 0 : startRow, rowsPerPage: rowsPerPage, scrollContainerRef: tableContainerRef, isCheckbox: isCheckbox, columnWidths: columnWidths, slotWidth: slotWidth, noBorders: noBorders, freezedBgColor: freezedBgColor !== null && freezedBgColor !== void 0 ? freezedBgColor : theme.colors.backgroundColor.secondary, freezedTextColor: freezedTextColor !== null && freezedTextColor !== void 0 ? freezedTextColor : theme.colors.text[500], handleCheckbox: handleCheckbox, selections: selection, isLoading: isTableLoading, loadingSkeletonRows: loadingSkeletonRows, onRowClick: onRowClick, isContent: isContent, isLink: isLink, rowDetail: rowDetail, expandedIds: expandedIds, isActionFreeze: isActionFreeze, density: densityState, stripe: stripe, emptyState: emptyState }) })] }), canInfinite && isLoadingMore && (_jsxs(Flex, { justify: "center", align: "center", py: 3, gap: 2, children: [_jsx(Spinner, { size: "sm", color: theme.colors.accentText }), _jsx(Box, { fontSize: "0.75rem", color: theme.colors.text[500], children: "Loading more\u2026" })] }))] }), groupLoadMoreActive && loadMorePosition === "bottom" && (groupLoadMoreCaption || canGroupLoadMore) && (_jsxs(Flex, { justify: "center", align: "center", gap: 3, py: 3, borderTop: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [groupLoadMoreCaption && (_jsx(Box, { fontSize: "0.75rem", color: theme.colors.text[500], children: groupLoadMoreCaption })), canGroupLoadMore && (_jsx(Button, { size: "xs", variant: "outline", colorScheme: "gray", isLoading: isLoadingMore, loadingText: loadMoreText, onClick: handleGroupLoadMore, label: loadMoreText }))] }))] })] })] })] }));
453
+ }, children: [_jsx(Thead, { position: "sticky", top: 0, zIndex: 4, bg: variantTokens.header.bg, children: _jsx(TableHeader, { columns: columnsList, isCheckbox: isCheckbox, freezedTextColor: freezedTextColor !== null && freezedTextColor !== void 0 ? freezedTextColor : theme.colors.text[500], handleSort: handleSort, headerRefs: headerRefs, columnWidths: columnWidths, slotRef: slotRef, slotWidth: slotWidth, columnsSort: columnsSort, noBorders: noBorders, handleCheckbox: handleCheckbox, isLoading: isTableLoading, checked: headerChecked, isContent: isContent, isLink: isLink, hasDetail: !!rowDetail, isActionFreeze: isActionFreeze, setColumnsSearch: setColumnsSearch, columnsSearch: columnsSearch, isSelecting: isSelecting }) }), _jsx(Tbody, { children: _jsx(TableBody, { data: isGrouped ? groupedSource : _filteredData, groups: renderGroups, onAddItem: onAddItem, columns: columnsList, startRow: isGrouped ? 0 : startRow, rowsPerPage: rowsPerPage, scrollContainerRef: tableContainerRef, isCheckbox: isCheckbox, columnWidths: columnWidths, slotWidth: slotWidth, noBorders: noBorders, freezedBgColor: freezedBgColor !== null && freezedBgColor !== void 0 ? freezedBgColor : theme.colors.backgroundColor.secondary, freezedTextColor: freezedTextColor !== null && freezedTextColor !== void 0 ? freezedTextColor : theme.colors.text[500], handleCheckbox: handleCheckbox, selections: selection, isLoading: isTableLoading, loadingSkeletonRows: loadingSkeletonRows, onRowClick: onRowClick, isContent: isContent, isLink: isLink, rowDetail: rowDetail, expandedIds: expandedIds, isActionFreeze: isActionFreeze, density: densityState, stripe: stripe, emptyState: emptyState }) })] }), canInfinite && isLoadingMore && (_jsxs(Flex, { justify: "center", align: "center", py: 3, gap: 2, children: [_jsx(Spinner, { size: "sm", color: theme.colors.accentText }), _jsx(Box, { fontSize: "0.75rem", color: theme.colors.text[500], children: "Loading more\u2026" })] }))] }), groupLoadMoreActive && loadMorePosition === "bottom" && (groupLoadMoreCaption || canGroupLoadMore) && (_jsxs(Flex, { justify: "center", align: "center", gap: 3, py: 3, borderTop: `0.063rem solid ${cardRule(theme.colors)}`, children: [groupLoadMoreCaption && (_jsx(Box, { fontSize: "0.75rem", color: theme.colors.text[500], children: groupLoadMoreCaption })), canGroupLoadMore && (_jsx(Button, { size: "xs", variant: "outline", colorScheme: "gray", isLoading: isLoadingMore, loadingText: loadMoreText, onClick: handleGroupLoadMore, label: loadMoreText }))] }))] })] })] })] }));
450
454
  }