@sequencing/design-system 1.0.62 → 1.0.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.
- package/dist/documentation.json +60 -60
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Organisms/Header/Header.d.ts +38 -39
- package/dist/esm/types/components/Organisms/Header/_components/HeaderChip/HeaderChip.d.ts +1 -1
- package/dist/esm/types/components/Organisms/Header/_components/HeaderLink/HeaderLink.d.ts +25 -0
- package/dist/esm/types/components/Organisms/Header/_components/HeaderLinkDropdown/HeaderLinkDropdown.d.ts +2 -24
- package/dist/esm/types/components/Organisms/Header/_components/HeaderLinkSection/HeaderLinkSection.d.ts +7 -3
- package/dist/esm/types/components/Organisms/index.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +61 -63
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/components/Organisms/Header/Header.d.ts +38 -39
- package/dist/types/components/Organisms/Header/_components/HeaderChip/HeaderChip.d.ts +1 -1
- package/dist/types/components/Organisms/Header/_components/HeaderLink/HeaderLink.d.ts +25 -0
- package/dist/types/components/Organisms/Header/_components/HeaderLinkDropdown/HeaderLinkDropdown.d.ts +2 -24
- package/dist/types/components/Organisms/Header/_components/HeaderLinkSection/HeaderLinkSection.d.ts +7 -3
- package/dist/types/components/Organisms/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -476,30 +476,6 @@ interface PopoverProps {
|
|
|
476
476
|
*/
|
|
477
477
|
declare const Popover: (props: PopoverProps) => React.JSX.Element;
|
|
478
478
|
|
|
479
|
-
interface HeaderLinkData {
|
|
480
|
-
/** Link path. Ignored if ``items`` prop is non-empty */
|
|
481
|
-
path: string;
|
|
482
|
-
/** Link label. */
|
|
483
|
-
label: string;
|
|
484
|
-
/** Custom classname. */
|
|
485
|
-
className?: string;
|
|
486
|
-
/** Custom onClick, takes priority over main onLinkClick prop. */
|
|
487
|
-
onClick?: (url: string) => void;
|
|
488
|
-
/** A list of nested link objects. */
|
|
489
|
-
items?: Array<{
|
|
490
|
-
/** Absolute URL, used for outside links. Will be ignored if ``path`` prop is non-empty. */
|
|
491
|
-
url?: string;
|
|
492
|
-
/** Relative URL, used for links with the app. Takes precedence over ``url`` prop. */
|
|
493
|
-
path?: string;
|
|
494
|
-
/** Link label. */
|
|
495
|
-
label: string;
|
|
496
|
-
/** Custom classname. */
|
|
497
|
-
className?: string;
|
|
498
|
-
/** Custom onClick, takes priority over main onLinkClick prop. */
|
|
499
|
-
onClick?: (url: string) => void;
|
|
500
|
-
}>;
|
|
501
|
-
}
|
|
502
|
-
|
|
503
479
|
interface User {
|
|
504
480
|
name: string;
|
|
505
481
|
avatarImageUrl?: string;
|
|
@@ -508,11 +484,6 @@ interface HeaderFunctions {
|
|
|
508
484
|
closeMobileMenu: () => void;
|
|
509
485
|
}
|
|
510
486
|
interface HeaderProps {
|
|
511
|
-
/**
|
|
512
|
-
* A React node with the links to be rendered on the right side of the header,
|
|
513
|
-
* it will be rendered after the search bar toggle button (if provided)
|
|
514
|
-
*/
|
|
515
|
-
auxiliaryLinks?: ReactNode | HeaderLinkData[];
|
|
516
487
|
/**
|
|
517
488
|
* A React node with an optional banner to be rendered above the header.
|
|
518
489
|
* The total header height is dynamic calculated and includes the banner's height
|
|
@@ -521,32 +492,28 @@ interface HeaderProps {
|
|
|
521
492
|
/** Custom css class to customize the stylings */
|
|
522
493
|
customClass?: string;
|
|
523
494
|
/**
|
|
524
|
-
*
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
*
|
|
533
|
-
* - A button to toggle the visibility of the search bar
|
|
534
|
-
* - A div with the search bar implementation
|
|
535
|
-
*/
|
|
536
|
-
searchComponent?: ReactNode;
|
|
537
|
-
/**
|
|
538
|
-
* If the user is authenticated, pass their name and avatar image here,
|
|
539
|
-
* otherwise, `loggedOutButton` will be displayed instead.
|
|
495
|
+
* The URL of the site's home page. It will be used when the user clicks on the site's logo.
|
|
496
|
+
*
|
|
497
|
+
* PLEASE NOTE: If you want to use the SOFT navigation from your framework (React, NextJs, etc), you should
|
|
498
|
+
* path the `onRequestHomePage` prop and call the navigation method in the callback.
|
|
499
|
+
* e.g. for NextJs `onRequestHomePage={(url) => router.push(url)}`
|
|
500
|
+
* WARNING: Do not change or modify url argument inside your callback, because you will have undocumented behavior
|
|
501
|
+
* with your navigation. Your goal is only call the navigation method with the url argument.
|
|
502
|
+
* Default value is `/`.
|
|
503
|
+
* Without the `onRequestHomePage` prop, the component will use the default behavior of the anchor tag.
|
|
540
504
|
*/
|
|
541
|
-
|
|
505
|
+
homePageUrl?: string;
|
|
542
506
|
/** Displays loading skeleton animation when set to `true` */
|
|
543
507
|
isLoading?: boolean;
|
|
544
|
-
/**
|
|
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 */
|
|
545
511
|
numberOfSkeletonLinks?: number;
|
|
546
|
-
/**
|
|
512
|
+
/** Link clicks callback. Use it together with ``preventHardNavigation``
|
|
513
|
+
* to support different routers (Next, react-router-dom, etc.).
|
|
514
|
+
* NOTE: When ``preventHardNavigation`` is disabled, it has no effect.
|
|
515
|
+
*/
|
|
547
516
|
onLinkClick?: (url: string) => void;
|
|
548
|
-
/** Called when an authenticated user clicks on the Sign Out button inside the main right HeaderChip */
|
|
549
|
-
onRequestSignOut?: () => void;
|
|
550
517
|
/**
|
|
551
518
|
* Called when a user clicks on the site's logo, provide url argument to callback.
|
|
552
519
|
* Typically used to make soft navigation in your framework (React, NextJs, etc).
|
|
@@ -554,20 +521,28 @@ interface HeaderProps {
|
|
|
554
521
|
* url argument is the `homePageUrl` prop value.
|
|
555
522
|
*/
|
|
556
523
|
onRequestHomePage?: (url: string) => void;
|
|
557
|
-
/**
|
|
558
|
-
* The URL of the site's home page. It will be used when the user clicks on the site's logo.
|
|
559
|
-
*
|
|
560
|
-
* PLEASE NOTE: If you want to use the SOFT navigation from your framework (React, NextJs, etc), you should
|
|
561
|
-
* path the `onRequestHomePage` prop and call the navigation method in the callback.
|
|
562
|
-
* e.g. for NextJs `onRequestHomePage={(url) => router.push(url)}`
|
|
563
|
-
* WARNING: Do not change or modify url argument inside your callback, because you will have undocumented behavior
|
|
564
|
-
* with your navigation. Your goal is only call the navigation method with the url argument.
|
|
565
|
-
* Default value is `/`.
|
|
566
|
-
* Without the `onRequestHomePage` prop, the component will use the default behavior of the anchor tag.
|
|
567
|
-
*/
|
|
568
|
-
homePageUrl?: string;
|
|
569
524
|
/** Called when an authenticated user clicks on the My Account link inside the main right HeaderChip */
|
|
570
525
|
onRequestMyAccount?: () => void;
|
|
526
|
+
/** Called when an anonymous user clicks on the Sign In button inside the auxiliary links section */
|
|
527
|
+
onRequestSignIn?: () => void;
|
|
528
|
+
/** Called when an authenticated user clicks on the Sign Out button inside the main right HeaderChip */
|
|
529
|
+
onRequestSignOut?: () => void;
|
|
530
|
+
/**
|
|
531
|
+
* A React node with the search component containing:
|
|
532
|
+
* - A button to toggle the visibility of the search bar
|
|
533
|
+
* - A div with the search bar implementation
|
|
534
|
+
*/
|
|
535
|
+
searchComponent?: ReactNode;
|
|
536
|
+
/**
|
|
537
|
+
* If the user is authenticated, pass their name and avatar image here
|
|
538
|
+
*/
|
|
539
|
+
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;
|
|
571
546
|
}
|
|
572
547
|
/**
|
|
573
548
|
* This is the default header for Sequencing.
|
|
@@ -575,6 +550,7 @@ interface HeaderProps {
|
|
|
575
550
|
* and two group of links. The main links are rendered on the left side of the bar,
|
|
576
551
|
* next to the company's logo and the auxiliary links appear on the right side.
|
|
577
552
|
* On the mobile view, all links appear stacked up in a slidein/slide-out menu.
|
|
553
|
+
* If want to use soft navigation for links, enable the ``preventHardNavigation`` flag.
|
|
578
554
|
* The header is rendered on z-index 5.
|
|
579
555
|
* When logged in, it will render a HeaderChip component with a link to the My Account page
|
|
580
556
|
* and a button for sign-out.
|
|
@@ -582,6 +558,28 @@ interface HeaderProps {
|
|
|
582
558
|
*/
|
|
583
559
|
declare const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HeaderFunctions>>;
|
|
584
560
|
|
|
561
|
+
interface HeaderLink {
|
|
562
|
+
/** Absolute or relative link URL. */
|
|
563
|
+
pathOrUrl?: string;
|
|
564
|
+
/** Link label. */
|
|
565
|
+
label: string;
|
|
566
|
+
/** Custom classname. */
|
|
567
|
+
className?: string;
|
|
568
|
+
/** Custom onClick, takes priority over main onLinkClick prop. */
|
|
569
|
+
onClick?: (url: string) => void;
|
|
570
|
+
/** A list of nested link objects. */
|
|
571
|
+
items?: Array<{
|
|
572
|
+
/** Absolute or relative link URL. */
|
|
573
|
+
pathOrUrl?: string;
|
|
574
|
+
/** Link label. */
|
|
575
|
+
label: string;
|
|
576
|
+
/** Custom classname. */
|
|
577
|
+
className?: string;
|
|
578
|
+
/** Custom onClick, takes priority over main onLinkClick prop. */
|
|
579
|
+
onClick?: (url: string) => void;
|
|
580
|
+
}>;
|
|
581
|
+
}
|
|
582
|
+
|
|
585
583
|
interface FooterProps {
|
|
586
584
|
/** Optional app version to render on hover over the copyright text */
|
|
587
585
|
appVersion?: string;
|
|
@@ -612,4 +610,4 @@ interface FooterProps {
|
|
|
612
610
|
*/
|
|
613
611
|
declare const Footer: ({ appVersion, linkGroups, onLinkClick, policiesLinks }: FooterProps) => React.JSX.Element;
|
|
614
612
|
|
|
615
|
-
export { Accordion, AccordionProps, AppBar, AppBarProps, Button, ButtonProps, DatePicker, DatePickerProps, Dropdown, DropdownFunctions, DropdownProps, Footer, Header, HeaderFunctions,
|
|
613
|
+
export { Accordion, AccordionProps, AppBar, AppBarProps, Button, ButtonProps, DatePicker, DatePickerProps, Dropdown, DropdownFunctions, DropdownProps, Footer, Header, HeaderFunctions, HeaderLink, HeaderProps, Link, LinkProps, Modal, ModalProps, PageSelector, Popover, PopoverContent, PopoverContentProps, PopoverProps, Spinner, SpinnerProps, TabMenu, TabMenuProps, TextField, TextFieldProps };
|