@harpercollins/harpercollins-design-system 1.16.5 → 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.
@@ -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;
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof AppBar>;
6
6
  export declare const Default: Story;
7
7
  export declare const DefaultMobile: Story;
8
+ export declare const NavigatingDemo: Story;
@@ -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";
@@ -1,3 +1,4 @@
1
1
  export { useToggle } from "./useToggle";
2
2
  export { useLocalStorage } from "./useLocalStorage";
3
+ export { useSentryFeedbackOpen } from "./useSentryFeedbackOpen";
3
4
  export { useFetch } from "./useFetch";
@@ -3,5 +3,4 @@
3
3
  * We are using MutationObserver to watch for changes in the shadow DOM of the Sentry feedback container because Sentry doesn't provide a direct API to check if the feedback dialog is open.
4
4
  * @returns {boolean} - Returns true if the Sentry feedback dialog is open, false otherwise.
5
5
  */
6
- declare function useSentryFeedbackOpen(): boolean;
7
- export default useSentryFeedbackOpen;
6
+ export declare function useSentryFeedbackOpen(): boolean;
@@ -1,3 +1,4 @@
1
1
  export * from "./components";
2
+ export * from "./contexts";
2
3
  export * from "./hooks";
3
4
  export * from "./utils";