@pantheon-systems/pds-toolkit-react 1.0.0-dev.21 → 1.0.0-dev.211
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/README.md +31 -1
- package/_dist/components/Avatar/Avatar.d.ts +37 -0
- package/_dist/components/BranchDiff/BranchDiff.d.ts +35 -0
- package/_dist/components/CTALink/CTALink.d.ts +20 -0
- package/_dist/components/CTASlice/CTASlice.d.ts +43 -0
- package/_dist/components/Callout/Callout.d.ts +31 -0
- package/_dist/components/Callout/sample-callout-content.d.ts +2 -0
- package/_dist/components/ComparisonList/ComparisonList.d.ts +42 -0
- package/_dist/components/DashboardStat/DashboardStat.d.ts +28 -0
- package/_dist/components/FileDiff/FileDiff.d.ts +35 -0
- package/_dist/components/Heading/Heading.d.ts +15 -0
- package/_dist/components/Icon/Icon.d.ts +674 -0
- package/_dist/components/LinkNewWindow/LinkNewWindow.d.ts +31 -0
- package/_dist/components/Modal/Modal.d.ts +40 -0
- package/_dist/components/Pagination/Pagination.d.ts +54 -0
- package/_dist/components/Pagination/usePagination.d.ts +7 -0
- package/_dist/components/PantheonLogo/PantheonLogo.d.ts +32 -0
- package/_dist/components/PantheonLogo/pantheon-logo-data.d.ts +4 -0
- package/_dist/components/PlatformIcon/PlatformIcon.d.ts +12 -0
- package/_dist/components/Popover/Popover.d.ts +58 -0
- package/_dist/components/PullQuote/PullQuote.d.ts +34 -0
- package/_dist/components/RefreshChecker/RefreshChecker.d.ts +46 -0
- package/_dist/components/SiteDashboardHeading/SiteDashboardHeading.d.ts +28 -0
- package/_dist/components/Skiplink/Skiplink.d.ts +21 -0
- package/_dist/components/SocialLinks/SocialLinks.d.ts +23 -0
- package/_dist/components/StatusIndicator/StatusIndicator.d.ts +20 -0
- package/_dist/components/Stepper/Stepper.d.ts +49 -0
- package/_dist/components/Table/Table.d.ts +27 -0
- package/_dist/components/TableOfContents/TableOfContents.d.ts +45 -0
- package/_dist/components/Tabs/Tabs.d.ts +63 -0
- package/_dist/components/Tag/Tag.d.ts +39 -0
- package/_dist/components/Tooltip/Tooltip.d.ts +51 -0
- package/_dist/components/badges/IndicatorBadge/IndicatorBadge.d.ts +27 -0
- package/_dist/components/badges/StatusBadge/StatusBadge.d.ts +35 -0
- package/_dist/components/badges/Tally/Tally.d.ts +38 -0
- package/_dist/components/buttons/Button/Button.d.ts +62 -0
- package/_dist/components/buttons/ButtonLink/ButtonLink.d.ts +44 -0
- package/_dist/components/buttons/IconButton/IconButton.d.ts +50 -0
- package/_dist/components/buttons/MenuButton/MenuButton.d.ts +75 -0
- package/_dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +58 -0
- package/_dist/components/buttons/SplitButton/SplitButton.d.ts +37 -0
- package/_dist/components/buttons/ToggleButton/ToggleButton.d.ts +39 -0
- package/_dist/components/buttons/UtilityButton/UtilityButton.d.ts +48 -0
- package/_dist/components/cards/Card/Card.d.ts +29 -0
- package/_dist/components/cards/CardHeading/CardHeading.d.ts +32 -0
- package/_dist/components/cards/CardSelectGroup/CardSelectGroup.d.ts +60 -0
- package/_dist/components/cards/LinksCard/LinksCard.d.ts +29 -0
- package/_dist/components/cards/LinksCard/links-card-sample-data.d.ts +2 -0
- package/_dist/components/cards/NewSiteCard/NewSiteCard.d.ts +57 -0
- package/_dist/components/cards/PricingCard/PricingCard.d.ts +90 -0
- package/_dist/components/cards/SiteCard/SiteCard.d.ts +45 -0
- package/_dist/components/footer/FooterHeading/FooterHeading.d.ts +22 -0
- package/_dist/components/footer/FooterLinks/FooterLinks.d.ts +26 -0
- package/_dist/components/footer/SiteFooter/SiteFooter.d.ts +26 -0
- package/_dist/components/footer/SiteFooter/footer-content.d.ts +2 -0
- package/_dist/components/inputs/Checkbox/Checkbox.d.ts +96 -0
- package/_dist/components/inputs/CheckboxFieldset/CheckboxFieldset.d.ts +60 -0
- package/_dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +76 -0
- package/_dist/components/inputs/Combobox/Combobox.d.ts +134 -0
- package/_dist/components/inputs/FileUpload/FileUpload.d.ts +81 -0
- package/_dist/components/inputs/InputGroup/InputGroup.d.ts +19 -0
- package/_dist/components/inputs/RadioGroup/RadioGroup.d.ts +92 -0
- package/_dist/components/inputs/Select/Select.d.ts +118 -0
- package/_dist/components/inputs/Switch/Switch.d.ts +74 -0
- package/_dist/components/inputs/TextInput/TextInput.d.ts +127 -0
- package/_dist/components/inputs/Textarea/Textarea.d.ts +106 -0
- package/_dist/components/inputs/input-types.d.ts +1 -0
- package/_dist/components/inputs/input-utilities.d.ts +90 -0
- package/_dist/components/navigation/Breadcrumb/Breadcrumb.d.ts +23 -0
- package/_dist/components/navigation/DashboardNav/DashboardNav.d.ts +35 -0
- package/_dist/components/navigation/DashboardNav/DashboardNavItem.d.ts +25 -0
- package/_dist/components/navigation/DashboardNav/dashboard-nav-utilities.d.ts +4 -0
- package/_dist/components/navigation/DashboardSearch/DashboardSearch.d.ts +70 -0
- package/_dist/components/navigation/DashboardSearch/SiteOptionDisplay.d.ts +39 -0
- package/_dist/components/navigation/DropdownMenu/DropdownMenu.d.ts +28 -0
- package/_dist/components/navigation/NavMenu/NavMenu.d.ts +43 -0
- package/_dist/components/navigation/NavMenu/NavMenuDropdown.d.ts +24 -0
- package/_dist/components/navigation/Navbar/Navbar.d.ts +60 -0
- package/_dist/components/navigation/SideNav/SideNav.d.ts +47 -0
- package/_dist/components/navigation/SideNavCompact/SideNavCompact.d.ts +47 -0
- package/_dist/components/navigation/TabMenu/TabMenu.d.ts +43 -0
- package/_dist/components/navigation/TabMenu/TabMenuDropdown.d.ts +33 -0
- package/_dist/components/navigation/UserMenu/UserMenu.d.ts +69 -0
- package/_dist/components/navigation/WorkspaceSelector/WorkspaceSelector.d.ts +80 -0
- package/_dist/components/navigation/navigation-types.d.ts +29 -0
- package/_dist/components/navigation/navigation-utilities.d.ts +7 -0
- package/_dist/components/notifications/Banner/Banner.d.ts +47 -0
- package/_dist/components/notifications/InlineMessage/InlineMessage.d.ts +37 -0
- package/_dist/components/notifications/SectionMessage/SectionMessage.d.ts +47 -0
- package/_dist/components/notifications/Toaster/Toast.d.ts +46 -0
- package/_dist/components/notifications/Toaster/Toaster.d.ts +29 -0
- package/_dist/components/notifications/Toaster/useToast.d.ts +13 -0
- package/_dist/components/panels/ExpansionPanel/ExpansionPanel.d.ts +32 -0
- package/_dist/components/panels/ExpansionPanelGroup/ExpansionPanelGroup.d.ts +24 -0
- package/_dist/components/panels/Panel/Panel.d.ts +35 -0
- package/_dist/components/panels/PanelList/PanelList.d.ts +28 -0
- package/_dist/components/panels/PanelList/PanelRow.d.ts +19 -0
- package/_dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +53 -0
- package/_dist/components/progress-indicators/ProgressRing/ProgressRing.d.ts +41 -0
- package/_dist/components/progress-indicators/Spinner/Spinner.d.ts +33 -0
- package/_dist/components/tiles/AvatarTileList/AvatarTileList.d.ts +28 -0
- package/_dist/components/tiles/Tile/Tile.d.ts +42 -0
- package/_dist/components/tiles/TileGrid/TileGrid.d.ts +29 -0
- package/_dist/css/component-css/pds-avatar-tile-list.css +1 -0
- package/_dist/css/component-css/pds-avatar.css +1 -0
- package/_dist/css/component-css/pds-banner.css +1 -0
- package/_dist/css/component-css/pds-branch-diff.css +1 -0
- package/_dist/css/component-css/pds-breadcrumb.css +1 -0
- package/_dist/css/component-css/pds-button-link.css +1 -0
- package/_dist/css/component-css/pds-button.css +81 -0
- package/_dist/css/component-css/pds-callout.css +1 -0
- package/_dist/css/component-css/pds-card-heading.css +1 -0
- package/_dist/css/component-css/pds-card-select-group.css +1 -0
- package/_dist/css/component-css/pds-card.css +1 -0
- package/_dist/css/component-css/pds-checkbox-group.css +1 -0
- package/_dist/css/component-css/pds-checkbox.css +1 -0
- package/_dist/css/component-css/pds-combobox.css +1 -0
- package/_dist/css/component-css/pds-comparison-list.css +1 -0
- package/_dist/css/component-css/pds-cta-link.css +1 -0
- package/_dist/css/component-css/pds-cta-slice.css +1 -0
- package/_dist/css/component-css/pds-dashboard-nav.css +5 -0
- package/_dist/css/component-css/pds-dashboard-search.css +1 -0
- package/_dist/css/component-css/pds-dashboard-stat.css +1 -0
- package/_dist/css/component-css/pds-dropdown-menu.css +2 -0
- package/_dist/css/component-css/pds-expansion-panel-group.css +1 -0
- package/_dist/css/component-css/pds-expansion-panel.css +1 -0
- package/_dist/css/component-css/pds-file-diff.css +1 -0
- package/_dist/css/component-css/pds-file-upload.css +7 -0
- package/_dist/css/component-css/pds-footer-heading.css +1 -0
- package/_dist/css/component-css/pds-footer-links.css +1 -0
- package/_dist/css/component-css/pds-heading.css +1 -0
- package/_dist/css/component-css/pds-icon-button.css +7 -0
- package/_dist/css/component-css/pds-icon-story-only.css +1 -0
- package/_dist/css/component-css/pds-index.css +154 -0
- package/_dist/css/component-css/pds-indicator-badge.css +39 -0
- package/_dist/css/component-css/pds-inline-message.css +1 -0
- package/_dist/css/component-css/pds-input-group.css +1 -0
- package/_dist/css/component-css/pds-input-utilities.css +1 -0
- package/_dist/css/component-css/pds-link-new-window.css +1 -0
- package/_dist/css/component-css/pds-links-card.css +1 -0
- package/_dist/css/component-css/pds-menu-button.css +1 -0
- package/_dist/css/component-css/pds-modal.css +1 -0
- package/_dist/css/component-css/pds-nav-menu.css +7 -0
- package/_dist/css/component-css/pds-navbar.css +1 -0
- package/_dist/css/component-css/pds-new-site-card.css +1 -0
- package/_dist/css/component-css/pds-pagination.css +1 -0
- package/_dist/css/component-css/pds-panel-list.css +1 -0
- package/_dist/css/component-css/pds-panel.css +1 -0
- package/_dist/css/component-css/pds-pantheon-logo.css +1 -0
- package/_dist/css/component-css/pds-platform-icon.css +1 -0
- package/_dist/css/component-css/pds-popover.css +1 -0
- package/_dist/css/component-css/pds-pricing-card-local.css +1 -0
- package/_dist/css/component-css/pds-pricing-card.css +1 -0
- package/_dist/css/component-css/pds-progress-bar.css +1 -0
- package/_dist/css/component-css/pds-progress-ring.css +1 -0
- package/_dist/css/component-css/pds-pull-quote.css +1 -0
- package/_dist/css/component-css/pds-radio-group.css +1 -0
- package/_dist/css/component-css/pds-refresh-checker.css +1 -0
- package/_dist/css/component-css/pds-section-message.css +1 -0
- package/_dist/css/component-css/pds-segmented-button.css +1 -0
- package/_dist/css/component-css/pds-select.css +1 -0
- package/_dist/css/component-css/pds-side-nav-compact.css +1 -0
- package/_dist/css/component-css/pds-side-nav.css +1 -0
- package/_dist/css/component-css/pds-site-card.css +1 -0
- package/_dist/css/component-css/pds-site-dashboard-heading.css +1 -0
- package/_dist/css/component-css/pds-site-footer.css +1 -0
- package/_dist/css/component-css/pds-skiplink.css +1 -0
- package/_dist/css/component-css/pds-social-links.css +1 -0
- package/_dist/css/component-css/pds-spinner.css +1 -0
- package/_dist/css/component-css/pds-split-button.css +2 -0
- package/_dist/css/component-css/pds-status-badge.css +9 -0
- package/_dist/css/component-css/pds-status-indicator.css +1 -0
- package/_dist/css/component-css/pds-stepper.css +1 -0
- package/_dist/css/component-css/pds-switch.css +3 -0
- package/_dist/css/component-css/pds-tab-menu.css +2 -0
- package/_dist/css/component-css/pds-table-of-contents.css +1 -0
- package/_dist/css/component-css/pds-table.css +1 -0
- package/_dist/css/component-css/pds-tabs.css +1 -0
- package/_dist/css/component-css/pds-tag.css +1 -0
- package/_dist/css/component-css/pds-tally.css +1 -0
- package/_dist/css/component-css/pds-text-input.css +1 -0
- package/_dist/css/component-css/pds-textarea.css +1 -0
- package/_dist/css/component-css/pds-tile.css +1 -0
- package/_dist/css/component-css/pds-tiles-common.css +1 -0
- package/_dist/css/component-css/pds-toaster.css +1 -0
- package/_dist/css/component-css/pds-toggle-button.css +1 -0
- package/_dist/css/component-css/pds-tooltip.css +1 -0
- package/_dist/css/component-css/pds-user-menu-story-only.css +1 -0
- package/_dist/css/component-css/pds-user-menu.css +1 -0
- package/_dist/css/component-css/pds-utility-button.css +1 -0
- package/_dist/css/component-css/pds-workspace-selector.css +1 -0
- package/_dist/css/design-tokens/pds-design-tokens-dark-mode.css +250 -0
- package/_dist/css/design-tokens/pds-design-tokens-light-mode.css +334 -0
- package/_dist/css/design-tokens/pds-design-tokens.css +114 -0
- package/_dist/css/pds-components.css +117 -70
- package/_dist/css/pds-core.css +6 -2
- package/_dist/css/pds-layouts.css +6 -1
- package/_dist/index.css +1 -0
- package/_dist/index.d.ts +101 -0
- package/_dist/index.js +8955 -0
- package/_dist/index.js.map +1 -0
- package/_dist/layouts/Container/Container.d.ts +25 -0
- package/_dist/layouts/DashboardGlobal/DashboardGlobal.d.ts +57 -0
- package/_dist/layouts/DashboardInner/DashboardInner.d.ts +20 -0
- package/_dist/layouts/FlexContainer/FlexContainer.d.ts +72 -0
- package/_dist/layouts/GlobalWrapper/GlobalWrapper.d.ts +19 -0
- package/_dist/layouts/SidebarLayout/SidebarLayout.d.ts +36 -0
- package/_dist/layouts/StepperLayout/StepperLayout.d.ts +20 -0
- package/_dist/layouts/ThreeItemLayout/ThreeItemLayout.d.ts +30 -0
- package/_dist/layouts/TwoItemLayout/TwoItemLayout.d.ts +34 -0
- package/_dist/layouts/layout-types.d.ts +2 -0
- package/_dist/libs/components/utility-components.d.ts +15 -0
- package/_dist/libs/components/utils.d.ts +4 -0
- package/_dist/libs/types/custom-types.d.ts +103 -0
- package/_dist/mocks/data/navigation-items.d.ts +375 -0
- package/_dist/mocks/data/pagination-items.d.ts +16 -0
- package/_dist/mocks/markup/dashboard-main-content.d.ts +10 -0
- package/_dist/mocks/markup/dashboard-navigation.d.ts +11 -0
- package/_dist/mocks/markup/inputs.d.ts +2 -0
- package/_dist/mocks/markup/modal.d.ts +2 -0
- package/_dist/mocks/markup/panel-row-content.d.ts +7 -0
- package/_dist/utilities/context-providers/ResponsiveContext/ResponsiveContext.d.ts +6 -0
- package/_dist/utilities/hooks/useWindowWidth.d.ts +1 -0
- package/_dist/vars/spacing.d.ts +17 -0
- package/_dist/vars/z-index.d.ts +5 -0
- package/package.json +85 -43
- package/_dist/cjs/index.js +0 -98
- package/_dist/cjs/index.js.map +0 -1
- package/_dist/esm/index.js +0 -98
- package/_dist/esm/index.js.map +0 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, FocusEvent, ReactNode } from 'react';
|
|
2
|
+
import { ValidationStatus } from '../input-types';
|
|
3
|
+
import './textarea.css';
|
|
4
|
+
export type TranslationStringProps = {
|
|
5
|
+
clearButton: string;
|
|
6
|
+
counterOverLimit?: string;
|
|
7
|
+
searchShortcut: string;
|
|
8
|
+
visibilityStatus: string;
|
|
9
|
+
visibilityToggleHide: string;
|
|
10
|
+
visibilityToggleShow: string;
|
|
11
|
+
};
|
|
12
|
+
export interface TextareaProps {
|
|
13
|
+
/**
|
|
14
|
+
* Maximum character count for the character counter. Leave blank for no counter.
|
|
15
|
+
*/
|
|
16
|
+
counterMaxLength?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Initial value for the input field. Setting this prop automatically makes the input uncontrolled. Cannot be used in conjunction with the `value` prop.
|
|
19
|
+
*/
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Is the field disabled?
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* ID of the textarea.
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* Should the textarea be resizable by the user?
|
|
31
|
+
*/
|
|
32
|
+
isResizable?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Width of the input field. Accepts a number in pixels. Leave blank for width: 100%.
|
|
35
|
+
*/
|
|
36
|
+
inputWidth?: number;
|
|
37
|
+
/**
|
|
38
|
+
* Text label associated with the input field.
|
|
39
|
+
*/
|
|
40
|
+
label: string;
|
|
41
|
+
/**
|
|
42
|
+
* Message or description used to help clarify the usage of the input.
|
|
43
|
+
*/
|
|
44
|
+
message?: string | ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* onBlur event handler.
|
|
47
|
+
*/
|
|
48
|
+
onBlur?: (e: FocusEvent<HTMLTextAreaElement>) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Function to help lift the state and retrieve the input's value.
|
|
51
|
+
* Should accept one argument, the input's value
|
|
52
|
+
*/
|
|
53
|
+
onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
54
|
+
/**
|
|
55
|
+
* onFocus event handler.
|
|
56
|
+
*/
|
|
57
|
+
onFocus?: (e: FocusEvent<HTMLTextAreaElement>) => void;
|
|
58
|
+
/**
|
|
59
|
+
* Optional placeholder text to display when the input field is empty.
|
|
60
|
+
*/
|
|
61
|
+
placeholder?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Is the field read-only?
|
|
64
|
+
*/
|
|
65
|
+
readonly?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Is the field required?
|
|
68
|
+
*/
|
|
69
|
+
required?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Rows value to be given to the textarea type.
|
|
72
|
+
*/
|
|
73
|
+
rows?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Should the label be visible? If false, it will render for screen readers only.
|
|
76
|
+
*/
|
|
77
|
+
showLabel?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Additional props for the `<textarea>` element.
|
|
80
|
+
*/
|
|
81
|
+
textareaProps?: ComponentPropsWithoutRef<'textarea'>;
|
|
82
|
+
/**
|
|
83
|
+
* Translation strings for various labels or other visually-hidden text.
|
|
84
|
+
*/
|
|
85
|
+
translationStrings?: TranslationStringProps;
|
|
86
|
+
/**
|
|
87
|
+
* Validation message for the textarea field based on the validation status.
|
|
88
|
+
*/
|
|
89
|
+
validationMessage?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Validation status of the textarea field.
|
|
92
|
+
*/
|
|
93
|
+
validationStatus?: ValidationStatus;
|
|
94
|
+
/**
|
|
95
|
+
* Value of the textarea field. Used to set the value of the textarea field when controlled. Cannot be used in conjunction with the `defaultValue` prop.
|
|
96
|
+
*/
|
|
97
|
+
value?: string;
|
|
98
|
+
/**
|
|
99
|
+
* Additional class names
|
|
100
|
+
*/
|
|
101
|
+
className?: string;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Textarea UI component
|
|
105
|
+
*/
|
|
106
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ValidationStatus = 'success' | 'error';
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import { SelectOptionType, SelectOptionGroupType } from './Select/Select';
|
|
3
|
+
import './input-utilities.css';
|
|
4
|
+
export declare const inputCommonClasses: {
|
|
5
|
+
base: string;
|
|
6
|
+
disabled: string;
|
|
7
|
+
required: string;
|
|
8
|
+
error: string;
|
|
9
|
+
success: string;
|
|
10
|
+
readonly: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const getInputWidthStyle: (inputWidth: number) => {
|
|
13
|
+
width: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const RequiredIcon: () => React.JSX.Element;
|
|
16
|
+
interface InputLabelProps {
|
|
17
|
+
/**
|
|
18
|
+
* Input ID.
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* Label text.
|
|
23
|
+
*/
|
|
24
|
+
label: string;
|
|
25
|
+
/**
|
|
26
|
+
* Should the label be visible?
|
|
27
|
+
*/
|
|
28
|
+
showLabel: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Is the field required?
|
|
31
|
+
*/
|
|
32
|
+
required: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Is the field disabled?
|
|
35
|
+
*/
|
|
36
|
+
disabled: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Is the label a legend? Should be used when the input is a fieldset.
|
|
39
|
+
*/
|
|
40
|
+
isLegend?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Not a true `label`, but a description of the field.
|
|
43
|
+
* Used for inputs that have their label built into the element itself.
|
|
44
|
+
*/
|
|
45
|
+
isPseudoLabel?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Additional class names.
|
|
48
|
+
*/
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare const InputLabel: ({ id, label, showLabel, required, disabled, isLegend, isPseudoLabel, className, }: InputLabelProps) => React.JSX.Element;
|
|
52
|
+
export declare const InputMessage: ({ id, message, hasValidationMessage, validationMessageHasDecorators, validationStatus, className, }: {
|
|
53
|
+
id: string;
|
|
54
|
+
message?: string | ReactNode;
|
|
55
|
+
hasValidationMessage?: boolean;
|
|
56
|
+
validationMessageHasDecorators?: boolean;
|
|
57
|
+
validationStatus?: string;
|
|
58
|
+
className?: string;
|
|
59
|
+
}) => React.JSX.Element;
|
|
60
|
+
type DecoratorVariants = 'search' | 'error' | 'success';
|
|
61
|
+
export declare const InputDecorator: ({ variant }: {
|
|
62
|
+
variant: DecoratorVariants;
|
|
63
|
+
}) => React.JSX.Element;
|
|
64
|
+
export declare const SearchShortcut: ({ inputId, shortcutLabel, }: {
|
|
65
|
+
inputId: string;
|
|
66
|
+
shortcutLabel: string;
|
|
67
|
+
}) => React.JSX.Element;
|
|
68
|
+
export declare const ClearButton: ({ id, clearLabel, handleClearInput, }: {
|
|
69
|
+
id: string;
|
|
70
|
+
clearLabel: string;
|
|
71
|
+
handleClearInput: MouseEventHandler<HTMLButtonElement>;
|
|
72
|
+
}) => React.JSX.Element;
|
|
73
|
+
export declare const CharacterCounter: ({ id, currentLength, maxLength, overLimitMessage, }: {
|
|
74
|
+
id: string;
|
|
75
|
+
currentLength: number;
|
|
76
|
+
maxLength: number;
|
|
77
|
+
overLimitMessage: string;
|
|
78
|
+
}) => React.JSX.Element;
|
|
79
|
+
export declare const HiddenLabel: ({ label, ...props }: {
|
|
80
|
+
[x: string]: any;
|
|
81
|
+
label: any;
|
|
82
|
+
}) => React.JSX.Element;
|
|
83
|
+
export declare const isOptionGroup: (option: SelectOptionType | SelectOptionGroupType) => option is SelectOptionGroupType;
|
|
84
|
+
interface SelectOptionProps extends ComponentPropsWithoutRef<'li'> {
|
|
85
|
+
children?: ReactNode;
|
|
86
|
+
isActive?: boolean;
|
|
87
|
+
className?: string;
|
|
88
|
+
}
|
|
89
|
+
export declare const SelectOption: React.ForwardRefExoticComponent<SelectOptionProps & React.RefAttributes<HTMLLIElement>>;
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
2
|
+
import './breadcrumb.css';
|
|
3
|
+
/**
|
|
4
|
+
* Prop types for Breadcrumb
|
|
5
|
+
*/
|
|
6
|
+
export interface BreadcrumbProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
|
+
/**
|
|
8
|
+
* Aria label for the breadcrumbs navigation.
|
|
9
|
+
*/
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Array of breadcrumb items.
|
|
13
|
+
*/
|
|
14
|
+
crumbs: ReactElement[];
|
|
15
|
+
/**
|
|
16
|
+
* Additional class names
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Breadcrumb UI component
|
|
22
|
+
*/
|
|
23
|
+
export declare const Breadcrumb: ({ ariaLabel, crumbs, className, ...props }: BreadcrumbProps) => React.JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { DashboardNavItemProps } from './DashboardNavItem';
|
|
3
|
+
import './dashboard-nav.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for DashboardNav
|
|
6
|
+
*/
|
|
7
|
+
export interface DashboardNavProps extends ComponentPropsWithoutRef<'nav'> {
|
|
8
|
+
/**
|
|
9
|
+
* Aria label for the navigation.
|
|
10
|
+
*/
|
|
11
|
+
ariaLabel: string;
|
|
12
|
+
/**
|
|
13
|
+
* Labels for translatable strings.
|
|
14
|
+
*/
|
|
15
|
+
labels?: {
|
|
16
|
+
submenu: string;
|
|
17
|
+
toggle: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Menu items to render.
|
|
21
|
+
*/
|
|
22
|
+
menuItems: DashboardNavItemProps[];
|
|
23
|
+
/**
|
|
24
|
+
* Text to display in the mobile menu trigger button when no active link is found.
|
|
25
|
+
*/
|
|
26
|
+
mobileMenuSelectTextFallback?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Additional class names
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* DashboardNav UI component
|
|
34
|
+
*/
|
|
35
|
+
export declare const DashboardNav: ({ ariaLabel, labels, menuItems, mobileMenuSelectTextFallback, className, ...props }: DashboardNavProps) => React.JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NavigationItem } from '@components/navigation/navigation-types';
|
|
3
|
+
import { PDSIcon } from '@components/Icon/Icon';
|
|
4
|
+
import './dashboard-nav.css';
|
|
5
|
+
export type DashboardNavItemProps = NavigationItem & {
|
|
6
|
+
/**
|
|
7
|
+
* Icon to display next to the link content.
|
|
8
|
+
*/
|
|
9
|
+
icon?: PDSIcon;
|
|
10
|
+
/**
|
|
11
|
+
* Flag indicating whether the sidebar is expanded.
|
|
12
|
+
*/
|
|
13
|
+
isSidebarExpanded: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Labels for translatable strings.
|
|
16
|
+
*/
|
|
17
|
+
labels?: {
|
|
18
|
+
submenu: string;
|
|
19
|
+
toggle: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* DashboardNavItem UI component
|
|
24
|
+
*/
|
|
25
|
+
export declare const DashboardNavItem: ({ icon, isActive, isSidebarExpanded, labels, linkContent, links, }: DashboardNavItemProps) => React.JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PDSIcon } from '@components/Icon/Icon';
|
|
3
|
+
import { NavigationItem } from '@components/navigation/navigation-types';
|
|
4
|
+
export declare const processDashboardNavLinkContent: (baseClass: string, linkContent: JSX.Element | string, links?: NavigationItem[], icon?: PDSIcon) => JSX.Element;
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* ID for the component.
|
|
19
|
+
*/
|
|
20
|
+
id?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Is the site data still loading?
|
|
23
|
+
*/
|
|
24
|
+
isLoading?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Label for the input. Will be rendered as an aria-label.
|
|
27
|
+
*/
|
|
28
|
+
label?: string;
|
|
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
|
+
*/
|
|
36
|
+
loadingText?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Text to display when no results are found.
|
|
39
|
+
*/
|
|
40
|
+
noResultsText?: string;
|
|
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
|
+
*/
|
|
52
|
+
placeholder?: string;
|
|
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
|
+
*/
|
|
60
|
+
horizontalOffset?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Additional class names
|
|
63
|
+
*/
|
|
64
|
+
className?: string;
|
|
65
|
+
}
|
|
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 {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { SiteStatus, SiteType } from '@libs/types/custom-types';
|
|
3
|
+
export type SiteOption = {
|
|
4
|
+
/**
|
|
5
|
+
* ID of the site.
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
/**
|
|
9
|
+
* Machine name of the site.
|
|
10
|
+
*/
|
|
11
|
+
machineName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Name of the site.
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* Site active status.
|
|
18
|
+
*/
|
|
19
|
+
status?: SiteStatus;
|
|
20
|
+
/**
|
|
21
|
+
* Site type.
|
|
22
|
+
*/
|
|
23
|
+
type?: SiteType;
|
|
24
|
+
};
|
|
25
|
+
/** Site option display props. */
|
|
26
|
+
export interface SiteOptionDisplayProps extends ComponentPropsWithoutRef<'div'> {
|
|
27
|
+
/**
|
|
28
|
+
* Site option to display.
|
|
29
|
+
*/
|
|
30
|
+
option: SiteOption;
|
|
31
|
+
/**
|
|
32
|
+
* Additional class names
|
|
33
|
+
*/
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* UI component to display site options.
|
|
38
|
+
*/
|
|
39
|
+
export declare const SiteOptionDisplay: ({ option, className, ...props }: SiteOptionDisplayProps) => React.JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { NavigationItem } from '@components/navigation/navigation-types';
|
|
3
|
+
import './dropdown-menu.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for DropdownMenu
|
|
6
|
+
*/
|
|
7
|
+
export interface DropdownMenuProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Heading text. If a string is passed, it will be rendered as a heading. If a link is passed, it will be rendered as a link.
|
|
10
|
+
*/
|
|
11
|
+
headingText?: string | JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Menu items to render.
|
|
14
|
+
*/
|
|
15
|
+
menuItems: NavigationItem[];
|
|
16
|
+
/**
|
|
17
|
+
* Text to display in the mobile menu trigger button when no active link is found.
|
|
18
|
+
*/
|
|
19
|
+
selectTextFallback: string;
|
|
20
|
+
/**
|
|
21
|
+
* Additional class names
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* DropdownMenu UI component
|
|
27
|
+
*/
|
|
28
|
+
export declare const DropdownMenu: ({ headingText, menuItems, selectTextFallback, className, ...props }: DropdownMenuProps) => React.JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import './nav-menu.css';
|
|
3
|
+
/**
|
|
4
|
+
* Prop types for MenuItem
|
|
5
|
+
*/
|
|
6
|
+
export interface MenuItem {
|
|
7
|
+
id?: string;
|
|
8
|
+
label: string;
|
|
9
|
+
links?: MenuItem[];
|
|
10
|
+
linkContent?: React.ReactNode;
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
isSeparator?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Prop types for NavMenu
|
|
16
|
+
*/
|
|
17
|
+
interface NavMenuProps extends ComponentPropsWithoutRef<'nav'> {
|
|
18
|
+
/**
|
|
19
|
+
* Aria label for `nav` element.
|
|
20
|
+
*/
|
|
21
|
+
ariaLabel: string;
|
|
22
|
+
/**
|
|
23
|
+
* Color scheme.
|
|
24
|
+
*/
|
|
25
|
+
colorType?: 'default' | 'reverse';
|
|
26
|
+
/**
|
|
27
|
+
* Menu Items.
|
|
28
|
+
*/
|
|
29
|
+
menuItems?: MenuItem[];
|
|
30
|
+
/**
|
|
31
|
+
* Mobile menu will be enabled when viewport is at or below this number in pixels.
|
|
32
|
+
*/
|
|
33
|
+
mobileMenuMaxWidth?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Additional class names
|
|
36
|
+
*/
|
|
37
|
+
className?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* NavMenu UI component
|
|
41
|
+
*/
|
|
42
|
+
export declare const NavMenu: ({ ariaLabel, colorType, menuItems, mobileMenuMaxWidth, className, ...props }: NavMenuProps) => React.JSX.Element;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { MenuItem } from './NavMenu';
|
|
3
|
+
/**
|
|
4
|
+
* Prop types for NavMenuDropdown
|
|
5
|
+
*/
|
|
6
|
+
interface NavMenuDropdownProps extends ComponentPropsWithoutRef<'button'> {
|
|
7
|
+
/**
|
|
8
|
+
* Dropdown items.
|
|
9
|
+
*/
|
|
10
|
+
items?: MenuItem[];
|
|
11
|
+
/**
|
|
12
|
+
* Dropdown label.
|
|
13
|
+
*/
|
|
14
|
+
label?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Mobile menu will be enabled when viewport is at or below this number in pixels.
|
|
17
|
+
*/
|
|
18
|
+
mobileMenuMaxWidth?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* NavMenuDropdown UI component
|
|
22
|
+
*/
|
|
23
|
+
export declare const NavMenuDropdown: ({ items, label, mobileMenuMaxWidth, }: NavMenuDropdownProps) => React.JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { PantheonLogoDisplayType } from '@components/PantheonLogo/PantheonLogo';
|
|
3
|
+
import { ContainerWidth } from '@libs/types/custom-types';
|
|
4
|
+
import './navbar.css';
|
|
5
|
+
/**
|
|
6
|
+
* Prop types for Navbar
|
|
7
|
+
*/
|
|
8
|
+
export interface NavbarProps extends ComponentPropsWithoutRef<'header'> {
|
|
9
|
+
/**
|
|
10
|
+
* Navbar content.
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Color type of the navbar.
|
|
15
|
+
*/
|
|
16
|
+
colorType?: 'default' | 'reverse' | 'reverse-transparent' | 'transparent';
|
|
17
|
+
/**
|
|
18
|
+
* PDS container width.
|
|
19
|
+
*/
|
|
20
|
+
containerWidth?: ContainerWidth;
|
|
21
|
+
/**
|
|
22
|
+
* Hide the border at the bottom of the navbar.
|
|
23
|
+
*/
|
|
24
|
+
hideBorder?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Hide the logo if it will be provided elsewhere in the layout. The logo will still be rendered in the mobile view.
|
|
27
|
+
*/
|
|
28
|
+
hideLogo?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* How should the Pantheon logo be displayed.
|
|
31
|
+
*/
|
|
32
|
+
logoDisplayType?: PantheonLogoDisplayType;
|
|
33
|
+
/**
|
|
34
|
+
* Where should the logo link to? A fully-formed link element.
|
|
35
|
+
*/
|
|
36
|
+
logoLinkContent?: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Logo image source. If provided, the Pantheon logo will not be rendered.
|
|
39
|
+
*/
|
|
40
|
+
logoSrc?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Accepts a fully-formed link or a string (if a static site name is desired). Only necessary if logoDisplayType is `sub-brand`.
|
|
43
|
+
*/
|
|
44
|
+
logoSubBrand?: ReactNode | string;
|
|
45
|
+
/**
|
|
46
|
+
* Translation strings for accessibility.
|
|
47
|
+
*/
|
|
48
|
+
translationStrings?: {
|
|
49
|
+
closeMobileNav: string;
|
|
50
|
+
openMobileNav: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Additional class names
|
|
54
|
+
*/
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Navbar UI component
|
|
59
|
+
*/
|
|
60
|
+
export declare const Navbar: ({ children, colorType, containerWidth, hideBorder, hideLogo, logoDisplayType, logoLinkContent, logoSrc, logoSubBrand, translationStrings, className, ...props }: NavbarProps) => React.JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { NavigationItem } from '@components/navigation/navigation-types';
|
|
3
|
+
import './side-nav.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for SideNav
|
|
6
|
+
*/
|
|
7
|
+
export interface SideNavProps extends ComponentPropsWithoutRef<'nav'> {
|
|
8
|
+
/**
|
|
9
|
+
* Aria label for the navigation.
|
|
10
|
+
*/
|
|
11
|
+
ariaLabel: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the menu should be rendered as a mobile menu when the viewport is at or below the mobileMenuMaxWidth.
|
|
14
|
+
*/
|
|
15
|
+
hasMobileMenu?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Heading text. If a link is passed, it will be rendered as a link.
|
|
18
|
+
*/
|
|
19
|
+
headingText?: string | JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Labels for translatable strings.
|
|
22
|
+
*/
|
|
23
|
+
labels?: {
|
|
24
|
+
submenu: string;
|
|
25
|
+
toggle: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Menu items to render.
|
|
29
|
+
*/
|
|
30
|
+
menuItems: NavigationItem[];
|
|
31
|
+
/**
|
|
32
|
+
* Mobile menu will be enabled when viewport is at or below this number in pixels.
|
|
33
|
+
*/
|
|
34
|
+
mobileMenuMaxWidth?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Text to display in the mobile menu trigger button when no active link is found.
|
|
37
|
+
*/
|
|
38
|
+
mobileMenuSelectTextFallback?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Additional class names
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* SideNav UI component
|
|
46
|
+
*/
|
|
47
|
+
export declare const SideNav: ({ ariaLabel, hasMobileMenu, headingText, labels, menuItems, mobileMenuMaxWidth, mobileMenuSelectTextFallback, className, ...props }: SideNavProps) => React.JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { NavigationItem } from '@components/navigation/navigation-types';
|
|
3
|
+
import './side-nav-compact.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for SideNavCompact
|
|
6
|
+
*/
|
|
7
|
+
export interface SideNavCompactProps extends ComponentPropsWithoutRef<'nav'> {
|
|
8
|
+
/**
|
|
9
|
+
* Aria label for the navigation.
|
|
10
|
+
*/
|
|
11
|
+
ariaLabel: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the menu should be rendered as a mobile menu when the viewport is at or below the mobileMenuMaxWidth.
|
|
14
|
+
*/
|
|
15
|
+
hasMobileMenu?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Heading text. If a link is passed, it will be rendered as a link.
|
|
18
|
+
*/
|
|
19
|
+
headingText?: string | JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Labels for translatable strings.
|
|
22
|
+
*/
|
|
23
|
+
labels?: {
|
|
24
|
+
submenu: string;
|
|
25
|
+
toggle: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Menu items to render.
|
|
29
|
+
*/
|
|
30
|
+
menuItems: NavigationItem[];
|
|
31
|
+
/**
|
|
32
|
+
* Mobile menu will be enabled when viewport is at or below this number in pixels.
|
|
33
|
+
*/
|
|
34
|
+
mobileMenuMaxWidth?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Text to display in the mobile menu trigger button when no active link is found.
|
|
37
|
+
*/
|
|
38
|
+
mobileMenuSelectTextFallback?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Additional class names
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* SideNavCompact UI component
|
|
46
|
+
*/
|
|
47
|
+
export declare const SideNavCompact: ({ ariaLabel, hasMobileMenu, headingText, labels, menuItems, mobileMenuMaxWidth, mobileMenuSelectTextFallback, className, ...props }: SideNavCompactProps) => React.JSX.Element;
|