@harpercollins/harpercollins-design-system 1.16.6 → 1.17.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/dist/cjs/index.cjs +102 -77
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/src/components/global/AppBar/AppBar.d.ts +3 -1
- package/dist/cjs/types/src/components/global/AppBar/AppBar.stories.d.ts +1 -0
- package/dist/cjs/types/src/components/global/AppBar/NavigationProgress.d.ts +12 -0
- package/dist/cjs/types/src/contexts/NavigationProgressContext.d.ts +16 -0
- package/dist/cjs/types/src/contexts/index.d.ts +1 -0
- package/dist/cjs/types/src/index.d.ts +1 -0
- package/dist/esm/index.js +171 -146
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/global/AppBar/AppBar.d.ts +3 -1
- package/dist/esm/types/src/components/global/AppBar/AppBar.stories.d.ts +1 -0
- package/dist/esm/types/src/components/global/AppBar/NavigationProgress.d.ts +12 -0
- package/dist/esm/types/src/contexts/NavigationProgressContext.d.ts +16 -0
- package/dist/esm/types/src/contexts/index.d.ts +1 -0
- package/dist/esm/types/src/index.d.ts +1 -0
- package/dist/index.d.ts +18 -2
- package/package.json +1 -1
|
@@ -18,6 +18,8 @@ interface AppBarProps {
|
|
|
18
18
|
href: string;
|
|
19
19
|
text: string;
|
|
20
20
|
};
|
|
21
|
+
isNavigating?: boolean;
|
|
22
|
+
navigatingProgressDelay?: number;
|
|
21
23
|
mobileMenuPrimary?: JSX.Element;
|
|
22
24
|
mobileMenuSecondary?: JSX.Element;
|
|
23
25
|
user?: {
|
|
@@ -26,5 +28,5 @@ interface AppBarProps {
|
|
|
26
28
|
} | null;
|
|
27
29
|
logoUrl?: string;
|
|
28
30
|
}
|
|
29
|
-
declare function AppBar({ apps, currentApp, leftSide, rightSide, myAccountMenu, workspaces, workspacesMenu, currentWorkspace, helpButton, mobileMenuPrimary, mobileMenuSecondary, user, logoUrl, }: AppBarProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
declare function AppBar({ apps, currentApp, isNavigating, navigatingProgressDelay, leftSide, rightSide, myAccountMenu, workspaces, workspacesMenu, currentWorkspace, helpButton, mobileMenuPrimary, mobileMenuSecondary, user, logoUrl, }: AppBarProps): import("react/jsx-runtime").JSX.Element;
|
|
30
32
|
export default AppBar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface NavigationProgressProps {
|
|
2
|
+
/**
|
|
3
|
+
* Whether a navigation event is in progress (e.g., page load or route change)
|
|
4
|
+
*/
|
|
5
|
+
isNavigating: boolean | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Delay in milliseconds before showing the progress bar
|
|
8
|
+
*/
|
|
9
|
+
delay?: number;
|
|
10
|
+
}
|
|
11
|
+
declare function NavigationProgress({ isNavigating, delay, }: NavigationProgressProps): JSX.Element | null;
|
|
12
|
+
export default NavigationProgress;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface NavigationProgressState {
|
|
3
|
+
showProgress: boolean;
|
|
4
|
+
completing: boolean;
|
|
5
|
+
width: number;
|
|
6
|
+
}
|
|
7
|
+
interface NavigationProgressContextType {
|
|
8
|
+
progressState: NavigationProgressState;
|
|
9
|
+
setNavigating: (isNavigating: boolean, delay?: number) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const NavigationProgressContext: React.Context<NavigationProgressContextType | undefined>;
|
|
12
|
+
export declare function NavigationProgressProvider({ children, }: {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const useNavigationProgress: () => NavigationProgressContextType;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useNavigationProgress, NavigationProgressProvider, } from "./NavigationProgressContext";
|