@sequencing/design-system 1.0.48 → 1.0.49
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 +67 -4
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Atoms/Dropdown/Dropdown.d.ts +13 -2
- package/dist/esm/types/components/Atoms/Link/Link.d.ts +9 -4
- package/dist/esm/types/components/Molecules/PageSelector/PageSelector.d.ts +35 -0
- package/dist/esm/types/components/Molecules/index.d.ts +1 -0
- package/dist/esm/types/components/Organisms/Footer/Footer.d.ts +3 -7
- package/dist/index.css +1 -1
- package/dist/index.d.ts +59 -15
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/components/Atoms/Dropdown/Dropdown.d.ts +13 -2
- package/dist/types/components/Atoms/Link/Link.d.ts +9 -4
- package/dist/types/components/Molecules/PageSelector/PageSelector.d.ts +35 -0
- package/dist/types/components/Molecules/index.d.ts +1 -0
- package/dist/types/components/Organisms/Footer/Footer.d.ts +3 -7
- package/package.json +1 -1
|
@@ -4,24 +4,35 @@ export interface DropdownFunctions {
|
|
|
4
4
|
close: () => void;
|
|
5
5
|
}
|
|
6
6
|
export interface DropdownProps {
|
|
7
|
+
/**
|
|
8
|
+
* The start point of the dropdown content when it's open.
|
|
9
|
+
* Default: ``left``
|
|
10
|
+
*/
|
|
11
|
+
anchorPoint?: 'left' | 'right';
|
|
7
12
|
/** Custom css class to customize the stylings */
|
|
8
13
|
customClass?: string;
|
|
9
14
|
/**
|
|
10
15
|
* Use it if you needs to change cared icon. Use icon in down state and component will automatically rotate it
|
|
11
|
-
|
|
16
|
+
*/
|
|
12
17
|
customCaretDownIconSrc?: string;
|
|
18
|
+
/** Custom css class to customize the content rendered inside the dropdown */
|
|
19
|
+
customContentClass?: string;
|
|
20
|
+
/** Custom css class to customize the stylings of the toggle button */
|
|
21
|
+
customToggleButtonClass?: string;
|
|
13
22
|
/**
|
|
14
23
|
* Defines if clicking outside of the button toggle or the dropdown content
|
|
15
24
|
* should hide the floating container.
|
|
16
25
|
* Default: ``true``
|
|
17
26
|
*/
|
|
18
27
|
dismissOnClickOutside?: boolean;
|
|
28
|
+
/** Hides the default caret icon. It has precedence over any passed `customCaretDownIconSrc` */
|
|
29
|
+
hideCaret?: boolean;
|
|
19
30
|
/** The hint to be displayed when hovering over the toggle button */
|
|
20
31
|
hint?: string;
|
|
21
32
|
/** The icon to be used as a left adornment of the toggle button */
|
|
22
33
|
icon?: string;
|
|
23
34
|
/** The label of the toggle button */
|
|
24
|
-
label
|
|
35
|
+
label?: string;
|
|
25
36
|
/**
|
|
26
37
|
* The look and feel of the toggle button.
|
|
27
38
|
* Default: ``primary``
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from "react";
|
|
2
|
+
export type CustomLink = {
|
|
3
|
+
label: string;
|
|
4
|
+
url?: string;
|
|
5
|
+
onClick?: (url?: string) => void;
|
|
6
|
+
};
|
|
2
7
|
export interface LinkProps {
|
|
3
8
|
/** Custom css class to customize the stylings */
|
|
4
9
|
customClass?: string;
|
|
@@ -19,12 +24,12 @@ export interface LinkProps {
|
|
|
19
24
|
variant?: "primary" | "secondary";
|
|
20
25
|
/** Called when a click is performed. It receives the href set on the ``href`` property.
|
|
21
26
|
* Use this handler to perform SPA navigation with you framework's router system.
|
|
22
|
-
* The returned ``href`` property is a convenient way to avoid rewriting the ``href`` property
|
|
23
|
-
*
|
|
24
|
-
* Example using React Router:
|
|
27
|
+
* The returned ``href`` property is a convenient way to avoid rewriting the ``href`` property
|
|
28
|
+
* when navigating. Example using React Router:
|
|
25
29
|
* `import { useNavigate } from 'react-router';`
|
|
26
30
|
* `const navigate = useNavigate();`
|
|
27
|
-
* `return <Link href="/some-url" onClick={
|
|
31
|
+
* `return <Link href="/some-url" onClick={navigate}>Navigate</Link>`
|
|
32
|
+
* The second returned argument is the native click event.
|
|
28
33
|
*/
|
|
29
34
|
onClick?: (href: string, event?: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
30
35
|
/**
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CustomLink } from "../../Atoms/Link/Link";
|
|
3
|
+
interface PageSelectorProps {
|
|
4
|
+
/**
|
|
5
|
+
* If pageLinks' length is greater than this value, only mobile views, a fly over menu will appear
|
|
6
|
+
* to provide easier access to all the links.
|
|
7
|
+
* Default: ``10``
|
|
8
|
+
*/
|
|
9
|
+
minimumLinksToDisplayFlyOverMenu?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Array of `CustomLink` to work as page selectors
|
|
12
|
+
* @see {@link CustomLink}
|
|
13
|
+
*/
|
|
14
|
+
pageLinks: CustomLink[];
|
|
15
|
+
/**
|
|
16
|
+
* The index of the selected `pageLink`. This item will appear in a `selected` state.
|
|
17
|
+
* The look and feel of the item is determined by the `variant`.
|
|
18
|
+
* Default: ``0``
|
|
19
|
+
*/
|
|
20
|
+
selectedIndex?: number;
|
|
21
|
+
/**
|
|
22
|
+
* The look and feel of the selectors.
|
|
23
|
+
* Default: ``primary``
|
|
24
|
+
*/
|
|
25
|
+
variant?: 'primary' | 'secondary';
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The Page Selector component is similar to the `TabMenu` component, but it's designed to work as a page navigator,
|
|
29
|
+
* unlike the TabMenu that is designed to switch between views. This component will render the given `pageLinks`
|
|
30
|
+
* as HTML links, triggering their `onClick` callbacks upon clicks. Use it to perform SPA or hard navigation
|
|
31
|
+
* based on your framework. Link labels longer than ~30 characters will be trimmed down in both the selector bar and
|
|
32
|
+
* the fly over menu.
|
|
33
|
+
*/
|
|
34
|
+
declare const PageSelector: ({ pageLinks, selectedIndex, variant, minimumLinksToDisplayFlyOverMenu, }: PageSelectorProps) => React.JSX.Element;
|
|
35
|
+
export default PageSelector;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as Modal } from "./Modal/Modal";
|
|
2
2
|
export { default as AppBar } from "./AppBar/AppBar";
|
|
3
3
|
export { default as DatePicker } from "./DatePicker/DatePicker";
|
|
4
|
+
export { default as PageSelector } from "./PageSelector/PageSelector";
|
|
4
5
|
export { default as Popover, PopoverContent } from "./Popover/Popover";
|
|
5
6
|
export type { AppBarProps } from "./AppBar/AppBar";
|
|
6
7
|
export type { ModalProps } from "./Modal/Modal";
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type
|
|
3
|
-
label: string;
|
|
4
|
-
url?: string;
|
|
5
|
-
onClick?: (url?: string) => void;
|
|
6
|
-
};
|
|
2
|
+
import { type CustomLink } from '../../Atoms/Link/Link';
|
|
7
3
|
interface FooterProps {
|
|
8
4
|
/** Optional app version to render on hover over the copyright text */
|
|
9
5
|
appVersion?: string;
|
|
@@ -13,7 +9,7 @@ interface FooterProps {
|
|
|
13
9
|
*/
|
|
14
10
|
onLinkClick?: (url?: string) => void;
|
|
15
11
|
/** Links to be rendered on the right-bottom edge of the component. */
|
|
16
|
-
policiesLinks:
|
|
12
|
+
policiesLinks: CustomLink[];
|
|
17
13
|
/**
|
|
18
14
|
* The main links that will be rendered as columns. If you pass a custom `onClick` function to the link,
|
|
19
15
|
* it will override the top-level `onLinkClick`.
|
|
@@ -21,7 +17,7 @@ interface FooterProps {
|
|
|
21
17
|
*/
|
|
22
18
|
linkGroups: {
|
|
23
19
|
title: string;
|
|
24
|
-
links:
|
|
20
|
+
links: CustomLink[];
|
|
25
21
|
}[];
|
|
26
22
|
}
|
|
27
23
|
/**
|