@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
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import React, { PropsWithChildren, ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
+
type CustomLink = {
|
|
4
|
+
label: string;
|
|
5
|
+
url?: string;
|
|
6
|
+
onClick?: (url?: string) => void;
|
|
7
|
+
};
|
|
3
8
|
interface LinkProps {
|
|
4
9
|
/** Custom css class to customize the stylings */
|
|
5
10
|
customClass?: string;
|
|
@@ -20,12 +25,12 @@ interface LinkProps {
|
|
|
20
25
|
variant?: "primary" | "secondary";
|
|
21
26
|
/** Called when a click is performed. It receives the href set on the ``href`` property.
|
|
22
27
|
* Use this handler to perform SPA navigation with you framework's router system.
|
|
23
|
-
* The returned ``href`` property is a convenient way to avoid rewriting the ``href`` property
|
|
24
|
-
*
|
|
25
|
-
* Example using React Router:
|
|
28
|
+
* The returned ``href`` property is a convenient way to avoid rewriting the ``href`` property
|
|
29
|
+
* when navigating. Example using React Router:
|
|
26
30
|
* `import { useNavigate } from 'react-router';`
|
|
27
31
|
* `const navigate = useNavigate();`
|
|
28
|
-
* `return <Link href="/some-url" onClick={
|
|
32
|
+
* `return <Link href="/some-url" onClick={navigate}>Navigate</Link>`
|
|
33
|
+
* The second returned argument is the native click event.
|
|
29
34
|
*/
|
|
30
35
|
onClick?: (href: string, event?: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
31
36
|
/**
|
|
@@ -50,7 +55,7 @@ interface LinkProps {
|
|
|
50
55
|
* Passed ``children`` will be rendered inside the anchor tag.
|
|
51
56
|
*
|
|
52
57
|
*/
|
|
53
|
-
declare const Link
|
|
58
|
+
declare const Link: ({ hint, href, children, selected, customClass, variant, onClick, onMouseEnter, onMouseLeave, }: PropsWithChildren<LinkProps>) => React.JSX.Element;
|
|
54
59
|
|
|
55
60
|
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
56
61
|
/** Custom css class to customize the stylings */
|
|
@@ -94,24 +99,35 @@ interface DropdownFunctions {
|
|
|
94
99
|
close: () => void;
|
|
95
100
|
}
|
|
96
101
|
interface DropdownProps {
|
|
102
|
+
/**
|
|
103
|
+
* The start point of the dropdown content when it's open.
|
|
104
|
+
* Default: ``left``
|
|
105
|
+
*/
|
|
106
|
+
anchorPoint?: 'left' | 'right';
|
|
97
107
|
/** Custom css class to customize the stylings */
|
|
98
108
|
customClass?: string;
|
|
99
109
|
/**
|
|
100
110
|
* Use it if you needs to change cared icon. Use icon in down state and component will automatically rotate it
|
|
101
|
-
|
|
111
|
+
*/
|
|
102
112
|
customCaretDownIconSrc?: string;
|
|
113
|
+
/** Custom css class to customize the content rendered inside the dropdown */
|
|
114
|
+
customContentClass?: string;
|
|
115
|
+
/** Custom css class to customize the stylings of the toggle button */
|
|
116
|
+
customToggleButtonClass?: string;
|
|
103
117
|
/**
|
|
104
118
|
* Defines if clicking outside of the button toggle or the dropdown content
|
|
105
119
|
* should hide the floating container.
|
|
106
120
|
* Default: ``true``
|
|
107
121
|
*/
|
|
108
122
|
dismissOnClickOutside?: boolean;
|
|
123
|
+
/** Hides the default caret icon. It has precedence over any passed `customCaretDownIconSrc` */
|
|
124
|
+
hideCaret?: boolean;
|
|
109
125
|
/** The hint to be displayed when hovering over the toggle button */
|
|
110
126
|
hint?: string;
|
|
111
127
|
/** The icon to be used as a left adornment of the toggle button */
|
|
112
128
|
icon?: string;
|
|
113
129
|
/** The label of the toggle button */
|
|
114
|
-
label
|
|
130
|
+
label?: string;
|
|
115
131
|
/**
|
|
116
132
|
* The look and feel of the toggle button.
|
|
117
133
|
* Default: ``primary``
|
|
@@ -362,6 +378,39 @@ interface DatePickerProps {
|
|
|
362
378
|
}
|
|
363
379
|
declare const DatePicker: (props: DatePickerProps) => React.JSX.Element;
|
|
364
380
|
|
|
381
|
+
interface PageSelectorProps {
|
|
382
|
+
/**
|
|
383
|
+
* If pageLinks' length is greater than this value, only mobile views, a fly over menu will appear
|
|
384
|
+
* to provide easier access to all the links.
|
|
385
|
+
* Default: ``10``
|
|
386
|
+
*/
|
|
387
|
+
minimumLinksToDisplayFlyOverMenu?: number;
|
|
388
|
+
/**
|
|
389
|
+
* Array of `CustomLink` to work as page selectors
|
|
390
|
+
* @see {@link CustomLink}
|
|
391
|
+
*/
|
|
392
|
+
pageLinks: CustomLink[];
|
|
393
|
+
/**
|
|
394
|
+
* The index of the selected `pageLink`. This item will appear in a `selected` state.
|
|
395
|
+
* The look and feel of the item is determined by the `variant`.
|
|
396
|
+
* Default: ``0``
|
|
397
|
+
*/
|
|
398
|
+
selectedIndex?: number;
|
|
399
|
+
/**
|
|
400
|
+
* The look and feel of the selectors.
|
|
401
|
+
* Default: ``primary``
|
|
402
|
+
*/
|
|
403
|
+
variant?: 'primary' | 'secondary';
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* The Page Selector component is similar to the `TabMenu` component, but it's designed to work as a page navigator,
|
|
407
|
+
* unlike the TabMenu that is designed to switch between views. This component will render the given `pageLinks`
|
|
408
|
+
* as HTML links, triggering their `onClick` callbacks upon clicks. Use it to perform SPA or hard navigation
|
|
409
|
+
* based on your framework. Link labels longer than ~30 characters will be trimmed down in both the selector bar and
|
|
410
|
+
* the fly over menu.
|
|
411
|
+
*/
|
|
412
|
+
declare const PageSelector: ({ pageLinks, selectedIndex, variant, minimumLinksToDisplayFlyOverMenu, }: PageSelectorProps) => React.JSX.Element;
|
|
413
|
+
|
|
365
414
|
interface PopoverContentProps {
|
|
366
415
|
/** Title of the popover */
|
|
367
416
|
title?: string;
|
|
@@ -515,11 +564,6 @@ interface HeaderProps {
|
|
|
515
564
|
*/
|
|
516
565
|
declare const Header: React.ForwardRefExoticComponent<HeaderProps & React.RefAttributes<HeaderFunctions>>;
|
|
517
566
|
|
|
518
|
-
type Link = {
|
|
519
|
-
label: string;
|
|
520
|
-
url?: string;
|
|
521
|
-
onClick?: (url?: string) => void;
|
|
522
|
-
};
|
|
523
567
|
interface FooterProps {
|
|
524
568
|
/** Optional app version to render on hover over the copyright text */
|
|
525
569
|
appVersion?: string;
|
|
@@ -529,7 +573,7 @@ interface FooterProps {
|
|
|
529
573
|
*/
|
|
530
574
|
onLinkClick?: (url?: string) => void;
|
|
531
575
|
/** Links to be rendered on the right-bottom edge of the component. */
|
|
532
|
-
policiesLinks:
|
|
576
|
+
policiesLinks: CustomLink[];
|
|
533
577
|
/**
|
|
534
578
|
* The main links that will be rendered as columns. If you pass a custom `onClick` function to the link,
|
|
535
579
|
* it will override the top-level `onLinkClick`.
|
|
@@ -537,7 +581,7 @@ interface FooterProps {
|
|
|
537
581
|
*/
|
|
538
582
|
linkGroups: {
|
|
539
583
|
title: string;
|
|
540
|
-
links:
|
|
584
|
+
links: CustomLink[];
|
|
541
585
|
}[];
|
|
542
586
|
}
|
|
543
587
|
/**
|
|
@@ -550,4 +594,4 @@ interface FooterProps {
|
|
|
550
594
|
*/
|
|
551
595
|
declare const Footer: ({ appVersion, linkGroups, onLinkClick, policiesLinks }: FooterProps) => React.JSX.Element;
|
|
552
596
|
|
|
553
|
-
export { Accordion, AccordionProps, AppBar, AppBarProps, Button, ButtonProps, DatePicker, DatePickerProps, Dropdown, DropdownFunctions, DropdownProps, Footer, Header, HeaderFunctions, HeaderLinkData, HeaderProps, Link
|
|
597
|
+
export { Accordion, AccordionProps, AppBar, AppBarProps, Button, ButtonProps, DatePicker, DatePickerProps, Dropdown, DropdownFunctions, DropdownProps, Footer, Header, HeaderFunctions, HeaderLinkData, HeaderProps, Link, LinkProps, Modal, ModalProps, PageSelector, Popover, PopoverContent, PopoverContentProps, PopoverProps, Spinner, SpinnerProps, TabMenu, TabMenuProps, TextField, TextFieldProps };
|