@sequencing/design-system 1.0.65 → 1.0.67

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.
@@ -22,34 +22,43 @@ export interface HeaderProps {
22
22
  * e.g. for NextJs `onRequestHomePage={(url) => router.push(url)}`
23
23
  * WARNING: Do not change or modify url argument inside your callback, because you will have undocumented behavior
24
24
  * with your navigation. Your goal is only call the navigation method with the url argument.
25
- * Default value is `/`.
26
25
  * Without the `onRequestHomePage` prop, the component will use the default behavior of the anchor tag.
26
+ * Default: `/`.
27
27
  */
28
28
  homePageUrl?: string;
29
29
  /** Displays loading skeleton animation when set to `true` */
30
30
  isLoading?: boolean;
31
- /** The URL of user's account page */
32
- myAccountUrl: string;
33
- /** Specify number of skeleton links to display during loading. Default value is 6 */
31
+ /** The URL of user's account page. Default: ``/account/personal-information`` */
32
+ myAccountUrl?: string;
33
+ /** Specify number of skeleton links to display during loading. Default: 6 */
34
34
  numberOfSkeletonLinks?: number;
35
35
  /** Link clicks callback. Use it together with ``preventHardNavigation``
36
36
  * to support different routers (Next, react-router-dom, etc.).
37
37
  * NOTE: When ``preventHardNavigation`` is disabled, it has no effect.
38
38
  */
39
- onLinkClick?: (url: string) => void;
39
+ onLinkClick?: (linkUrl: string) => void;
40
40
  /**
41
41
  * Called when a user clicks on the site's logo, provide url argument to callback.
42
42
  * Typically used to make soft navigation in your framework (React, NextJs, etc).
43
43
  * e.g. for NextJs `onRequestHomePage={(url) => router.push(url)}`
44
44
  * url argument is the `homePageUrl` prop value.
45
45
  */
46
- onRequestHomePage?: (url: string) => void;
47
- /** Called when an authenticated user clicks on the My Account link inside the main right HeaderChip */
48
- onRequestMyAccount?: () => void;
46
+ onRequestHomePage?: (homePageUrl: string) => void;
47
+ /**
48
+ * Called when an authenticated user clicks on the My Account link inside the main right HeaderChip.
49
+ * The url parameter is ``myAccountUrl``
50
+ */
51
+ onRequestMyAccount?: (myAccountUrl: string) => void;
49
52
  /** Called when an anonymous user clicks on the Sign In button inside the auxiliary links section */
50
53
  onRequestSignIn?: () => void;
51
54
  /** Called when an authenticated user clicks on the Sign Out button inside the main right HeaderChip */
52
55
  onRequestSignOut?: () => void;
56
+ /**
57
+ * When enabled, it avoids setting ``document.location.href`` upon link clicks and you will be
58
+ * responsible for handling the navigation through the ``onLinkClick`` function.
59
+ * This enables soft navigation for apps that want to support it.
60
+ */
61
+ preventHardNavigation?: boolean;
53
62
  /**
54
63
  * A React node with the search component containing:
55
64
  * - A button to toggle the visibility of the search bar
@@ -60,12 +69,6 @@ export interface HeaderProps {
60
69
  * If the user is authenticated, pass their name and avatar image here
61
70
  */
62
71
  user?: User;
63
- /**
64
- * When enabled, it avoids setting ``document.location.href`` upon link clicks and you will be
65
- * responsible for handling the navigation through the ``onLinkClick`` function.
66
- * This enables soft navigation for apps that want to support it.
67
- */
68
- preventHardNavigation?: boolean;
69
72
  }
70
73
  /**
71
74
  * This is the default header for Sequencing.
package/dist/index.d.ts CHANGED
@@ -499,34 +499,43 @@ interface HeaderProps {
499
499
  * e.g. for NextJs `onRequestHomePage={(url) => router.push(url)}`
500
500
  * WARNING: Do not change or modify url argument inside your callback, because you will have undocumented behavior
501
501
  * with your navigation. Your goal is only call the navigation method with the url argument.
502
- * Default value is `/`.
503
502
  * Without the `onRequestHomePage` prop, the component will use the default behavior of the anchor tag.
503
+ * Default: `/`.
504
504
  */
505
505
  homePageUrl?: string;
506
506
  /** Displays loading skeleton animation when set to `true` */
507
507
  isLoading?: boolean;
508
- /** The URL of user's account page */
509
- myAccountUrl: string;
510
- /** Specify number of skeleton links to display during loading. Default value is 6 */
508
+ /** The URL of user's account page. Default: ``/account/personal-information`` */
509
+ myAccountUrl?: string;
510
+ /** Specify number of skeleton links to display during loading. Default: 6 */
511
511
  numberOfSkeletonLinks?: number;
512
512
  /** Link clicks callback. Use it together with ``preventHardNavigation``
513
513
  * to support different routers (Next, react-router-dom, etc.).
514
514
  * NOTE: When ``preventHardNavigation`` is disabled, it has no effect.
515
515
  */
516
- onLinkClick?: (url: string) => void;
516
+ onLinkClick?: (linkUrl: string) => void;
517
517
  /**
518
518
  * Called when a user clicks on the site's logo, provide url argument to callback.
519
519
  * Typically used to make soft navigation in your framework (React, NextJs, etc).
520
520
  * e.g. for NextJs `onRequestHomePage={(url) => router.push(url)}`
521
521
  * url argument is the `homePageUrl` prop value.
522
522
  */
523
- onRequestHomePage?: (url: string) => void;
524
- /** Called when an authenticated user clicks on the My Account link inside the main right HeaderChip */
525
- onRequestMyAccount?: () => void;
523
+ onRequestHomePage?: (homePageUrl: string) => void;
524
+ /**
525
+ * Called when an authenticated user clicks on the My Account link inside the main right HeaderChip.
526
+ * The url parameter is ``myAccountUrl``
527
+ */
528
+ onRequestMyAccount?: (myAccountUrl: string) => void;
526
529
  /** Called when an anonymous user clicks on the Sign In button inside the auxiliary links section */
527
530
  onRequestSignIn?: () => void;
528
531
  /** Called when an authenticated user clicks on the Sign Out button inside the main right HeaderChip */
529
532
  onRequestSignOut?: () => void;
533
+ /**
534
+ * When enabled, it avoids setting ``document.location.href`` upon link clicks and you will be
535
+ * responsible for handling the navigation through the ``onLinkClick`` function.
536
+ * This enables soft navigation for apps that want to support it.
537
+ */
538
+ preventHardNavigation?: boolean;
530
539
  /**
531
540
  * A React node with the search component containing:
532
541
  * - A button to toggle the visibility of the search bar
@@ -537,12 +546,6 @@ interface HeaderProps {
537
546
  * If the user is authenticated, pass their name and avatar image here
538
547
  */
539
548
  user?: User;
540
- /**
541
- * When enabled, it avoids setting ``document.location.href`` upon link clicks and you will be
542
- * responsible for handling the navigation through the ``onLinkClick`` function.
543
- * This enables soft navigation for apps that want to support it.
544
- */
545
- preventHardNavigation?: boolean;
546
549
  }
547
550
  /**
548
551
  * This is the default header for Sequencing.