pixelize-design-library 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -1
- package/COMPONENT-GOTCHAS.md +37 -13
- package/DESIGN-GUIDE.md +4 -1
- package/dist/Components/NotificationBell/NotificationBellProps.d.ts +3 -3
- package/dist/Components/NotificationBell/NotificationItem.d.ts +1 -1
- package/dist/Components/NotificationBell/NotificationItem.js +1 -1
- package/dist/Components/NotificationBell/NotificationList.d.ts +1 -1
- package/dist/Components/NotificationBell/NotificationList.js +1 -1
- package/dist/Components/NotificationBell/NotificationPanel.d.ts +1 -1
- package/dist/Components/NotificationBell/NotificationPanel.js +1 -1
- package/dist/Components/NotificationCenter/center/CenterPanel.d.ts +15 -0
- package/dist/Components/NotificationCenter/center/CenterPanel.js +87 -0
- package/dist/Components/NotificationCenter/center/NotificationCenter.d.ts +4 -0
- package/dist/Components/NotificationCenter/center/NotificationCenter.js +130 -0
- package/dist/Components/NotificationCenter/center/NotificationCenterProps.d.ts +71 -0
- package/dist/Components/NotificationCenter/center/NotificationCenterProps.js +2 -0
- package/dist/Components/NotificationCenter/center/PanelRows.d.ts +10 -0
- package/dist/Components/NotificationCenter/center/PanelRows.js +35 -0
- package/dist/Components/NotificationCenter/center/PanelStates.d.ts +17 -0
- package/dist/Components/NotificationCenter/center/PanelStates.js +21 -0
- package/dist/Components/NotificationCenter/center/centerLabels.d.ts +4 -0
- package/dist/Components/NotificationCenter/center/centerLabels.js +38 -0
- package/dist/Components/NotificationCenter/center/useArrivals.d.ts +14 -0
- package/dist/Components/NotificationCenter/center/useArrivals.js +71 -0
- package/dist/Components/NotificationCenter/center/useIsSheet.d.ts +2 -0
- package/dist/Components/NotificationCenter/center/useIsSheet.js +20 -0
- package/dist/Components/NotificationCenter/core/NotificationCenterProvider.d.ts +17 -0
- package/dist/Components/NotificationCenter/core/NotificationCenterProvider.js +46 -0
- package/dist/Components/NotificationCenter/core/NotificationEngineProps.d.ts +182 -0
- package/dist/Components/NotificationCenter/core/NotificationEngineProps.js +2 -0
- package/dist/Components/NotificationCenter/core/NotificationSourceProps.d.ts +284 -0
- package/dist/Components/NotificationCenter/core/NotificationSourceProps.js +2 -0
- package/dist/Components/NotificationCenter/core/actionError.d.ts +4 -0
- package/dist/Components/NotificationCenter/core/actionError.js +45 -0
- package/dist/Components/NotificationCenter/core/format.d.ts +4 -0
- package/dist/Components/NotificationCenter/core/format.js +91 -0
- package/dist/Components/NotificationCenter/core/grouping.d.ts +14 -0
- package/dist/Components/NotificationCenter/core/grouping.js +102 -0
- package/dist/Components/NotificationCenter/core/labels.d.ts +6 -0
- package/dist/Components/NotificationCenter/core/labels.js +94 -0
- package/dist/Components/NotificationCenter/core/overlay.d.ts +109 -0
- package/dist/Components/NotificationCenter/core/overlay.js +281 -0
- package/dist/Components/NotificationCenter/core/useNotificationEngine.d.ts +13 -0
- package/dist/Components/NotificationCenter/core/useNotificationEngine.js +415 -0
- package/dist/Components/NotificationCenter/inbox/InboxList.d.ts +17 -0
- package/dist/Components/NotificationCenter/inbox/InboxList.js +25 -0
- package/dist/Components/NotificationCenter/inbox/InboxStates.d.ts +17 -0
- package/dist/Components/NotificationCenter/inbox/InboxStates.js +27 -0
- package/dist/Components/NotificationCenter/inbox/NotificationInbox.d.ts +4 -0
- package/dist/Components/NotificationCenter/inbox/NotificationInbox.js +434 -0
- package/dist/Components/NotificationCenter/inbox/NotificationInboxProps.d.ts +106 -0
- package/dist/Components/NotificationCenter/inbox/NotificationInboxProps.js +2 -0
- package/dist/Components/NotificationCenter/inbox/ShortcutsDialog.d.ts +8 -0
- package/dist/Components/NotificationCenter/inbox/ShortcutsDialog.js +63 -0
- package/dist/Components/NotificationCenter/inbox/inboxLabels.d.ts +4 -0
- package/dist/Components/NotificationCenter/inbox/inboxLabels.js +56 -0
- package/dist/Components/NotificationCenter/inbox/inboxModel.d.ts +17 -0
- package/dist/Components/NotificationCenter/inbox/inboxModel.js +47 -0
- package/dist/Components/NotificationCenter/inbox/useControllable.d.ts +1 -0
- package/dist/Components/NotificationCenter/inbox/useControllable.js +15 -0
- package/dist/Components/NotificationCenter/index.d.ts +8 -0
- package/dist/Components/NotificationCenter/index.js +26 -0
- package/dist/Components/NotificationCenter/preferences/NotificationPreferences.d.ts +4 -0
- package/dist/Components/NotificationCenter/preferences/NotificationPreferences.js +72 -0
- package/dist/Components/NotificationCenter/preferences/NotificationPreferencesProps.d.ts +111 -0
- package/dist/Components/NotificationCenter/preferences/NotificationPreferencesProps.js +2 -0
- package/dist/Components/NotificationCenter/preferences/PreferenceCells.d.ts +16 -0
- package/dist/Components/NotificationCenter/preferences/PreferenceCells.js +35 -0
- package/dist/Components/NotificationCenter/preferences/PreferenceGroups.d.ts +15 -0
- package/dist/Components/NotificationCenter/preferences/PreferenceGroups.js +26 -0
- package/dist/Components/NotificationCenter/preferences/preferencesLabels.d.ts +2 -0
- package/dist/Components/NotificationCenter/preferences/preferencesLabels.js +28 -0
- package/dist/Components/NotificationCenter/preferences/useAutosave.d.ts +8 -0
- package/dist/Components/NotificationCenter/preferences/useAutosave.js +41 -0
- package/dist/Components/NotificationCenter/row/NotificationDetail.d.ts +4 -0
- package/dist/Components/NotificationCenter/row/NotificationDetail.js +65 -0
- package/dist/Components/NotificationCenter/row/NotificationDetailProps.d.ts +15 -0
- package/dist/Components/NotificationCenter/row/NotificationDetailProps.js +2 -0
- package/dist/Components/NotificationCenter/row/NotificationRow.d.ts +3 -0
- package/dist/Components/NotificationCenter/row/NotificationRow.js +124 -0
- package/dist/Components/NotificationCenter/row/NotificationRowProps.d.ts +33 -0
- package/dist/Components/NotificationCenter/row/NotificationRowProps.js +2 -0
- package/dist/Components/NotificationCenter/row/ReasonForm.d.ts +14 -0
- package/dist/Components/NotificationCenter/row/ReasonForm.js +59 -0
- package/dist/Components/NotificationCenter/row/RowActions.d.ts +16 -0
- package/dist/Components/NotificationCenter/row/RowActions.js +36 -0
- package/dist/Components/NotificationCenter/row/RowQuickActions.d.ts +17 -0
- package/dist/Components/NotificationCenter/row/RowQuickActions.js +57 -0
- package/dist/Components/NotificationCenter/row/RowStatus.d.ts +10 -0
- package/dist/Components/NotificationCenter/row/RowStatus.js +42 -0
- package/dist/Components/NotificationCenter/row/category.d.ts +8 -0
- package/dist/Components/NotificationCenter/row/category.js +13 -0
- package/dist/Components/NotificationCenter/row/rowMenu.d.ts +14 -0
- package/dist/Components/NotificationCenter/row/rowMenu.js +37 -0
- package/dist/Components/NotificationCenter/row/rowParts.d.ts +40 -0
- package/dist/Components/NotificationCenter/row/rowParts.js +72 -0
- package/dist/Components/NotificationCenter/row/rowStyles.d.ts +11 -0
- package/dist/Components/NotificationCenter/row/rowStyles.js +25 -0
- package/dist/Components/SegmentedControl/segmentedInk.d.ts +4 -0
- package/dist/Components/SegmentedControl/segmentedInk.js +16 -2
- package/dist/Components/SideBar/SecondaryBar.js +2 -2
- package/dist/Components/SideBar/SideBar.js +18 -8
- package/dist/Components/SideBar/SideBarProps.d.ts +4 -2
- package/dist/Components/SideBar/components/MenuItemBox.d.ts +0 -2
- package/dist/Components/SideBar/components/MenuItemBox.js +2 -3
- package/dist/Components/SideBar/components/MenuItems.js +2 -2
- package/dist/Components/SideBar/components/PinnedSection.js +3 -4
- package/dist/Components/SideBar/sidebarScale.d.ts +0 -2
- package/dist/Components/SideBar/sidebarScale.js +0 -2
- package/dist/Components/Switch/Switch.d.ts +1 -1
- package/dist/Components/Switch/Switch.js +2 -2
- package/dist/Components/Switch/SwitchProps.d.ts +3 -0
- package/dist/Components/Toggle/TableToggle.js +4 -5
- package/dist/Components/Toggle/tableToggleInk.d.ts +7 -0
- package/dist/Components/Toggle/tableToggleInk.js +28 -0
- package/dist/esm/Components/NotificationBell/NotificationItem.js +1 -1
- package/dist/esm/Components/NotificationBell/NotificationList.js +1 -1
- package/dist/esm/Components/NotificationBell/NotificationPanel.js +1 -1
- package/dist/esm/Components/NotificationCenter/center/CenterPanel.js +81 -0
- package/dist/esm/Components/NotificationCenter/center/NotificationCenter.js +92 -0
- package/dist/esm/Components/NotificationCenter/center/NotificationCenterProps.js +1 -0
- package/dist/esm/Components/NotificationCenter/center/PanelRows.js +28 -0
- package/dist/esm/Components/NotificationCenter/center/PanelStates.js +11 -0
- package/dist/esm/Components/NotificationCenter/center/centerLabels.js +34 -0
- package/dist/esm/Components/NotificationCenter/center/useArrivals.js +67 -0
- package/dist/esm/Components/NotificationCenter/center/useIsSheet.js +16 -0
- package/dist/esm/Components/NotificationCenter/core/NotificationCenterProvider.js +35 -0
- package/dist/esm/Components/NotificationCenter/core/NotificationEngineProps.js +1 -0
- package/dist/esm/Components/NotificationCenter/core/NotificationSourceProps.js +1 -0
- package/dist/esm/Components/NotificationCenter/core/actionError.js +39 -0
- package/dist/esm/Components/NotificationCenter/core/format.js +87 -0
- package/dist/esm/Components/NotificationCenter/core/grouping.js +88 -0
- package/dist/esm/Components/NotificationCenter/core/labels.js +88 -0
- package/dist/esm/Components/NotificationCenter/core/overlay.js +274 -0
- package/dist/esm/Components/NotificationCenter/core/useNotificationEngine.js +408 -0
- package/dist/esm/Components/NotificationCenter/inbox/InboxList.js +18 -0
- package/dist/esm/Components/NotificationCenter/inbox/InboxStates.js +18 -0
- package/dist/esm/Components/NotificationCenter/inbox/NotificationInbox.js +396 -0
- package/dist/esm/Components/NotificationCenter/inbox/NotificationInboxProps.js +1 -0
- package/dist/esm/Components/NotificationCenter/inbox/ShortcutsDialog.js +23 -0
- package/dist/esm/Components/NotificationCenter/inbox/inboxLabels.js +52 -0
- package/dist/esm/Components/NotificationCenter/inbox/inboxModel.js +37 -0
- package/dist/esm/Components/NotificationCenter/inbox/useControllable.js +11 -0
- package/dist/esm/Components/NotificationCenter/index.js +8 -0
- package/dist/esm/Components/NotificationCenter/preferences/NotificationPreferences.js +67 -0
- package/dist/esm/Components/NotificationCenter/preferences/NotificationPreferencesProps.js +1 -0
- package/dist/esm/Components/NotificationCenter/preferences/PreferenceCells.js +27 -0
- package/dist/esm/Components/NotificationCenter/preferences/PreferenceGroups.js +21 -0
- package/dist/esm/Components/NotificationCenter/preferences/preferencesLabels.js +24 -0
- package/dist/esm/Components/NotificationCenter/preferences/useAutosave.js +37 -0
- package/dist/esm/Components/NotificationCenter/row/NotificationDetail.js +60 -0
- package/dist/esm/Components/NotificationCenter/row/NotificationDetailProps.js +1 -0
- package/dist/esm/Components/NotificationCenter/row/NotificationRow.js +119 -0
- package/dist/esm/Components/NotificationCenter/row/NotificationRowProps.js +1 -0
- package/dist/esm/Components/NotificationCenter/row/ReasonForm.js +52 -0
- package/dist/esm/Components/NotificationCenter/row/RowActions.js +28 -0
- package/dist/esm/Components/NotificationCenter/row/RowQuickActions.js +49 -0
- package/dist/esm/Components/NotificationCenter/row/RowStatus.js +35 -0
- package/dist/esm/Components/NotificationCenter/row/category.js +9 -0
- package/dist/esm/Components/NotificationCenter/row/rowMenu.js +30 -0
- package/dist/esm/Components/NotificationCenter/row/rowParts.js +59 -0
- package/dist/esm/Components/NotificationCenter/row/rowStyles.js +19 -0
- package/dist/esm/Components/SegmentedControl/segmentedInk.js +15 -2
- package/dist/esm/Components/SideBar/SecondaryBar.js +3 -3
- package/dist/esm/Components/SideBar/SideBar.js +18 -8
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +2 -3
- package/dist/esm/Components/SideBar/components/MenuItems.js +2 -2
- package/dist/esm/Components/SideBar/components/PinnedSection.js +3 -4
- package/dist/esm/Components/SideBar/sidebarScale.js +0 -2
- package/dist/esm/Components/Switch/Switch.js +2 -2
- package/dist/esm/Components/Toggle/TableToggle.js +4 -5
- package/dist/esm/Components/Toggle/tableToggleInk.js +24 -0
- package/dist/esm/index.js +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +16 -3
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BUTTON_SIZES } from "../../../Theme/tokens/primitives/controlSizes.js";
|
|
2
|
+
export const ROW_BUTTON_SIZE = {
|
|
3
|
+
panel: "xs",
|
|
4
|
+
inbox: "sm",
|
|
5
|
+
phone: "md",
|
|
6
|
+
};
|
|
7
|
+
export const iconSizeFor = (size) => BUTTON_SIZES[size].iconSize;
|
|
8
|
+
export const WAITING_AFTER_DAYS = 3;
|
|
9
|
+
export const TOUCH_TARGET_SX = {
|
|
10
|
+
"&::before": { content: '""', position: "absolute", inset: "-0.125rem" },
|
|
11
|
+
};
|
|
12
|
+
export const CHECKBOX_TOUCH_TARGET_SX = {
|
|
13
|
+
"@media (pointer: coarse)": {
|
|
14
|
+
"& label": { position: "relative" },
|
|
15
|
+
"& label::before": { content: '""', position: "absolute", inset: "-0.875rem" },
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export const touchTargetFor = (size) => size === "md" ? TOUCH_TARGET_SX : undefined;
|
|
19
|
+
export const testIdFor = (entry, suffix) => entry.testId ? `${entry.testId}-${suffix}` : undefined;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { AA_NON_TEXT, liftToContrast } from "../../Theme/tokens/builders/outlineRung.js";
|
|
2
|
-
import { AA_NORMAL_TEXT } from "../../Theme/tokens/builders/accentText.js";
|
|
2
|
+
import { AA_NORMAL_TEXT, isDarkCanvas } from "../../Theme/tokens/builders/accentText.js";
|
|
3
|
+
import { relativeLuminance } from "../../Theme/tokens/builders/color.js";
|
|
4
|
+
const TRACK_STEPS = [600, 500, 400, 300, 200, 100];
|
|
5
|
+
// NOTE: light tracks never outweigh the outline; Zinc's full ramp makes [600] mid-grey.
|
|
6
|
+
export const segmentedTrackStep = (colors) => {
|
|
7
|
+
if (isDarkCanvas(colors.backgroundColor.main))
|
|
8
|
+
return 600;
|
|
9
|
+
const outline = relativeLuminance(colors.boxborder[500]);
|
|
10
|
+
for (const step of TRACK_STEPS) {
|
|
11
|
+
if (relativeLuminance(colors.background[step]) >= outline)
|
|
12
|
+
return step;
|
|
13
|
+
}
|
|
14
|
+
return 50;
|
|
15
|
+
};
|
|
3
16
|
/** The surface a segment's label really sits on. */
|
|
4
17
|
export const segmentedTrackSurface = (variant, colors, surface) => {
|
|
5
18
|
if (variant === "underlineSlide")
|
|
@@ -8,7 +21,7 @@ export const segmentedTrackSurface = (variant, colors, surface) => {
|
|
|
8
21
|
// parent, so its ink was derived from a canvas the control was not actually on.
|
|
9
22
|
if (variant === "brandSlide")
|
|
10
23
|
return colors.surfaceRaised;
|
|
11
|
-
return colors.background[
|
|
24
|
+
return colors.background[segmentedTrackStep(colors)];
|
|
12
25
|
};
|
|
13
26
|
/** The surface the selected label sits on: the default variant lifts it onto its own plate. */
|
|
14
27
|
export const segmentedSelectedSurface = (variant, colors, trackSurface) => (variant === "default" ? colors.backgroundColor.light : trackSurface);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId, useState } from "react";
|
|
3
3
|
import { Box, Flex, Icon, VStack, Badge, Popover, PopoverTrigger, PopoverContent, PopoverBody, Portal, } from "@chakra-ui/react";
|
|
4
4
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
@@ -68,13 +68,13 @@ const ExpandedItem = ({ item, isActive, itemFontSize, onItemClick }) => {
|
|
|
68
68
|
return item.locked && item.lockedReason ? (_jsx(ToolTip, { label: item.lockedReason, placement: "top", children: row })) : (row);
|
|
69
69
|
};
|
|
70
70
|
/** Secondary flyout panel beside the main rail, listing the active menu's `secondaryItems`; collapses to icons. */
|
|
71
|
-
const SecondaryBar = ({ items = [], defaultCollapsed = true, collapsedWidth = "3.5rem", expandedWidth = "10rem", headerFontSize = SIDEBAR_ROW.fontSize, itemFontSize = SIDEBAR_ROW.fontSize, selected, onItemClick, title, icon, }) => {
|
|
71
|
+
const SecondaryBar = ({ items = [], defaultCollapsed = true, collapsedWidth = "3.5rem", expandedWidth = "10rem", shrinkable = false, headerFontSize = SIDEBAR_ROW.fontSize, itemFontSize = SIDEBAR_ROW.fontSize, selected, onItemClick, title, icon, }) => {
|
|
72
72
|
const theme = useCustomTheme();
|
|
73
73
|
const activeAccent = getSidebarActiveAccent(theme.colors);
|
|
74
74
|
const scrollContainerId = sanitizeId(useId());
|
|
75
75
|
const [collapsed, setCollapsed] = useState(defaultCollapsed);
|
|
76
76
|
const width = collapsed ? collapsedWidth : expandedWidth;
|
|
77
|
-
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(
|
|
77
|
+
return (_jsx(Box, { as: "nav", "aria-label": title ? `${title} navigation` : "Secondary navigation", transition: transitionFor(["width"], "base"), pos: "sticky", top: 0, sx: fullViewportHeight, w: width, minW: shrinkable ? collapsedWidth : undefined, 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(Flex, { align: "center", gap: "7px", flex: "1", minW: 0, overflow: "hidden", 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) => {
|
|
78
78
|
var _a;
|
|
79
79
|
const isActive = String(selected) === String(item.id) ||
|
|
80
80
|
String(selected) === String(item.title);
|
|
@@ -33,6 +33,13 @@ const inlineTransitions = (collapse) => {
|
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
35
|
const OVERLAY_WIDTH = "14.7rem";
|
|
36
|
+
const OVERLAY_MAX_WIDTH = "88vw";
|
|
37
|
+
const PANEL_BORDER = "1px";
|
|
38
|
+
const SECONDARY_STRIP_WIDTH = "3.5rem";
|
|
39
|
+
const SECONDARY_OPEN_WIDTH = "10rem";
|
|
40
|
+
const PRIMARY_MAX_WITH_SECONDARY = `calc(${OVERLAY_MAX_WIDTH} - ${PANEL_BORDER} - ${SECONDARY_STRIP_WIDTH})`;
|
|
41
|
+
// NOTE: below this the primary (12.5rem) and secondary (8rem) label floors overflow 88vw.
|
|
42
|
+
const NARROW_DRAWER_QUERY = "(max-width: 23.3em)";
|
|
36
43
|
const SCRIM_TRANSITION = transitionFor(["opacity", "visibility"], "base");
|
|
37
44
|
const OVERLAY_SLIDE = transitionFor(["transform"], "enter", "out");
|
|
38
45
|
const OVERLAY_WIDTH_TRANSITION = transitionFor(["width"], "enter", "out");
|
|
@@ -46,6 +53,7 @@ import PinnedSection from "./components/PinnedSection.js";
|
|
|
46
53
|
import { SIDEBAR_CHROME, SIDEBAR_ROW } from "./sidebarScale.js";
|
|
47
54
|
import { fullViewportHeight } from "../../Theme/tokens/builders/viewportHeight.js";
|
|
48
55
|
import { suspendResizeWithin } from "../../Hooks/sharedResizeObserver.js";
|
|
56
|
+
import { useMatchMedia } from "../../Hooks/useMatchMedia.js";
|
|
49
57
|
const SidebarHeader = ({ logo, companyName, companySubtitle, toggle, isLoading, onToggle, overlay, onClose, }) => {
|
|
50
58
|
const theme = useCustomTheme();
|
|
51
59
|
const activeAccent = getSidebarActiveAccent(theme.colors);
|
|
@@ -76,10 +84,10 @@ const SkeletonMenuRow = ({ toggle }) => {
|
|
|
76
84
|
const theme = useCustomTheme();
|
|
77
85
|
return (_jsx(Box, { w: "100%", px: toggle ? 1 : 2, py: 2, children: toggle ? (_jsx(Flex, { align: "center", gap: 4, justifyContent: "center", children: _jsx(Skeleton, { w: "24px", h: "24px", borderRadius: "lg", startColor: theme.colors.sidebar.background[400], endColor: theme.colors.sidebar.background[300] }) })) : (_jsxs(Flex, { align: "center", gap: 3, children: [_jsx(Skeleton, { w: "18px", h: "18px", borderRadius: "lg", startColor: theme.colors.sidebar.background[400], endColor: theme.colors.sidebar.background[300] }), _jsx(Skeleton, { h: "0.875rem", w: "80%", borderRadius: "lg", startColor: theme.colors.sidebar.background[400], endColor: theme.colors.sidebar.background[300] })] })) }));
|
|
78
86
|
};
|
|
79
|
-
const AddNewButton = ({ toggle, onClick
|
|
87
|
+
const AddNewButton = ({ toggle, onClick }) => {
|
|
80
88
|
const theme = useCustomTheme();
|
|
81
89
|
const activeAccent = getSidebarActiveAccent(theme.colors);
|
|
82
|
-
return (_jsxs(Flex, { as: "button", type: "button", "data-group": "", "aria-label": "Add New", alignItems: "center", gap: "9px", px: "10px", py:
|
|
90
|
+
return (_jsxs(Flex, { as: "button", type: "button", "data-group": "", "aria-label": "Add New", alignItems: "center", gap: "9px", px: "10px", py: "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" }))] }));
|
|
83
91
|
};
|
|
84
92
|
const deriveInitials = (user) => {
|
|
85
93
|
if (user.initials)
|
|
@@ -91,13 +99,13 @@ const deriveInitials = (user) => {
|
|
|
91
99
|
return parts[0].slice(0, 2).toUpperCase();
|
|
92
100
|
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
93
101
|
};
|
|
94
|
-
const UserFooter = ({ user, toggle
|
|
102
|
+
const UserFooter = ({ user, toggle }) => {
|
|
95
103
|
const theme = useCustomTheme();
|
|
96
104
|
const activeAccent = getSidebarActiveAccent(theme.colors);
|
|
97
105
|
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",
|
|
98
106
|
// Same rail-safe pairing as the logo tile — primary.opacity[32] was invisible on zinc/skyline.
|
|
99
107
|
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) }));
|
|
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:
|
|
108
|
+
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: "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 })] }) }));
|
|
101
109
|
};
|
|
102
110
|
// Footer "cell" — one segment of the Collapse | Hide/Show control.
|
|
103
111
|
const ControlCell = ({ onClick, ariaLabel, label, accent, children }) => {
|
|
@@ -136,6 +144,7 @@ export default function Sidebar({ menus, activeMenu, handleMenuClick, handleSeco
|
|
|
136
144
|
// In overlay mode the panel is always fully expanded — the mini-rail/collapse
|
|
137
145
|
// is a desktop-only space affordance — so children render as if `toggle=false`.
|
|
138
146
|
const effToggle = overlay ? false : toggle;
|
|
147
|
+
const narrowViewport = useMatchMedia(NARROW_DRAWER_QUERY);
|
|
139
148
|
// A peeked overlay was never pinned, so leaving the panel must close it; a clicked-open
|
|
140
149
|
// one must not, or the drawer would vanish the moment the pointer moved away.
|
|
141
150
|
const overlayPeeking = overlay && peekOpen && !mobileOpen;
|
|
@@ -168,6 +177,7 @@ export default function Sidebar({ menus, activeMenu, handleMenuClick, handleSeco
|
|
|
168
177
|
const activeTop = menus.find((m) => String(m.title) === String(activeMenu)) ||
|
|
169
178
|
menus.find((m) => String(m.id) === String(activeMenu));
|
|
170
179
|
const secondaryItems = (_b = activeTop === null || activeTop === void 0 ? void 0 : activeTop.secondaryItems) !== null && _b !== void 0 ? _b : [];
|
|
180
|
+
const hasSecondary = secondaryItems.length > 0;
|
|
171
181
|
const inline = inlineTransitions(collapseTransition);
|
|
172
182
|
const pinnedActive = activePinnedId != null && !!(pinnedItems === null || pinnedItems === void 0 ? void 0 : pinnedItems.some((p) => String(p.id) === String(activePinnedId)));
|
|
173
183
|
// Sync toggle with external `open` prop.
|
|
@@ -333,7 +343,7 @@ export default function Sidebar({ menus, activeMenu, handleMenuClick, handleSeco
|
|
|
333
343
|
onMobileClose === null || onMobileClose === void 0 ? void 0 : onMobileClose();
|
|
334
344
|
};
|
|
335
345
|
const baseTransform = isOverlayOpen ? "translateX(0)" : "translateX(-100%)";
|
|
336
|
-
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 ?
|
|
346
|
+
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 ? OVERLAY_MAX_WIDTH : { base: OVERLAY_MAX_WIDTH, lg: "none" }, transform: mobileNav ? baseTransform : { base: baseTransform, lg: "none" }, transition: mobileNav
|
|
337
347
|
? dragging
|
|
338
348
|
? "none"
|
|
339
349
|
: OVERLAY_SLIDE
|
|
@@ -342,13 +352,13 @@ export default function Sidebar({ menus, activeMenu, handleMenuClick, handleSeco
|
|
|
342
352
|
? "none"
|
|
343
353
|
: OVERLAY_SLIDE,
|
|
344
354
|
lg: inline.shadow,
|
|
345
|
-
}, borderRadius: "none", boxShadow: mobileNav ? theme.shadows["2xl"] : { base: theme.shadows["2xl"], lg: theme.shadows.lg }, display: "flex", background: theme.colors.sidebar.background[500], borderRight:
|
|
355
|
+
}, borderRadius: "none", boxShadow: mobileNav ? theme.shadows["2xl"] : { base: theme.shadows["2xl"], lg: theme.shadows.lg }, display: "flex", background: theme.colors.sidebar.background[500], borderRight: `${PANEL_BORDER} 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: {
|
|
346
356
|
...fullViewportHeight,
|
|
347
357
|
touchAction: overlay ? "pan-y" : "auto",
|
|
348
358
|
[REDUCED_MOTION_QUERY]: { "&, & *": { transition: "none", animation: "none" } },
|
|
349
359
|
}, onMouseLeave: overlayPeeking ? onPeekEnd : undefined, onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, children: [_jsx(Box, { width: mobileNav
|
|
350
360
|
? OVERLAY_WIDTH
|
|
351
|
-
: { base: OVERLAY_WIDTH, lg: effToggle ? RAIL_WIDTH : EXPANDED_WIDTH }, transition: mobileNav
|
|
361
|
+
: { base: OVERLAY_WIDTH, lg: effToggle ? RAIL_WIDTH : EXPANDED_WIDTH }, maxW: overlay && hasSecondary ? PRIMARY_MAX_WITH_SECONDARY : undefined, transition: mobileNav
|
|
352
362
|
? OVERLAY_WIDTH_TRANSITION
|
|
353
|
-
: { 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,
|
|
363
|
+
: { 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, 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 }) })), _jsx(OtherApps, { toggle: effToggle, otherApps: otherApps !== null && otherApps !== void 0 ? otherApps : [] }), user && _jsx(UserFooter, { user: user, toggle: effToggle }), _jsx(FooterControls, { toggle: effToggle, overlay: overlay, mobileNav: mobileNav, onToggleCollapse: changeToggle, onToggleMobileNav: onToggleMobileNav })] })] }) }), hasSecondary && (_jsx(SecondaryBar, { items: secondaryItems, defaultCollapsed: effToggle || narrowViewport, collapsedWidth: SECONDARY_STRIP_WIDTH, expandedWidth: SECONDARY_OPEN_WIDTH, shrinkable: overlay, 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" }))] })] }));
|
|
354
364
|
}
|
|
@@ -25,7 +25,7 @@ const SUBMENU_REVEAL_TRANSITION = transitionFor(["opacity", "transform"], "base"
|
|
|
25
25
|
* routed through the in-app handler.
|
|
26
26
|
*/
|
|
27
27
|
export const isBrowserNavigationGesture = (e) => e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0;
|
|
28
|
-
const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
|
|
28
|
+
const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle, }) => {
|
|
29
29
|
var _a, _b, _c, _d, _e;
|
|
30
30
|
const theme = useCustomTheme();
|
|
31
31
|
const activeAccent = getSidebarActiveAccent(theme.colors);
|
|
@@ -37,7 +37,6 @@ const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
|
|
|
37
37
|
const isBlocked = menuDisabled(menu) || locked;
|
|
38
38
|
const hasSubMenu = !!(subMenu === null || subMenu === void 0 ? void 0 : subMenu.length);
|
|
39
39
|
const submenuPanelId = `submenu-${reactId}`;
|
|
40
|
-
const rowHeight = overlay ? SIDEBAR_ROW.overlayHeight : SIDEBAR_ROW.height;
|
|
41
40
|
// A submenu parent only expands, so it is a button; every other row navigates.
|
|
42
41
|
// Cast: Chakra narrows `as` unions to their *shared* props, which drops `href`.
|
|
43
42
|
const rowAs = (hasSubMenu ? "button" : "a");
|
|
@@ -75,7 +74,7 @@ const MenuItemBox = ({ menu, activeMenu, toggle, handleClick, isOpen, onToggle,
|
|
|
75
74
|
textAlign: "left",
|
|
76
75
|
textDecoration: "none",
|
|
77
76
|
w: "100%",
|
|
78
|
-
h:
|
|
77
|
+
h: SIDEBAR_ROW.height,
|
|
79
78
|
borderRadius: "lg",
|
|
80
79
|
px: "10px",
|
|
81
80
|
fontWeight: 500,
|
|
@@ -3,7 +3,7 @@ import React, { memo, useCallback, useEffect, useState } from "react";
|
|
|
3
3
|
import { Box } from "@chakra-ui/react";
|
|
4
4
|
import { useCustomTheme } from "../../../Theme/useCustomTheme.js";
|
|
5
5
|
import MenuItemBox from "./MenuItemBox.js";
|
|
6
|
-
const MenuItems = ({ menus, activeMenu, handleMenuClick, toggle, selectedSubMenu,
|
|
6
|
+
const MenuItems = ({ menus, activeMenu, handleMenuClick, toggle, selectedSubMenu, containerId, }) => {
|
|
7
7
|
const theme = useCustomTheme();
|
|
8
8
|
const [openMenuId, setOpenMenuId] = useState(null);
|
|
9
9
|
const [lastClickY, setLastClickY] = useState(null);
|
|
@@ -110,7 +110,7 @@ const MenuItems = ({ menus, activeMenu, handleMenuClick, toggle, selectedSubMenu
|
|
|
110
110
|
lastGroup = menu.group;
|
|
111
111
|
groupCount += 1;
|
|
112
112
|
}
|
|
113
|
-
return (_jsxs(React.Fragment, { children: [showGroup && !isFirstGroup && (_jsx(Box, { h: "1px", bg: theme.colors.sidebar.divider, mx: 2, my:
|
|
113
|
+
return (_jsxs(React.Fragment, { children: [showGroup && !isFirstGroup && (_jsx(Box, { h: "1px", bg: theme.colors.sidebar.divider, mx: 2, my: "5px" })), showGroup && !toggle && (_jsx(Box, { "aria-hidden": "true", px: "10px", pt: "10px", pb: "3px", fontSize: "xs-minus", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.1em", color: theme.colors.sidebar.mutedLabel, whiteSpace: "nowrap", overflow: "hidden", children: menu.group })), _jsx(MenuItemBox, { menu: menu, activeMenu: activeMenu, toggle: toggle, handleClick: handleMenuClick, selectedSubMenu: selectedSubMenu, isOpen: openMenuId === menu.id, onToggle: handleToggle })] }, `${String((_c = (_b = (_a = menu.id) !== null && _a !== void 0 ? _a : menu.url) !== null && _b !== void 0 ? _b : menu.title) !== null && _c !== void 0 ? _c : idx)}-${idx}`));
|
|
114
114
|
}) }));
|
|
115
115
|
};
|
|
116
116
|
export default memo(MenuItems);
|
|
@@ -47,7 +47,6 @@ const PinnedSection = ({ items, label = DEFAULT_PINNED_LABEL, limit = DEFAULT_PI
|
|
|
47
47
|
const text = { ...DEFAULT_LABELS, ...labels };
|
|
48
48
|
const headingId = `pinned-${sanitizeId(useId())}`;
|
|
49
49
|
const cap = Math.max(1, limit);
|
|
50
|
-
const rowHeight = overlay ? SIDEBAR_ROW.overlayHeight : SIDEBAR_ROW.height;
|
|
51
50
|
const activeIndex = activeId == null ? -1 : items.findIndex((i) => String(i.id) === String(activeId));
|
|
52
51
|
const [showAll, setShowAll] = useState(activeIndex >= cap);
|
|
53
52
|
useEffect(() => {
|
|
@@ -72,7 +71,7 @@ const PinnedSection = ({ items, label = DEFAULT_PINNED_LABEL, limit = DEFAULT_PI
|
|
|
72
71
|
};
|
|
73
72
|
const renderRow = (item) => {
|
|
74
73
|
const isActive = activeIndex >= 0 && String(item.id) === String(activeId);
|
|
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:
|
|
74
|
+
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: SIDEBAR_ROW.height, 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) => {
|
|
76
75
|
if (item.url && isBrowserNavigationGesture(e))
|
|
77
76
|
return;
|
|
78
77
|
e.preventDefault();
|
|
@@ -86,10 +85,10 @@ const PinnedSection = ({ items, label = DEFAULT_PINNED_LABEL, limit = DEFAULT_PI
|
|
|
86
85
|
const disclosureLabel = showAll
|
|
87
86
|
? text.showLess
|
|
88
87
|
: text.showMore.replace("{count}", String(hiddenCount));
|
|
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:
|
|
88
|
+
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: SIDEBAR_ROW.height, 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: {
|
|
90
89
|
backgroundColor: LADDER.hover,
|
|
91
90
|
color: theme.colors.white,
|
|
92
91
|
}, transition: SIDEBAR_BG_TRANSITION, sx: sidebarFocusStyles(theme.colors), children: [_jsx(Icon, { as: showAll ? ChevronUp : ChevronDown, fontSize: "md", flexShrink: 0 }), !toggle && _jsx("span", { children: disclosureLabel })] }));
|
|
93
|
-
return (_jsxs(Box, { mb: toggle ? "5px" : "3px", "data-testid": "sidebar-pinned", children: [_jsx(Box, { id: headingId, as: "h2", px: "10px", pt:
|
|
92
|
+
return (_jsxs(Box, { mb: toggle ? "5px" : "3px", "data-testid": "sidebar-pinned", children: [_jsx(Box, { id: headingId, as: "h2", px: "10px", pt: "10px", pb: "3px", fontSize: "xs-minus", 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: "8px", mb: "5px" })] }));
|
|
94
93
|
};
|
|
95
94
|
export default PinnedSection;
|
|
@@ -2,8 +2,6 @@ import { fontSizes } from "../../Theme/tokens/primitives/typography.js";
|
|
|
2
2
|
/** One type and row scale for the whole sidebar — rail, submenu, flyout, secondary bar and chrome. */
|
|
3
3
|
export const SIDEBAR_ROW = {
|
|
4
4
|
height: "32px",
|
|
5
|
-
/** Rail row in the mobile overlay — the WCAG 2.5.5 touch target. */
|
|
6
|
-
overlayHeight: "44px",
|
|
7
5
|
subHeight: "28px",
|
|
8
6
|
fontSize: fontSizes["xs-plus"],
|
|
9
7
|
iconSize: "1rem",
|
|
@@ -2,12 +2,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box } from "@chakra-ui/react";
|
|
3
3
|
import SegmentedControl from "../SegmentedControl/SegmentedControl.js";
|
|
4
4
|
/** @deprecated Two labelled choices; for a single on/off field use `ToggleSwitch`. Renders `SegmentedControl` at 12.5rem when labelled. */
|
|
5
|
-
export default function Switch({ leftText, rightText, leftIcon, rightIcon, onSwitchToggle, switchActive, surface, "aria-label": ariaLabel, }) {
|
|
5
|
+
export default function Switch({ leftText, rightText, leftIcon, rightIcon, onSwitchToggle, switchActive, size = "sm", surface, "aria-label": ariaLabel, }) {
|
|
6
6
|
const options = [
|
|
7
7
|
{ value: "left", label: leftText, icon: leftIcon },
|
|
8
8
|
{ value: "right", label: rightText, icon: rightIcon },
|
|
9
9
|
];
|
|
10
10
|
// Unlabelled segments have nothing to size to, so the 12.5rem floor only overflowed its cell.
|
|
11
11
|
const hasLabels = Boolean(leftText || rightText);
|
|
12
|
-
return (_jsx(Box, { w: "fit-content", maxW: "100%", minW: hasLabels ? "12.5rem" : undefined, children: _jsx(SegmentedControl, { options: options, value: switchActive, onChange: onSwitchToggle, variant: "brandSlide", surface: surface, isFullWidth: true, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : `${leftText} or ${rightText}` }) }));
|
|
12
|
+
return (_jsx(Box, { w: "fit-content", maxW: "100%", minW: hasLabels ? "12.5rem" : undefined, children: _jsx(SegmentedControl, { options: options, value: switchActive, onChange: onSwitchToggle, size: size, variant: "brandSlide", surface: surface, isFullWidth: true, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : `${leftText} or ${rightText}` }) }));
|
|
13
13
|
}
|
|
@@ -2,13 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box, IconButton } from "@chakra-ui/react";
|
|
3
3
|
import { Columns3, Table2 } from "lucide-react";
|
|
4
4
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
5
|
-
import { AA_NON_TEXT, liftToContrast } from "../../Theme/tokens/builders/outlineRung.js";
|
|
6
5
|
import { resolveFilledSurface } from "../../Theme/tokens/builders/filledSurface.js";
|
|
7
6
|
import ToolTip from "../ToolTip/ToolTip.js";
|
|
8
7
|
import { useSlidingPill } from "../SegmentedControl/useSlidingPill.js";
|
|
9
8
|
import { BUTTON_SIZES } from "../../Theme/tokens/primitives/controlSizes.js";
|
|
10
9
|
import { BORDER_WIDTHS } from "../../Theme/tokens/primitives/borderWidths.js";
|
|
11
10
|
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
11
|
+
import { tableToggleInk } from "./tableToggleInk.js";
|
|
12
12
|
const MODES = ["grid", "list"];
|
|
13
13
|
const TRACK_HEIGHT = BUTTON_SIZES.sm.height;
|
|
14
14
|
const SEGMENT_HEIGHT = `calc(${TRACK_HEIGHT} - 0.25rem)`;
|
|
@@ -22,15 +22,14 @@ const TableToggle = ({ value, onChange, variant = "default" }) => {
|
|
|
22
22
|
const isUnderlineSlide = variant === "underlineSlide";
|
|
23
23
|
const hasIndicator = isBrandSlide || isUnderlineSlide;
|
|
24
24
|
const brandFill = resolveFilledSurface(colors.primary, colors);
|
|
25
|
-
const restInk =
|
|
26
|
-
const hoverInk = liftToContrast(colors.background[900], colors.background[400], AA_NON_TEXT);
|
|
25
|
+
const { track, hover, restInk, hoverInk } = tableToggleInk(colors);
|
|
27
26
|
const selectedIndex = MODES.indexOf(value);
|
|
28
27
|
const { trackRef, itemRefs: refs, pill } = useSlidingPill(hasIndicator, selectedIndex, []);
|
|
29
28
|
const styles = {
|
|
30
29
|
container: {
|
|
31
30
|
display: "flex",
|
|
32
31
|
alignItems: "center",
|
|
33
|
-
bg: isBrandSlide ? colors.primary.opacity[8] : isUnderlineSlide ? "transparent" :
|
|
32
|
+
bg: isBrandSlide ? colors.primary.opacity[8] : isUnderlineSlide ? "transparent" : track,
|
|
34
33
|
p: isUnderlineSlide ? "0" : "0.125rem",
|
|
35
34
|
borderRadius: isUnderlineSlide ? "none" : "lg",
|
|
36
35
|
borderBottom: isUnderlineSlide ? `${BORDER_WIDTHS.hairline} solid ${colors.boxborder[200]}` : undefined,
|
|
@@ -65,7 +64,7 @@ const TableToggle = ({ value, onChange, variant = "default" }) => {
|
|
|
65
64
|
? "transparent"
|
|
66
65
|
: value === mode
|
|
67
66
|
? colors.backgroundColor.light
|
|
68
|
-
:
|
|
67
|
+
: hover,
|
|
69
68
|
color: isBrandSlide
|
|
70
69
|
? value === mode
|
|
71
70
|
? brandFill.color
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AA_NON_TEXT, liftToContrast } from "../../Theme/tokens/builders/outlineRung.js";
|
|
2
|
+
import { segmentedTrackStep } from "../SegmentedControl/segmentedInk.js";
|
|
3
|
+
// NOTE: each rung keeps its offset from the track, so Zinc's [400] track matches the others' [600].
|
|
4
|
+
const RUNGS = {
|
|
5
|
+
600: { hover: 400, rest: 800, hoverInk: 900 },
|
|
6
|
+
500: { hover: 300, rest: 700, hoverInk: 800 },
|
|
7
|
+
400: { hover: 200, rest: 600, hoverInk: 700 },
|
|
8
|
+
300: { hover: 100, rest: 500, hoverInk: 600 },
|
|
9
|
+
200: { hover: 50, rest: 400, hoverInk: 500 },
|
|
10
|
+
100: { hover: 50, rest: 300, hoverInk: 400 },
|
|
11
|
+
50: { hover: 50, rest: 200, hoverInk: 300 },
|
|
12
|
+
};
|
|
13
|
+
export const tableToggleInk = (colors) => {
|
|
14
|
+
const step = segmentedTrackStep(colors);
|
|
15
|
+
const rungs = RUNGS[step];
|
|
16
|
+
const track = colors.background[step];
|
|
17
|
+
const hover = colors.background[rungs.hover];
|
|
18
|
+
return {
|
|
19
|
+
track,
|
|
20
|
+
hover,
|
|
21
|
+
restInk: liftToContrast(colors.background[rungs.rest], track, AA_NON_TEXT),
|
|
22
|
+
hoverInk: liftToContrast(colors.background[rungs.hoverInk], hover, AA_NON_TEXT),
|
|
23
|
+
};
|
|
24
|
+
};
|
package/dist/esm/index.js
CHANGED
|
@@ -210,6 +210,7 @@ export { default as NotificationPanel } from "./Components/NotificationBell/Noti
|
|
|
210
210
|
export { default as NotificationList } from "./Components/NotificationBell/NotificationList.js";
|
|
211
211
|
export { default as NotificationItem } from "./Components/NotificationBell/NotificationItem.js";
|
|
212
212
|
export { sectionizeByDay, groupConsecutive, formatCount, formatRelativeTime, useAnchoredPanelHeight, } from "./Components/NotificationBell/notificationHelpers.js";
|
|
213
|
+
export { NotificationCenterProvider, useNotificationCenter, isNotificationActionError, notificationActionError, toNotificationActionError, DEFAULT_NOTIFICATION_LOCALE, defaultNotificationLabels, NotificationRow, NotificationDetail, NotificationCenter, NotificationInbox, NotificationPreferences, } from "./Components/NotificationCenter/index.js";
|
|
213
214
|
export { lazyWithRetry, installPreloadErrorReload, isChunkLoadError, clearChunkReloadGuard, } from "./Utils/lazyWithRetry.js";
|
|
214
215
|
export { humanize, createEnumLabelResolver } from "./Utils/humanize.js";
|
|
215
216
|
export { EMAIL_REGEX, validateEmail, validatePassword, validateRequired, validatePositiveNumber, validateFileType, validateFileSize, validateFile, validateVideoFileType, validateVideoFile, validateYoutubeUrl, defaultValidationMessages, } from "./Utils/validation.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -285,6 +285,14 @@ export { default as NotificationList } from "./Components/NotificationBell/Notif
|
|
|
285
285
|
export { default as NotificationItem } from "./Components/NotificationBell/NotificationItem";
|
|
286
286
|
export { sectionizeByDay, groupConsecutive, formatCount, formatRelativeTime, useAnchoredPanelHeight, } from "./Components/NotificationBell/notificationHelpers";
|
|
287
287
|
export type { RelativeTimeLabels, RelativeTimeOptions } from "./Components/NotificationBell/notificationHelpers";
|
|
288
|
+
export { NotificationCenterProvider, useNotificationCenter, isNotificationActionError, notificationActionError, toNotificationActionError, DEFAULT_NOTIFICATION_LOCALE, defaultNotificationLabels, NotificationRow, NotificationDetail, NotificationCenter, NotificationInbox, NotificationPreferences, } from "./Components/NotificationCenter";
|
|
289
|
+
export type { NotificationTitlePart, NotificationActor, NotificationActionIntent, NotificationAction, NotificationEntry, NotificationNeedsYouRule, NotificationCategory, NotificationCategories, NotificationCounts, NotificationActionErrorKind, NotificationActionError, NotificationZoneKey, NotificationMarkAllScope, NotificationExtraAction, NotificationLoadStatus, NotificationLabels, NotificationOpenEvent, NotificationSourceProps, NotificationCenterProviderProps, NotificationSourceOmitted, NotificationSourceBinding, } from "./Components/NotificationCenter/core/NotificationSourceProps";
|
|
290
|
+
export type { NotificationRowStatus, NotificationDecision, NotificationReasonRequest, NotificationLiveState, LiveNotificationEntry, NotificationZoneLists, NotificationFeatures, NotificationThread, NotificationGroup, NotificationDayBucket, NotificationFormatter, NotificationCenterActions, NotificationCenterValue, } from "./Components/NotificationCenter/core/NotificationEngineProps";
|
|
291
|
+
export type { NotificationRowVariant, NotificationRowOpenEvent, NotificationRowProps, } from "./Components/NotificationCenter/row/NotificationRowProps";
|
|
292
|
+
export type { NotificationDetailVariant, NotificationDetailProps, } from "./Components/NotificationCenter/row/NotificationDetailProps";
|
|
293
|
+
export type { NotificationCenterLabels, NotificationCenterVariant, NotificationCenterTab, NotificationCenterProps, } from "./Components/NotificationCenter/center/NotificationCenterProps";
|
|
294
|
+
export type { NotificationInboxLabels, NotificationInboxTab, NotificationInboxVariant, NotificationInboxProps, } from "./Components/NotificationCenter/inbox/NotificationInboxProps";
|
|
295
|
+
export type { NotificationPreferenceChannel, NotificationPreferenceRow, NotificationPreferenceGroup, NotificationPreferenceValues, NotificationEmailSummary, NotificationPreferencesStatus, NotificationPreferencesLabels, NotificationPreferencesProps, } from "./Components/NotificationCenter/preferences/NotificationPreferencesProps";
|
|
288
296
|
export { lazyWithRetry, installPreloadErrorReload, isChunkLoadError, clearChunkReloadGuard, } from "./Utils/lazyWithRetry";
|
|
289
297
|
export { humanize, createEnumLabelResolver } from "./Utils/humanize";
|
|
290
298
|
export type { EnumLabelResolver } from "./Utils/humanize";
|
package/dist/index.js
CHANGED
|
@@ -46,9 +46,9 @@ exports.setRef = exports.mergeRefs = exports.resolveStatusTone = exports.resolve
|
|
|
46
46
|
exports.isDayStateKey = exports.CALENDAR_DAY_CLASS = exports.DAY_STATE_KEYS = exports.contrastRatio = exports.relativeLuminance = exports.mix = exports.withLightness = exports.hslToHex = exports.hexToHsl = exports.hslToRgb = exports.rgbToHsl = exports.rgbToHex = exports.compositeOver = exports.hexToRgba = exports.hexToRgb = exports.optionRowCursorSx = exports.optionRowFill = exports.optionRowDescriptionInk = exports.optionRowWeight = exports.optionRowInk = exports.resolveFilledSurface = exports.labelOnFill = exports.darkerFillRung = exports.solidFillRung = exports.DARK_CANVAS_LUMINANCE = exports.AA_NORMAL_TEXT = exports.pickAccentText = exports.accentTextOnPlanes = exports.accentTextOnCanvas = exports.onGradient = exports.onFilled = exports.isDarkCanvas = exports.STATUS_INK = exports.ACCENT_GRADIENT = exports.chipBorder = exports.chipFill = exports.inkSafeGradient = exports.statusGradient = exports.useChartTheme = exports.labelOnSeries = exports.getDefaultSeriesColors = exports.getCategoricalSeriesColors = exports.chartMode = exports.chartInk = exports.chartAxisLabelColor = exports.CATEGORICAL_SERIES = exports.useDebouncedValue = exports.useDebouncedCallback = exports.toWords = exports.rafThrottle = void 0;
|
|
47
47
|
exports.raisedRule = exports.buildSurfaceRaised = exports.tooltipSurface = exports.SCRIM_OPACITY = exports.overlayScrim = exports.resolveSoftTone = exports.toneInk = exports.toneScale = exports.toneToSemantic = exports.toneToColorScheme = exports.isTone = exports.TONES = exports.shadowsFor = exports.TEXT_STYLES = exports.NUMERIC_TEXT = exports.DISABLED_OPACITY = exports.BORDER_WIDTHS = exports.RADIUS_ROLE = exports.motionTransition = exports.transitionFor = exports.MOTION_PRESS_SCALE = exports.MOTION_LOOP_MS = exports.MOTION_BEZIER = exports.MOTION_EASE_IN = exports.MOTION_EASE_OUT = exports.MOTION_EASE = exports.MOTION_MS = exports.isControlSize = exports.DEFAULT_CONTROL_SIZE = exports.CONTROL_SIZE_NAMES = exports.CONTROL_SIZES = exports.inkSafeGradientToken = exports.gradientCss = exports.resolveGradient = exports.fieldSurfaces = exports.placeholderInkOn = exports.placeholderInk = exports.SCROLLBAR_WIDTH = exports.globalScrollbarStyles = exports.scrollbarStyles = exports.useAppSwitcherShortcut = exports.resolveSuiteApps = exports.PIXELIZE_SUITE = exports.buildSuiteApps = exports.formatShortcut = exports.matchesShortcut = exports.filterApps = exports.appInitials = exports.describeDayStates = exports.resolveDayStateVisual = void 0;
|
|
48
48
|
exports.FilteredEmptyState = exports.ConfirmDialog = exports.TabPanel = exports.TabPanels = exports.Tab = exports.TabList = exports.Tabs = exports.Accordian = exports.AudioRecorder = exports.CalendarGrid = exports.SectionRail = exports.BulkSelectionBar = exports.SaveBar = exports.FeedbackForm = exports.PersonChip = exports.initialsFor = exports.avatarScaleKeyFor = exports.resolveAvatarColorway = exports.AvatarGroup = exports.Avatar = exports.SettingsSection = exports.SettingRow = exports.FilterBar = exports.DescriptionList = exports.Spinner = exports.Backdrop = exports.QueryStateBoundary = exports.ErrorState = exports.FormDrawer = exports.CircularProgress = exports.StatusTag = exports.StatCard = exports.PageHeader = exports.fieldMessageStyles = exports.fieldLabelStyles = exports.controlSizeStyles = exports.fieldControlStyles = exports.FieldMessage = exports.useFieldIds = exports.MOTION_KEEP_CLASS = exports.REDUCED_MOTION_QUERY = exports.reducedMotionSx = exports.usePrefersReducedMotion = exports.OVERLAY_BLUR = exports.overlayScrimStyles = exports.ruleOn = exports.cardRule = exports.recessOn = exports.bandOn = exports.RAISED_OVERLAY = void 0;
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.TagInput = exports.TimePicker = exports.DEFAULT_DATE_FALLBACK = exports.formatDateRange = exports.formatDateTime = exports.formatDate = exports.SkipLink = exports.VisuallyHidden = exports.FormField = exports.IconButton = exports.ChoiceCardGroup = exports.ChoiceCard = exports.defaultPaginationLabels = exports.Pagination = exports.toCsv = exports.safeFileName = exports.downloadBlob = exports.unknownTokens = exports.serializeChips = exports.fieldToken = exports.extractTokens = exports.chipify = exports.chipHtml = exports.firstInvalidStep = exports.wizardTransition = exports.Wizard = exports.WizardDialog = exports.LauncherSearchEngine = exports.highlightSegments = exports.flattenScreens = exports.searchLauncherSections = exports.searchLauncher = exports.NewTabLink = exports.PinToggle = exports.NavLauncher = exports.LauncherTrigger = void 0;
|
|
49
|
+
exports.defaultMediaDocumentStageLabels = exports.MediaDocumentStage = exports.defaultMediaVideoPlayerLabels = exports.MediaVideoPlayer = exports.defaultMediaImageViewerLabels = exports.MediaImageViewer = exports.useFileViewer = exports.MediaViewer = exports.RangeSlider = exports.getApiErrorStatus = exports.getApiErrorMessage = exports.defaultValidationMessages = exports.validateYoutubeUrl = exports.validateVideoFile = exports.validateVideoFileType = exports.validateFile = exports.validateFileSize = exports.validateFileType = exports.validatePositiveNumber = exports.validateRequired = exports.validatePassword = exports.validateEmail = exports.EMAIL_REGEX = exports.createEnumLabelResolver = exports.humanize = exports.clearChunkReloadGuard = exports.isChunkLoadError = exports.installPreloadErrorReload = exports.lazyWithRetry = exports.NotificationPreferences = exports.NotificationInbox = exports.NotificationCenter = exports.NotificationDetail = exports.NotificationRow = exports.defaultNotificationLabels = exports.DEFAULT_NOTIFICATION_LOCALE = exports.toNotificationActionError = exports.notificationActionError = exports.isNotificationActionError = exports.useNotificationCenter = exports.NotificationCenterProvider = exports.useAnchoredPanelHeight = exports.formatRelativeTime = exports.formatCount = exports.groupConsecutive = exports.sectionizeByDay = exports.NotificationItem = exports.NotificationList = exports.NotificationPanel = exports.NotificationBell = void 0;
|
|
50
|
+
exports.isOptionAvailable = exports.findVariant = exports.selectionComplete = exports.stockState = exports.LOW_STOCK_THRESHOLD = exports.defaultMediaLightboxLabels = exports.defaultMediaGalleryLabels = exports.MediaLightbox = exports.MediaGallery = exports.PaymentOptionGroup = exports.PaymentOption = exports.AddressCardGroup = exports.AddressCard = exports.DetailSections = exports.ReviewList = exports.ReviewSummary = exports.SpecTable = exports.OffersList = exports.TrustBadges = exports.PincodeChecker = exports.StickyBuyBar = exports.BagBar = exports.OrderStatusTimeline = exports.CouponField = exports.OrderSummary = exports.CartItem = exports.QuantityStepper = exports.VariantSelector = exports.OptionChip = exports.WishlistToggle = exports.ProductBadges = exports.StockStatus = exports.PriceBlock = exports.Rating = exports.SEEK_STEP_SECONDS = exports.PLAYBACK_SPEEDS = exports.ZOOM_STEP = exports.MAX_ZOOM = exports.MIN_ZOOM = exports.resolveMediaUrl = exports.fileKind = exports.countMedia = exports.planPreview = exports.buildFileItems = exports.buildMediaItems = exports.MediaStatusPanel = exports.MediaScrubber = exports.defaultMediaAudioPlayerLabels = exports.MediaAudioPlayer = exports.defaultMediaViewerLabels = void 0;
|
|
51
|
+
exports.TagInput = exports.TimePicker = exports.DEFAULT_DATE_FALLBACK = exports.formatDateRange = exports.formatDateTime = exports.formatDate = exports.SkipLink = exports.VisuallyHidden = exports.FormField = exports.IconButton = exports.ChoiceCardGroup = exports.ChoiceCard = exports.defaultPaginationLabels = exports.Pagination = exports.toCsv = exports.safeFileName = exports.downloadBlob = exports.unknownTokens = exports.serializeChips = exports.fieldToken = exports.extractTokens = exports.chipify = exports.chipHtml = exports.firstInvalidStep = exports.wizardTransition = exports.Wizard = exports.WizardDialog = exports.LauncherSearchEngine = exports.highlightSegments = exports.flattenScreens = exports.searchLauncherSections = exports.searchLauncher = exports.NewTabLink = exports.PinToggle = exports.NavLauncher = exports.LauncherTrigger = exports.KbdShortcut = exports.Kbd = exports.QuickAddSheet = exports.ProductCardSkeleton = exports.ProductCardGrid = exports.unitPrice = exports.discountAmount = exports.discountPercent = exports.formatPrice = exports.firstAvailableSelection = exports.priceRange = exports.remainingStock = void 0;
|
|
52
52
|
const Accordion_1 = __importDefault(require("./Components/Accordion/Accordion"));
|
|
53
53
|
exports.Accordion = Accordion_1.default;
|
|
54
54
|
const AlertDialog_1 = __importDefault(require("./Components/AlertDialog/AlertDialog"));
|
|
@@ -558,6 +558,19 @@ Object.defineProperty(exports, "groupConsecutive", { enumerable: true, get: func
|
|
|
558
558
|
Object.defineProperty(exports, "formatCount", { enumerable: true, get: function () { return notificationHelpers_1.formatCount; } });
|
|
559
559
|
Object.defineProperty(exports, "formatRelativeTime", { enumerable: true, get: function () { return notificationHelpers_1.formatRelativeTime; } });
|
|
560
560
|
Object.defineProperty(exports, "useAnchoredPanelHeight", { enumerable: true, get: function () { return notificationHelpers_1.useAnchoredPanelHeight; } });
|
|
561
|
+
var NotificationCenter_1 = require("./Components/NotificationCenter");
|
|
562
|
+
Object.defineProperty(exports, "NotificationCenterProvider", { enumerable: true, get: function () { return NotificationCenter_1.NotificationCenterProvider; } });
|
|
563
|
+
Object.defineProperty(exports, "useNotificationCenter", { enumerable: true, get: function () { return NotificationCenter_1.useNotificationCenter; } });
|
|
564
|
+
Object.defineProperty(exports, "isNotificationActionError", { enumerable: true, get: function () { return NotificationCenter_1.isNotificationActionError; } });
|
|
565
|
+
Object.defineProperty(exports, "notificationActionError", { enumerable: true, get: function () { return NotificationCenter_1.notificationActionError; } });
|
|
566
|
+
Object.defineProperty(exports, "toNotificationActionError", { enumerable: true, get: function () { return NotificationCenter_1.toNotificationActionError; } });
|
|
567
|
+
Object.defineProperty(exports, "DEFAULT_NOTIFICATION_LOCALE", { enumerable: true, get: function () { return NotificationCenter_1.DEFAULT_NOTIFICATION_LOCALE; } });
|
|
568
|
+
Object.defineProperty(exports, "defaultNotificationLabels", { enumerable: true, get: function () { return NotificationCenter_1.defaultNotificationLabels; } });
|
|
569
|
+
Object.defineProperty(exports, "NotificationRow", { enumerable: true, get: function () { return NotificationCenter_1.NotificationRow; } });
|
|
570
|
+
Object.defineProperty(exports, "NotificationDetail", { enumerable: true, get: function () { return NotificationCenter_1.NotificationDetail; } });
|
|
571
|
+
Object.defineProperty(exports, "NotificationCenter", { enumerable: true, get: function () { return NotificationCenter_1.NotificationCenter; } });
|
|
572
|
+
Object.defineProperty(exports, "NotificationInbox", { enumerable: true, get: function () { return NotificationCenter_1.NotificationInbox; } });
|
|
573
|
+
Object.defineProperty(exports, "NotificationPreferences", { enumerable: true, get: function () { return NotificationCenter_1.NotificationPreferences; } });
|
|
561
574
|
var lazyWithRetry_1 = require("./Utils/lazyWithRetry");
|
|
562
575
|
Object.defineProperty(exports, "lazyWithRetry", { enumerable: true, get: function () { return lazyWithRetry_1.lazyWithRetry; } });
|
|
563
576
|
Object.defineProperty(exports, "installPreloadErrorReload", { enumerable: true, get: function () { return lazyWithRetry_1.installPreloadErrorReload; } });
|
package/package.json
CHANGED