@pantheon-systems/pds-toolkit-react 1.0.0-dev.185 → 1.0.0-dev.187
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/components/CTASlice/CTASlice.d.ts +50 -33
- package/_dist/components/PlatformIcon/PlatformIcon.d.ts +11 -12
- package/_dist/components/Stepper/Stepper.d.ts +48 -45
- package/_dist/components/cards/Card/Card.d.ts +28 -29
- package/_dist/components/cards/CardHeading/CardHeading.d.ts +32 -0
- package/_dist/components/cards/SiteCard/SiteCard.d.ts +43 -23
- package/_dist/components/footer/SiteFooter/SiteFooter.d.ts +25 -17
- package/_dist/components/footer/SiteFooter/footer-content.d.ts +2 -0
- package/_dist/components/inputs/Combobox/Combobox.d.ts +4 -4
- package/_dist/components/navigation/DashboardSearch/DashboardSearch.d.ts +62 -61
- package/_dist/components/navigation/DashboardSearch/SiteOptionDisplay.d.ts +34 -9
- package/_dist/components/navigation/TabMenu/TabMenu.d.ts +43 -0
- package/_dist/components/navigation/TabMenu/TabMenuDropdown.d.ts +33 -0
- package/_dist/components/navigation/navigation-types.d.ts +0 -10
- package/_dist/css/component-css/pds-card-heading.css +1 -0
- package/_dist/css/component-css/pds-card.css +1 -1
- package/_dist/css/component-css/pds-index.css +3 -2
- package/_dist/css/component-css/pds-site-card.css +1 -1
- package/_dist/css/component-css/pds-tab-menu.css +2 -0
- package/_dist/css/component-css/pds-tabs.css +1 -1
- package/_dist/css/pds-components.css +3 -2
- package/_dist/index.css +1 -1
- package/_dist/index.d.ts +11 -9
- package/_dist/index.js +4374 -4517
- package/_dist/index.js.map +1 -1
- package/_dist/layouts/FlexContainer/FlexContainer.d.ts +44 -26
- package/_dist/layouts/StepperLayout/StepperLayout.d.ts +16 -12
- package/_dist/libs/components/utility-components.d.ts +1 -1
- package/_dist/libs/types/custom-types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,34 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ContainerWidth, HeadingLevel } from '@libs/types/custom-types';
|
|
3
|
+
import './../buttons/Button/button.css';
|
|
4
|
+
import './cta-slice.css';
|
|
5
|
+
interface CTASliceProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
|
+
/**
|
|
7
|
+
* Background color of slice
|
|
8
|
+
*/
|
|
9
|
+
backgroundColor?: 'default' | 'secondary';
|
|
10
|
+
/**
|
|
11
|
+
* PDS container width.
|
|
12
|
+
*/
|
|
13
|
+
containerWidth?: ContainerWidth;
|
|
14
|
+
/**
|
|
15
|
+
* Heading level
|
|
16
|
+
*/
|
|
17
|
+
headingLevel?: HeadingLevel;
|
|
18
|
+
/**
|
|
19
|
+
* Heading text
|
|
20
|
+
*/
|
|
21
|
+
headingText: string;
|
|
22
|
+
/**
|
|
23
|
+
* Further explain block
|
|
24
|
+
*/
|
|
25
|
+
leadText?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Primary link.
|
|
28
|
+
*/
|
|
29
|
+
primaryLink: {
|
|
30
|
+
text: string;
|
|
31
|
+
url: string;
|
|
32
|
+
target: '_self' | '_blank';
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Optional secondary link
|
|
36
|
+
*/
|
|
37
|
+
secondaryLink?: {
|
|
38
|
+
text: string;
|
|
39
|
+
url: string;
|
|
40
|
+
target: '_self' | '_blank';
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Additional class names
|
|
44
|
+
*/
|
|
45
|
+
className?: string;
|
|
31
46
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
47
|
+
/**
|
|
48
|
+
* CTA Slice UI component
|
|
49
|
+
*/
|
|
50
|
+
export declare const CTASlice: ({ backgroundColor, containerWidth, headingLevel, headingText, leadText, primaryLink, secondaryLink, className, ...props }: CTASliceProps) => React.JSX.Element;
|
|
51
|
+
export {};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
namespace propTypes {
|
|
8
|
-
let platformType: PropTypes.Requireable<string>;
|
|
9
|
-
let className: PropTypes.Requireable<string>;
|
|
10
|
-
}
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './platform-icon.css';
|
|
3
|
+
type PlatformType = 'drupal' | 'drupal7' | 'front-end-sites' | 'gatsby' | 'gatsby-wp' | 'import-custom' | 'next' | 'next-drupal' | 'next-wp' | 'wordpress';
|
|
4
|
+
interface PlatformIconProps extends ComponentPropsWithoutRef<'div'> {
|
|
5
|
+
platformType: PlatformType;
|
|
6
|
+
className?: string;
|
|
11
7
|
}
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
/**
|
|
9
|
+
* PlatformIcon UI component
|
|
10
|
+
*/
|
|
11
|
+
export declare const PlatformIcon: ({ platformType, className, ...props }: PlatformIconProps) => React.JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -1,46 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* Id for the step.
|
|
25
|
-
*/
|
|
26
|
-
id: PropTypes.Requireable<string>;
|
|
27
|
-
/**
|
|
28
|
-
* If the step is the current active step.
|
|
29
|
-
*/
|
|
30
|
-
isCurrent: PropTypes.Requireable<boolean>;
|
|
31
|
-
/**
|
|
32
|
-
* The label for the step.
|
|
33
|
-
*/
|
|
34
|
-
label: PropTypes.Validator<string>;
|
|
35
|
-
}>[]>;
|
|
36
|
-
let translatableLabels: PropTypes.Requireable<PropTypes.InferProps<{
|
|
37
|
-
step: PropTypes.Requireable<string>;
|
|
38
|
-
completed: PropTypes.Requireable<string>;
|
|
39
|
-
hasError: PropTypes.Requireable<string>;
|
|
40
|
-
next: PropTypes.Requireable<string>;
|
|
41
|
-
}>>;
|
|
42
|
-
let className: PropTypes.Requireable<string>;
|
|
43
|
-
}
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './stepper.css';
|
|
3
|
+
interface Step {
|
|
4
|
+
/**
|
|
5
|
+
* Callback function to return to a previously completed step.
|
|
6
|
+
*/
|
|
7
|
+
callback?: (step: Step) => void;
|
|
8
|
+
/**
|
|
9
|
+
* If the step has an error.
|
|
10
|
+
*/
|
|
11
|
+
hasError?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Id for the step.
|
|
14
|
+
*/
|
|
15
|
+
id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* If the step is the current active step.
|
|
18
|
+
*/
|
|
19
|
+
isCurrent?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The label for the step.
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
44
24
|
}
|
|
45
|
-
|
|
46
|
-
|
|
25
|
+
interface TranslatableLabels {
|
|
26
|
+
step: string;
|
|
27
|
+
completed: string;
|
|
28
|
+
hasError: string;
|
|
29
|
+
next: string;
|
|
30
|
+
}
|
|
31
|
+
interface StepperProps extends ComponentPropsWithoutRef<'div'> {
|
|
32
|
+
/**
|
|
33
|
+
* An array of step objects
|
|
34
|
+
*/
|
|
35
|
+
steps: Step[];
|
|
36
|
+
/**
|
|
37
|
+
* Translatable strings for visually-hidden text.
|
|
38
|
+
*/
|
|
39
|
+
translatableLabels?: TranslatableLabels;
|
|
40
|
+
/**
|
|
41
|
+
* Additional class names
|
|
42
|
+
*/
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Stepper UI component
|
|
47
|
+
*/
|
|
48
|
+
export declare const Stepper: ({ steps, translatableLabels, className, ...props }: StepperProps) => React.JSX.Element;
|
|
49
|
+
export {};
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
let secondaryLink: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
26
|
-
let className: PropTypes.Requireable<string>;
|
|
27
|
-
}
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { GridGapOptions } from '@layouts/layout-types';
|
|
3
|
+
import './card.css';
|
|
4
|
+
export type CardBackground = 'default' | 'transparent';
|
|
5
|
+
/**
|
|
6
|
+
* Prop types for Card
|
|
7
|
+
*/
|
|
8
|
+
export interface CardProps extends ComponentPropsWithoutRef<'div'> {
|
|
9
|
+
/**
|
|
10
|
+
* Background color or gradient for the card.
|
|
11
|
+
*/
|
|
12
|
+
background?: CardBackground;
|
|
13
|
+
/**
|
|
14
|
+
* Child elements to be assigned to named slots.
|
|
15
|
+
*/
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Relative padding for the `main` slot.
|
|
19
|
+
*/
|
|
20
|
+
padding?: GridGapOptions;
|
|
21
|
+
/**
|
|
22
|
+
* Additional class names
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
28
25
|
}
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Card UI component
|
|
28
|
+
*/
|
|
29
|
+
export declare const Card: ({ background, children, padding, className, ...props }: CardProps) => React.JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HeadingLevel } from '@libs/types/custom-types';
|
|
3
|
+
import './card-heading.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for CardHeading
|
|
6
|
+
*/
|
|
7
|
+
export interface CardHeadingProps {
|
|
8
|
+
/**
|
|
9
|
+
* Font size of the heading. Default is `XL`.
|
|
10
|
+
*/
|
|
11
|
+
fontSize?: 'L' | 'XL';
|
|
12
|
+
/**
|
|
13
|
+
* Font weight of the heading. Default is `bold`.
|
|
14
|
+
*/
|
|
15
|
+
fontWeight?: 'bold' | 'semibold';
|
|
16
|
+
/**
|
|
17
|
+
* Heading level or `span`.
|
|
18
|
+
*/
|
|
19
|
+
level?: HeadingLevel;
|
|
20
|
+
/**
|
|
21
|
+
* Heading text.
|
|
22
|
+
*/
|
|
23
|
+
text?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Additional class names
|
|
26
|
+
*/
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* CardHeading UI component
|
|
31
|
+
*/
|
|
32
|
+
export declare const CardHeading: ({ fontSize, fontWeight, level, text, className, ...props }: CardHeadingProps) => React.JSX.Element;
|
|
@@ -1,25 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { HeadingLevel } from '@libs/types/custom-types';
|
|
3
|
+
import { SiteStatus } from '@libs/types/custom-types';
|
|
4
|
+
import './site-card.css';
|
|
5
|
+
/**
|
|
6
|
+
* Prop types for SiteCard
|
|
7
|
+
*/
|
|
8
|
+
export interface SiteCardProps extends ComponentPropsWithoutRef<'div'> {
|
|
9
|
+
/**
|
|
10
|
+
* Translatable text for the "Go to" link.
|
|
11
|
+
*/
|
|
4
12
|
gotoText?: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Heading level of the card title.
|
|
15
|
+
*/
|
|
16
|
+
headingLevel?: HeadingLevel;
|
|
17
|
+
/**
|
|
18
|
+
* Image URL for the site.
|
|
19
|
+
*/
|
|
20
|
+
siteImage?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Link to the site dashboard.
|
|
23
|
+
*/
|
|
24
|
+
siteLink: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* Name of the site.
|
|
27
|
+
*/
|
|
28
|
+
siteName?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Plan of the site.
|
|
31
|
+
*/
|
|
32
|
+
sitePlan?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Status of the site.
|
|
35
|
+
*/
|
|
36
|
+
siteStatus?: SiteStatus;
|
|
37
|
+
/**
|
|
38
|
+
* Additional class names
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
23
41
|
}
|
|
24
|
-
|
|
25
|
-
|
|
42
|
+
/**
|
|
43
|
+
* SiteCard UI component
|
|
44
|
+
*/
|
|
45
|
+
export declare const SiteCard: ({ gotoText, headingLevel, siteImage, siteLink, siteName, sitePlan, siteStatus, className, ...props }: SiteCardProps) => React.JSX.Element;
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ContainerWidth } from '@libs/types/custom-types';
|
|
3
|
+
import './site-footer.css';
|
|
4
|
+
interface SiteFooterProps extends ComponentPropsWithoutRef<'footer'> {
|
|
5
|
+
/**
|
|
6
|
+
* PDS container width.
|
|
7
|
+
*/
|
|
8
|
+
containerWidth?: ContainerWidth;
|
|
9
|
+
/**
|
|
10
|
+
* Footer content.
|
|
11
|
+
*/
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Legal policy links.
|
|
15
|
+
*/
|
|
16
|
+
legalLinks?: Array<'privacy' | 'dataSubjectRequest' | 'cookiePolicy' | 'termsOfUse' | 'acceptableUse' | 'accessibilityStatement'>;
|
|
17
|
+
/**
|
|
18
|
+
* Additional class names
|
|
19
|
+
*/
|
|
20
|
+
className?: string;
|
|
15
21
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
22
|
+
/**
|
|
23
|
+
* SiteFooter UI component
|
|
24
|
+
*/
|
|
25
|
+
export declare const SiteFooter: ({ containerWidth, children, legalLinks, className, ...props }: SiteFooterProps) => React.JSX.Element;
|
|
26
|
+
export {};
|
|
@@ -2,10 +2,10 @@ import React, { ChangeEvent, ComponentPropsWithoutRef, FocusEvent, ReactNode } f
|
|
|
2
2
|
import { ValidationStatus } from '../input-types';
|
|
3
3
|
import './combobox.css';
|
|
4
4
|
type LabelStrings = {
|
|
5
|
-
clearButton
|
|
6
|
-
inputInstructions
|
|
7
|
-
searchShortcut
|
|
8
|
-
triggerButton
|
|
5
|
+
clearButton?: string;
|
|
6
|
+
inputInstructions?: string;
|
|
7
|
+
searchShortcut?: string;
|
|
8
|
+
triggerButton?: string;
|
|
9
9
|
};
|
|
10
10
|
export type ComboboxOption = {
|
|
11
11
|
label: string;
|
|
@@ -1,69 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { SiteOption } from './SiteOptionDisplay';
|
|
3
|
+
import './dashboard-search.css';
|
|
4
|
+
type LabelStrings = {
|
|
5
|
+
clearButton?: string;
|
|
6
|
+
inputInstructions?: string;
|
|
7
|
+
openSearchButton?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Prop types for DashboardSearch
|
|
11
|
+
*/
|
|
12
|
+
export interface DashboardSearchProps extends ComponentPropsWithoutRef<'div'> {
|
|
13
|
+
/**
|
|
14
|
+
* Is the search input disabled?
|
|
15
|
+
*/
|
|
3
16
|
disabled?: boolean;
|
|
4
|
-
|
|
17
|
+
/**
|
|
18
|
+
* ID for the component.
|
|
19
|
+
*/
|
|
20
|
+
id?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Is the site data still loading?
|
|
23
|
+
*/
|
|
5
24
|
isLoading?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Label for the input. Will be rendered as an aria-label.
|
|
27
|
+
*/
|
|
6
28
|
label?: string;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Translation strings for various labels or other visually-hidden text.
|
|
31
|
+
*/
|
|
32
|
+
labelStrings?: LabelStrings;
|
|
33
|
+
/**
|
|
34
|
+
* Text to display when site options are still loading.
|
|
35
|
+
*/
|
|
12
36
|
loadingText?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Text to display when no results are found.
|
|
39
|
+
*/
|
|
13
40
|
noResultsText?: string;
|
|
14
|
-
|
|
15
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Optional callback function when the search input field is focused.
|
|
43
|
+
*/
|
|
44
|
+
onFocus?: () => void;
|
|
45
|
+
/**
|
|
46
|
+
* Callback when an option is selected. Returns the selected option object.
|
|
47
|
+
*/
|
|
48
|
+
onOptionSelect?: (option: SiteOption) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Optional placeholder text to display when the input field is empty.
|
|
51
|
+
*/
|
|
16
52
|
placeholder?: string;
|
|
17
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Array of sites to search through.
|
|
55
|
+
*/
|
|
56
|
+
siteList?: SiteOption[];
|
|
57
|
+
/**
|
|
58
|
+
* Offset for the starting right position for the search input in rems.
|
|
59
|
+
*/
|
|
18
60
|
horizontalOffset?: number;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
let disabled: PropTypes.Requireable<boolean>;
|
|
24
|
-
let id: PropTypes.Requireable<string>;
|
|
25
|
-
let isLoading: PropTypes.Requireable<boolean>;
|
|
26
|
-
let label: PropTypes.Requireable<string>;
|
|
27
|
-
let labelStrings: PropTypes.Requireable<PropTypes.InferProps<{
|
|
28
|
-
/**
|
|
29
|
-
* Clear button label
|
|
30
|
-
*/
|
|
31
|
-
clearButton: PropTypes.Requireable<string>;
|
|
32
|
-
/**
|
|
33
|
-
* Input instructions
|
|
34
|
-
*/
|
|
35
|
-
inputInstructions: PropTypes.Requireable<string>;
|
|
36
|
-
/**
|
|
37
|
-
* Open search button label
|
|
38
|
-
*/
|
|
39
|
-
openSearchButton: PropTypes.Requireable<string>;
|
|
40
|
-
}>>;
|
|
41
|
-
let loadingText: PropTypes.Requireable<string>;
|
|
42
|
-
let noResultsText: PropTypes.Requireable<string>;
|
|
43
|
-
let onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
44
|
-
let onOptionSelect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
45
|
-
let placeholder: PropTypes.Requireable<string>;
|
|
46
|
-
let siteList: PropTypes.Requireable<PropTypes.InferProps<{
|
|
47
|
-
/**
|
|
48
|
-
* Site ID
|
|
49
|
-
*/
|
|
50
|
-
id: PropTypes.Requireable<string>;
|
|
51
|
-
/**
|
|
52
|
-
* Site name.
|
|
53
|
-
*/
|
|
54
|
-
name: PropTypes.Requireable<string>;
|
|
55
|
-
/**
|
|
56
|
-
* Site status
|
|
57
|
-
*/
|
|
58
|
-
status: PropTypes.Requireable<string>;
|
|
59
|
-
/**
|
|
60
|
-
* Site type
|
|
61
|
-
*/
|
|
62
|
-
type: PropTypes.Requireable<string>;
|
|
63
|
-
}>[]>;
|
|
64
|
-
let horizontalOffset: PropTypes.Requireable<number>;
|
|
65
|
-
let className: PropTypes.Requireable<string>;
|
|
66
|
-
}
|
|
61
|
+
/**
|
|
62
|
+
* Additional class names
|
|
63
|
+
*/
|
|
64
|
+
className?: string;
|
|
67
65
|
}
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
/**
|
|
67
|
+
* DashboardSearch UI component
|
|
68
|
+
*/
|
|
69
|
+
export declare const DashboardSearch: ({ disabled, id, isLoading, label, labelStrings, loadingText, noResultsText, onFocus, onOptionSelect, placeholder, siteList, horizontalOffset, className, ...props }: DashboardSearchProps) => React.JSX.Element;
|
|
70
|
+
export {};
|
|
@@ -1,10 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { SiteStatus } from '@libs/types/custom-types';
|
|
3
|
+
export type SiteOption = {
|
|
4
|
+
/**
|
|
5
|
+
* Machine name of the site.
|
|
6
|
+
*/
|
|
7
|
+
machineName?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Name of the site.
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* Site active status.
|
|
14
|
+
*/
|
|
15
|
+
status?: SiteStatus;
|
|
16
|
+
/**
|
|
17
|
+
* Site type.
|
|
18
|
+
*/
|
|
19
|
+
type?: 'drupal' | 'wordpress' | 'gatsby' | 'nextjs';
|
|
20
|
+
};
|
|
21
|
+
/** Site option display props. */
|
|
22
|
+
export interface SiteOptionDisplayProps extends ComponentPropsWithoutRef<'div'> {
|
|
23
|
+
/**
|
|
24
|
+
* Site option to display.
|
|
25
|
+
*/
|
|
26
|
+
option: SiteOption;
|
|
27
|
+
/**
|
|
28
|
+
* Additional class names
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
8
31
|
}
|
|
9
|
-
|
|
10
|
-
|
|
32
|
+
/**
|
|
33
|
+
* UI component to display site options.
|
|
34
|
+
*/
|
|
35
|
+
export declare const SiteOptionDisplay: ({ option, className, ...props }: SiteOptionDisplayProps) => React.JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { PDSIcon } from '@components/Icon/Icon';
|
|
3
|
+
import { TabMenuDropdownProps } from './TabMenuDropdown';
|
|
4
|
+
import { NavigationItem } from '@components/navigation/navigation-types';
|
|
5
|
+
import './tab-menu.css';
|
|
6
|
+
type DropdownSettings = Omit<TabMenuDropdownProps, 'links'>;
|
|
7
|
+
export type TabMenuItemProps = NavigationItem & {
|
|
8
|
+
/**
|
|
9
|
+
* Settings for dropdown menu. Leave null if no dropdown is needed.
|
|
10
|
+
*/
|
|
11
|
+
dropdownSettings?: DropdownSettings;
|
|
12
|
+
/**
|
|
13
|
+
* Icon to display next to the link content.
|
|
14
|
+
*/
|
|
15
|
+
icon?: PDSIcon;
|
|
16
|
+
/**
|
|
17
|
+
* Promote active child link to the top level.
|
|
18
|
+
* If true, the top-level menu will display the active child link instead of the parent link. If using this approach, it is recommended to also include the parent link as the first child link.
|
|
19
|
+
*/
|
|
20
|
+
promoteActiveChildLink?: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Prop types for TabMenu.
|
|
24
|
+
*/
|
|
25
|
+
export interface TabMenuProps extends ComponentPropsWithoutRef<'nav'> {
|
|
26
|
+
/**
|
|
27
|
+
* Aria label for the navigation.
|
|
28
|
+
*/
|
|
29
|
+
ariaLabel: string;
|
|
30
|
+
/**
|
|
31
|
+
* Menu items to render.
|
|
32
|
+
*/
|
|
33
|
+
menuItems?: TabMenuItemProps[];
|
|
34
|
+
/**
|
|
35
|
+
* Additional class names
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* TabMenu UI component.
|
|
41
|
+
*/
|
|
42
|
+
export declare const TabMenu: ({ ariaLabel, menuItems, className, ...props }: TabMenuProps) => React.JSX.Element;
|
|
43
|
+
export {};
|