@pantheon-systems/pds-toolkit-react 1.0.0-dev.19 → 1.0.0-dev.190

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.
Files changed (235) hide show
  1. package/README.md +31 -1
  2. package/_dist/components/Avatar/Avatar.d.ts +33 -0
  3. package/_dist/components/Breadcrumbs/Breadcrumbs.d.ts +9 -0
  4. package/_dist/components/Breadcrumbs/BreadcrumbsContent.d.ts +12 -0
  5. package/_dist/components/Breadcrumbs/BreadcrumbsContext.d.ts +17 -0
  6. package/_dist/components/Breadcrumbs/ListItem.d.ts +14 -0
  7. package/_dist/components/Breadcrumbs/MobileCrumbs.d.ts +2 -0
  8. package/_dist/components/CTALink/CTALink.d.ts +20 -0
  9. package/_dist/components/CTASlice/CTASlice.d.ts +51 -0
  10. package/_dist/components/Callout/Callout.d.ts +24 -0
  11. package/_dist/components/Callout/sample-callout-content.d.ts +2 -0
  12. package/_dist/components/ComparisonList/ComparisonList.d.ts +42 -0
  13. package/_dist/components/Heading/Heading.d.ts +15 -0
  14. package/_dist/components/Icon/Icon.d.ts +640 -0
  15. package/_dist/components/Icon/iconList.d.ts +1 -0
  16. package/_dist/components/LinkNewWindow/LinkNewWindow.d.ts +27 -0
  17. package/_dist/components/Modal/Modal.d.ts +40 -0
  18. package/_dist/components/Pager/AdvancedPagination.d.ts +4 -0
  19. package/_dist/components/Pager/BasicPagination.d.ts +4 -0
  20. package/_dist/components/Pager/MiniPagination.d.ts +4 -0
  21. package/_dist/components/Pager/NavigationButton.d.ts +13 -0
  22. package/_dist/components/Pager/Pager.d.ts +24 -0
  23. package/_dist/components/Pager/PagerContext.d.ts +23 -0
  24. package/_dist/components/Pager/PagerItem.d.ts +14 -0
  25. package/_dist/components/Pager/usePaginationUI.d.ts +1 -0
  26. package/_dist/components/Panel/Panel.d.ts +30 -0
  27. package/_dist/components/PantheonLogo/PantheonLogo.d.ts +32 -0
  28. package/_dist/components/PantheonLogo/pantheon-logo-data.d.ts +4 -0
  29. package/_dist/components/PlatformIcon/PlatformIcon.d.ts +12 -0
  30. package/_dist/components/Popover/Popover.d.ts +58 -0
  31. package/_dist/components/PullQuote/PullQuote.d.ts +34 -0
  32. package/_dist/components/Skiplink/Skiplink.d.ts +21 -0
  33. package/_dist/components/SocialLinks/SocialLinks.d.ts +23 -0
  34. package/_dist/components/StatusIndicator/StatusIndicator.d.ts +20 -0
  35. package/_dist/components/Stepper/Stepper.d.ts +49 -0
  36. package/_dist/components/Table/Table.d.ts +15 -0
  37. package/_dist/components/TableOfContents/TableOfContents.d.ts +25 -0
  38. package/_dist/components/Tabs/Tabs.d.ts +63 -0
  39. package/_dist/components/Tag/Tag.d.ts +39 -0
  40. package/_dist/components/Tooltip/Tooltip.d.ts +51 -0
  41. package/_dist/components/badges/IndicatorBadge/IndicatorBadge.d.ts +27 -0
  42. package/_dist/components/badges/StatusBadge/StatusBadge.d.ts +35 -0
  43. package/_dist/components/badges/Tally/Tally.d.ts +35 -0
  44. package/_dist/components/buttons/Button/Button.d.ts +58 -0
  45. package/_dist/components/buttons/ButtonLink/ButtonLink.d.ts +44 -0
  46. package/_dist/components/buttons/IconButton/IconButton.d.ts +53 -0
  47. package/_dist/components/buttons/MenuButton/MenuButton.d.ts +63 -0
  48. package/_dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +53 -0
  49. package/_dist/components/buttons/SplitButton/SplitButton.d.ts +36 -0
  50. package/_dist/components/buttons/ToggleButton/ToggleButton.d.ts +35 -0
  51. package/_dist/components/cards/Card/Card.d.ts +29 -0
  52. package/_dist/components/cards/CardHeading/CardHeading.d.ts +32 -0
  53. package/_dist/components/cards/CardSelectGroup/CardSelectGroup.d.ts +60 -0
  54. package/_dist/components/cards/LinksCard/LinksCard.d.ts +29 -0
  55. package/_dist/components/cards/LinksCard/links-card-sample-data.d.ts +2 -0
  56. package/_dist/components/cards/NewSiteCard/NewSiteCard.d.ts +25 -0
  57. package/_dist/components/cards/PricingCard/PricingCard.d.ts +64 -0
  58. package/_dist/components/cards/SiteCard/SiteCard.d.ts +45 -0
  59. package/_dist/components/expansion-panels/ExpansionPanel/ExpansionPanel.d.ts +32 -0
  60. package/_dist/components/expansion-panels/ExpansionPanelGroup/ExpansionPanelGroup.d.ts +24 -0
  61. package/_dist/components/footer/FooterHeading/FooterHeading.d.ts +15 -0
  62. package/_dist/components/footer/FooterLinks/FooterLinks.d.ts +17 -0
  63. package/_dist/components/footer/SiteFooter/SiteFooter.d.ts +26 -0
  64. package/_dist/components/footer/SiteFooter/footer-content.d.ts +2 -0
  65. package/_dist/components/inputs/Checkbox/Checkbox.d.ts +92 -0
  66. package/_dist/components/inputs/CheckboxFieldset/CheckboxFieldset.d.ts +60 -0
  67. package/_dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +76 -0
  68. package/_dist/components/inputs/Combobox/Combobox.d.ts +134 -0
  69. package/_dist/components/inputs/FileUpload/FileUpload.d.ts +77 -0
  70. package/_dist/components/inputs/InputFormatted/InputFormatted.d.ts +35 -0
  71. package/_dist/components/inputs/InputGroup/InputGroup.d.ts +19 -0
  72. package/_dist/components/inputs/InputObscured/InputObscured.d.ts +33 -0
  73. package/_dist/components/inputs/InputText/InputText.d.ts +75 -0
  74. package/_dist/components/inputs/InputWrapper/InputWrapper.d.ts +5 -0
  75. package/_dist/components/inputs/RadioGroup/RadioGroup.d.ts +92 -0
  76. package/_dist/components/inputs/Select/Select.d.ts +99 -0
  77. package/_dist/components/inputs/Switch/Switch.d.ts +74 -0
  78. package/_dist/components/inputs/TextInput/TextInput.d.ts +127 -0
  79. package/_dist/components/inputs/Textarea/Textarea.d.ts +107 -0
  80. package/_dist/components/inputs/ToggleSwitch/ToggleSwitch.d.ts +33 -0
  81. package/_dist/components/inputs/input-types.d.ts +1 -0
  82. package/_dist/components/inputs/input-utilities.d.ts +88 -0
  83. package/_dist/components/inputs/inputs-common.d.ts +40 -0
  84. package/_dist/components/navigation/DashboardNav/DashboardNav.d.ts +35 -0
  85. package/_dist/components/navigation/DashboardNav/DashboardNavItem.d.ts +25 -0
  86. package/_dist/components/navigation/DashboardNav/dashboard-nav-sample-content.d.ts +30 -0
  87. package/_dist/components/navigation/DashboardNav/dashboard-nav-utilities.d.ts +4 -0
  88. package/_dist/components/navigation/DashboardSearch/DashboardSearch.d.ts +70 -0
  89. package/_dist/components/navigation/DashboardSearch/SiteOptionDisplay.d.ts +35 -0
  90. package/_dist/components/navigation/DropdownMenu/DropdownMenu.d.ts +28 -0
  91. package/_dist/components/navigation/NavMenu/NavMenu.d.ts +19 -0
  92. package/_dist/components/navigation/NavMenu/NavMenuDropdown.d.ts +14 -0
  93. package/_dist/components/navigation/Navbar/Navbar.d.ts +60 -0
  94. package/_dist/components/navigation/SideNav/SideNav.d.ts +47 -0
  95. package/_dist/components/navigation/SideNavCompact/SideNavCompact.d.ts +47 -0
  96. package/_dist/components/navigation/TabMenu/TabMenu.d.ts +43 -0
  97. package/_dist/components/navigation/TabMenu/TabMenuDropdown.d.ts +33 -0
  98. package/_dist/components/navigation/UserMenu/UserMenu.d.ts +69 -0
  99. package/_dist/components/navigation/UserMenu/user-menu-sample-content.d.ts +2 -0
  100. package/_dist/components/navigation/WorkspaceSelector/WorkspaceSelector.d.ts +58 -0
  101. package/_dist/components/navigation/navigation-types.d.ts +29 -0
  102. package/_dist/components/navigation/navigation-utilities.d.ts +7 -0
  103. package/_dist/components/notifications/Banner/Banner.d.ts +47 -0
  104. package/_dist/components/notifications/InlineMessage/InlineMessage.d.ts +37 -0
  105. package/_dist/components/notifications/SectionMessage/SectionMessage.d.ts +47 -0
  106. package/_dist/components/notifications/Toaster/Toast.d.ts +46 -0
  107. package/_dist/components/notifications/Toaster/Toaster.d.ts +29 -0
  108. package/_dist/components/notifications/Toaster/useToast.d.ts +13 -0
  109. package/_dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +53 -0
  110. package/_dist/components/progress-indicators/ProgressRing/ProgressRing.d.ts +41 -0
  111. package/_dist/components/progress-indicators/Spinner/Spinner.d.ts +33 -0
  112. package/_dist/components/tiles/AvatarTileList/AvatarTileList.d.ts +22 -0
  113. package/_dist/components/tiles/StatsTileList/StatsTileList.d.ts +26 -0
  114. package/_dist/components/tiles/Tile/Tile.d.ts +42 -0
  115. package/_dist/components/tiles/TileGrid/TileGrid.d.ts +29 -0
  116. package/_dist/css/component-css/pds-avatar-tile-list.css +1 -0
  117. package/_dist/css/component-css/pds-avatar.css +1 -0
  118. package/_dist/css/component-css/pds-banner.css +1 -0
  119. package/_dist/css/component-css/pds-breadcrumbs.css +1 -0
  120. package/_dist/css/component-css/pds-button-link.css +1 -0
  121. package/_dist/css/component-css/pds-button.css +81 -0
  122. package/_dist/css/component-css/pds-callout.css +1 -0
  123. package/_dist/css/component-css/pds-card-heading.css +1 -0
  124. package/_dist/css/component-css/pds-card-select-group.css +1 -0
  125. package/_dist/css/component-css/pds-card.css +1 -0
  126. package/_dist/css/component-css/pds-checkbox-group.css +1 -0
  127. package/_dist/css/component-css/pds-checkbox.css +1 -0
  128. package/_dist/css/component-css/pds-combobox.css +1 -0
  129. package/_dist/css/component-css/pds-comparison-list.css +1 -0
  130. package/_dist/css/component-css/pds-cta-link.css +1 -0
  131. package/_dist/css/component-css/pds-cta-slice.css +1 -0
  132. package/_dist/css/component-css/pds-dashboard-nav.css +5 -0
  133. package/_dist/css/component-css/pds-dashboard-search.css +1 -0
  134. package/_dist/css/component-css/pds-dropdown-menu.css +2 -0
  135. package/_dist/css/component-css/pds-expansion-panel-group.css +1 -0
  136. package/_dist/css/component-css/pds-expansion-panel.css +1 -0
  137. package/_dist/css/component-css/pds-file-upload.css +7 -0
  138. package/_dist/css/component-css/pds-footer-heading.css +1 -0
  139. package/_dist/css/component-css/pds-footer-links.css +1 -0
  140. package/_dist/css/component-css/pds-heading.css +1 -0
  141. package/_dist/css/component-css/pds-icon-button.css +17 -0
  142. package/_dist/css/component-css/pds-icon-story-only.css +1 -0
  143. package/_dist/css/component-css/pds-index.css +162 -0
  144. package/_dist/css/component-css/pds-indicator-badge.css +39 -0
  145. package/_dist/css/component-css/pds-inline-message.css +1 -0
  146. package/_dist/css/component-css/pds-input-group.css +1 -0
  147. package/_dist/css/component-css/pds-input-text.css +1 -0
  148. package/_dist/css/component-css/pds-input-utilities.css +1 -0
  149. package/_dist/css/component-css/pds-input-wrapper.css +1 -0
  150. package/_dist/css/component-css/pds-inputs-common-deprecated.css +1 -0
  151. package/_dist/css/component-css/pds-inputs-common.css +1 -0
  152. package/_dist/css/component-css/pds-link-new-window.css +1 -0
  153. package/_dist/css/component-css/pds-links-card.css +1 -0
  154. package/_dist/css/component-css/pds-menu-button.css +1 -0
  155. package/_dist/css/component-css/pds-modal.css +1 -0
  156. package/_dist/css/component-css/pds-nav-menu.css +1 -0
  157. package/_dist/css/component-css/pds-navbar.css +3 -0
  158. package/_dist/css/component-css/pds-new-site-card.css +1 -0
  159. package/_dist/css/component-css/pds-pager.css +1 -0
  160. package/_dist/css/component-css/pds-panel.css +1 -0
  161. package/_dist/css/component-css/pds-pantheon-logo.css +1 -0
  162. package/_dist/css/component-css/pds-platform-icon.css +1 -0
  163. package/_dist/css/component-css/pds-popover.css +1 -0
  164. package/_dist/css/component-css/pds-pricing-card-local.css +1 -0
  165. package/_dist/css/component-css/pds-pricing-card.css +1 -0
  166. package/_dist/css/component-css/pds-progress-bar.css +1 -0
  167. package/_dist/css/component-css/pds-progress-ring.css +1 -0
  168. package/_dist/css/component-css/pds-pull-quote.css +1 -0
  169. package/_dist/css/component-css/pds-radio-group.css +1 -0
  170. package/_dist/css/component-css/pds-section-message.css +1 -0
  171. package/_dist/css/component-css/pds-segmented-button.css +1 -0
  172. package/_dist/css/component-css/pds-select.css +1 -0
  173. package/_dist/css/component-css/pds-side-nav-compact.css +1 -0
  174. package/_dist/css/component-css/pds-side-nav.css +1 -0
  175. package/_dist/css/component-css/pds-site-card.css +1 -0
  176. package/_dist/css/component-css/pds-site-footer.css +1 -0
  177. package/_dist/css/component-css/pds-skiplink.css +1 -0
  178. package/_dist/css/component-css/pds-social-links.css +1 -0
  179. package/_dist/css/component-css/pds-spinner.css +1 -0
  180. package/_dist/css/component-css/pds-split-button.css +2 -0
  181. package/_dist/css/component-css/pds-stats-tile-list.css +1 -0
  182. package/_dist/css/component-css/pds-status-badge.css +9 -0
  183. package/_dist/css/component-css/pds-status-indicator.css +1 -0
  184. package/_dist/css/component-css/pds-stepper.css +1 -0
  185. package/_dist/css/component-css/pds-switch.css +3 -0
  186. package/_dist/css/component-css/pds-tab-menu.css +2 -0
  187. package/_dist/css/component-css/pds-table-of-contents.css +1 -0
  188. package/_dist/css/component-css/pds-table.css +1 -0
  189. package/_dist/css/component-css/pds-tabs.css +1 -0
  190. package/_dist/css/component-css/pds-tag.css +1 -0
  191. package/_dist/css/component-css/pds-tally.css +1 -0
  192. package/_dist/css/component-css/pds-text-input.css +1 -0
  193. package/_dist/css/component-css/pds-textarea.css +1 -0
  194. package/_dist/css/component-css/pds-tile.css +1 -0
  195. package/_dist/css/component-css/pds-tiles-common.css +1 -0
  196. package/_dist/css/component-css/pds-toaster.css +1 -0
  197. package/_dist/css/component-css/pds-toggle-button.css +1 -0
  198. package/_dist/css/component-css/pds-toggle-switch.css +3 -0
  199. package/_dist/css/component-css/pds-tooltip.css +1 -0
  200. package/_dist/css/component-css/pds-user-menu-story-only.css +1 -0
  201. package/_dist/css/component-css/pds-user-menu.css +1 -0
  202. package/_dist/css/component-css/pds-workspace-selector.css +1 -0
  203. package/_dist/css/design-tokens/pds-design-tokens-dark-mode.css +272 -0
  204. package/_dist/css/design-tokens/pds-design-tokens-light-mode.css +521 -0
  205. package/_dist/css/design-tokens/pds-design-tokens.css +105 -0
  206. package/_dist/css/pds-components.css +125 -70
  207. package/_dist/css/pds-core.css +54 -2
  208. package/_dist/css/pds-layouts.css +2 -1
  209. package/_dist/index.css +1 -0
  210. package/_dist/index.d.ts +98 -0
  211. package/_dist/index.js +10650 -0
  212. package/_dist/index.js.map +1 -0
  213. package/_dist/layouts/Container/Container.d.ts +25 -0
  214. package/_dist/layouts/DashboardLayout/DashboardLayout.d.ts +48 -0
  215. package/_dist/layouts/DashboardLayout/DemoContent.d.ts +2 -0
  216. package/_dist/layouts/FlexContainer/FlexContainer.d.ts +72 -0
  217. package/_dist/layouts/GlobalWrapper/GlobalWrapper.d.ts +19 -0
  218. package/_dist/layouts/SidebarLayout/SidebarLayout.d.ts +36 -0
  219. package/_dist/layouts/StepperLayout/StepperLayout.d.ts +17 -0
  220. package/_dist/layouts/ThreeItemLayout/ThreeItemLayout.d.ts +25 -0
  221. package/_dist/layouts/TwoItemLayout/TwoItemLayout.d.ts +29 -0
  222. package/_dist/layouts/layout-types.d.ts +1 -0
  223. package/_dist/libs/components/customPropTypes.d.ts +85 -0
  224. package/_dist/libs/components/utility-components.d.ts +12 -0
  225. package/_dist/libs/components/utils.d.ts +4 -0
  226. package/_dist/libs/types/custom-types.d.ts +13 -0
  227. package/_dist/utilities/context-providers/ResponsiveContext/ResponsiveContext.d.ts +6 -0
  228. package/_dist/utilities/hooks/useWindowWidth.d.ts +1 -0
  229. package/_dist/vars/spacing.d.ts +17 -0
  230. package/_dist/vars/z-index.d.ts +5 -0
  231. package/package.json +85 -44
  232. package/_dist/cjs/index.js +0 -98
  233. package/_dist/cjs/index.js.map +0 -1
  234. package/_dist/esm/index.js +0 -98
  235. package/_dist/esm/index.js.map +0 -1
@@ -0,0 +1,33 @@
1
+ export function ToggleSwitch({ disabled, id, inputWidth, label, message, onChange, required, showLabel, showStatusLabel, statusOnLabel, statusOffLabel, className, ...props }: {
2
+ [x: string]: any;
3
+ disabled?: boolean;
4
+ id: any;
5
+ inputWidth: any;
6
+ label: any;
7
+ message: any;
8
+ onChange: any;
9
+ required?: boolean;
10
+ showLabel?: boolean;
11
+ showStatusLabel?: boolean;
12
+ statusOnLabel?: string;
13
+ statusOffLabel?: string;
14
+ className: any;
15
+ }): React.JSX.Element;
16
+ export namespace ToggleSwitch {
17
+ namespace propTypes {
18
+ let disabled: PropTypes.Requireable<boolean>;
19
+ let id: PropTypes.Validator<string>;
20
+ let inputWidth: PropTypes.Requireable<number>;
21
+ let label: PropTypes.Validator<string>;
22
+ let message: PropTypes.Requireable<string>;
23
+ let onChange: PropTypes.Requireable<(...args: any[]) => any>;
24
+ let required: PropTypes.Requireable<boolean>;
25
+ let showLabel: PropTypes.Requireable<boolean>;
26
+ let showStatusLabel: PropTypes.Requireable<boolean>;
27
+ let statusOffLabel: PropTypes.Requireable<string>;
28
+ let statusOnLabel: PropTypes.Requireable<string>;
29
+ let className: PropTypes.Requireable<string>;
30
+ }
31
+ }
32
+ import React from 'react';
33
+ import PropTypes from 'prop-types';
@@ -0,0 +1 @@
1
+ export type ValidationStatus = 'success' | 'error';
@@ -0,0 +1,88 @@
1
+ import React, { ComponentPropsWithoutRef, MouseEventHandler, ReactNode } from 'react';
2
+ import './input-utilities.css';
3
+ export declare const inputCommonClasses: {
4
+ base: string;
5
+ disabled: string;
6
+ required: string;
7
+ error: string;
8
+ success: string;
9
+ readonly: string;
10
+ };
11
+ export declare const getInputWidthStyle: (inputWidth: number) => {
12
+ width: string;
13
+ };
14
+ export declare const RequiredIcon: () => React.JSX.Element;
15
+ interface InputLabelProps {
16
+ /**
17
+ * Input ID.
18
+ */
19
+ id: string;
20
+ /**
21
+ * Label text.
22
+ */
23
+ label: string;
24
+ /**
25
+ * Should the label be visible?
26
+ */
27
+ showLabel: boolean;
28
+ /**
29
+ * Is the field required?
30
+ */
31
+ required: boolean;
32
+ /**
33
+ * Is the field disabled?
34
+ */
35
+ disabled: boolean;
36
+ /**
37
+ * Is the label a legend? Should be used when the input is a fieldset.
38
+ */
39
+ isLegend?: boolean;
40
+ /**
41
+ * Not a true `label`, but a description of the field.
42
+ * Used for inputs that have their label built into the element itself.
43
+ */
44
+ isPseudoLabel?: boolean;
45
+ /**
46
+ * Additional class names.
47
+ */
48
+ className?: string;
49
+ }
50
+ export declare const InputLabel: ({ id, label, showLabel, required, disabled, isLegend, isPseudoLabel, className, }: InputLabelProps) => React.JSX.Element;
51
+ export declare const InputMessage: ({ id, message, hasValidationMessage, validationMessageHasDecorators, validationStatus, className, }: {
52
+ id: string;
53
+ message: string;
54
+ hasValidationMessage: boolean;
55
+ validationMessageHasDecorators?: boolean;
56
+ validationStatus: string;
57
+ className?: string;
58
+ }) => React.JSX.Element;
59
+ type DecoratorVariants = 'search' | 'error' | 'success';
60
+ export declare const InputDecorator: ({ variant }: {
61
+ variant: DecoratorVariants;
62
+ }) => React.JSX.Element;
63
+ export declare const SearchShortcut: ({ inputId, shortcutLabel, }: {
64
+ inputId: string;
65
+ shortcutLabel: string;
66
+ }) => React.JSX.Element;
67
+ export declare const ClearButton: ({ id, clearLabel, handleClearInput, }: {
68
+ id: string;
69
+ clearLabel: string;
70
+ handleClearInput: MouseEventHandler<HTMLButtonElement>;
71
+ }) => React.JSX.Element;
72
+ export declare const CharacterCounter: ({ id, currentLength, maxLength, overLimitMessage, }: {
73
+ id: string;
74
+ currentLength: number;
75
+ maxLength: number;
76
+ overLimitMessage: string;
77
+ }) => React.JSX.Element;
78
+ export declare const HiddenLabel: ({ label, ...props }: {
79
+ [x: string]: any;
80
+ label: any;
81
+ }) => React.JSX.Element;
82
+ interface SelectOptionProps extends ComponentPropsWithoutRef<'li'> {
83
+ children?: ReactNode;
84
+ isActive?: boolean;
85
+ className?: string;
86
+ }
87
+ export declare const SelectOption: React.ForwardRefExoticComponent<SelectOptionProps & React.RefAttributes<HTMLLIElement>>;
88
+ export {};
@@ -0,0 +1,40 @@
1
+ export namespace cssClassesList {
2
+ let error: string;
3
+ let success: string;
4
+ let required: string;
5
+ let disabled: string;
6
+ }
7
+ export function ClearButton({ id, label, handleClearInput }: {
8
+ id: any;
9
+ label: any;
10
+ handleClearInput: any;
11
+ }): React.JSX.Element;
12
+ export namespace ClearButton {
13
+ namespace propTypes {
14
+ let id: PropTypes.Validator<string>;
15
+ let label: PropTypes.Validator<string>;
16
+ let handleClearInput: PropTypes.Requireable<(...args: any[]) => any>;
17
+ }
18
+ }
19
+ export function Decorator({ type }: {
20
+ type: any;
21
+ }): React.JSX.Element;
22
+ export namespace Decorator {
23
+ export namespace propTypes_1 {
24
+ let type: PropTypes.Validator<string>;
25
+ }
26
+ export { propTypes_1 as propTypes };
27
+ }
28
+ export function SearchShortcut({ label }: {
29
+ label: any;
30
+ }): React.JSX.Element;
31
+ export namespace SearchShortcut {
32
+ export namespace propTypes_2 {
33
+ let label_1: PropTypes.Validator<string>;
34
+ export { label_1 as label };
35
+ }
36
+ export { propTypes_2 as propTypes };
37
+ }
38
+ export const SelectOption: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
39
+ import React from 'react';
40
+ import PropTypes from 'prop-types';
@@ -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,30 @@
1
+ import React from 'react';
2
+ export declare const dashboardNavSampleMenuItems: ({
3
+ icon: string;
4
+ linkContent: React.JSX.Element;
5
+ links?: undefined;
6
+ isActive?: undefined;
7
+ } | {
8
+ icon: string;
9
+ linkContent: string;
10
+ links: {
11
+ linkContent: React.JSX.Element;
12
+ }[];
13
+ isActive?: undefined;
14
+ } | {
15
+ icon: string;
16
+ linkContent: React.JSX.Element;
17
+ isActive: boolean;
18
+ links?: undefined;
19
+ })[];
20
+ export declare const dashboardNavSampleMenuItemsRR: ({
21
+ icon: string;
22
+ linkContent: React.JSX.Element;
23
+ links?: undefined;
24
+ } | {
25
+ icon: string;
26
+ linkContent: React.JSX.Element;
27
+ links: {
28
+ linkContent: React.JSX.Element;
29
+ }[];
30
+ })[];
@@ -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,35 @@
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;
31
+ }
32
+ /**
33
+ * UI component to display site options.
34
+ */
35
+ 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,19 @@
1
+ export function NavMenu({ ariaLabel, colorType, menuItems, mobileMenuMaxWidth, className, ...props }: {
2
+ [x: string]: any;
3
+ ariaLabel?: string;
4
+ colorType?: string;
5
+ menuItems: any;
6
+ mobileMenuMaxWidth?: number;
7
+ className: any;
8
+ }): React.JSX.Element;
9
+ export namespace NavMenu {
10
+ namespace propTypes {
11
+ let ariaLabel: PropTypes.Validator<string>;
12
+ let colorType: PropTypes.Requireable<string>;
13
+ let menuItems: PropTypes.Requireable<any[]>;
14
+ let mobileMenuMaxWidth: PropTypes.Requireable<number>;
15
+ let className: PropTypes.Requireable<string>;
16
+ }
17
+ }
18
+ import React from 'react';
19
+ import PropTypes from 'prop-types';
@@ -0,0 +1,14 @@
1
+ export function NavMenuDropdown({ items, label, mobileMenuMaxWidth }: {
2
+ items: any;
3
+ label: any;
4
+ mobileMenuMaxWidth?: number;
5
+ }): React.JSX.Element;
6
+ export namespace NavMenuDropdown {
7
+ namespace propTypes {
8
+ let items: PropTypes.Requireable<any[]>;
9
+ let label: PropTypes.Requireable<string>;
10
+ let mobileMenuMaxWidth: PropTypes.Requireable<number>;
11
+ }
12
+ }
13
+ import React from 'react';
14
+ import PropTypes from 'prop-types';
@@ -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;
@@ -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 {};
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { NavigationItem } from '@components/navigation/navigation-types';
3
+ import './tab-menu.css';
4
+ export type TabMenuDropdownProps = {
5
+ /**
6
+ * Button label for the dropdown trigger.
7
+ */
8
+ buttonLabel?: string;
9
+ /**
10
+ * Label for the dropdown filter. Leave null if no filter is needed.
11
+ */
12
+ filterLabel?: string;
13
+ /**
14
+ * Placeholder for the dropdown filter.
15
+ */
16
+ filterPlaceholder?: string;
17
+ /**
18
+ * Links to display in the dropdown.
19
+ */
20
+ links?: NavigationItem[];
21
+ /**
22
+ * Minimum number of items to enable filtering.
23
+ */
24
+ minFilterItems?: number;
25
+ /**
26
+ * Text to display when no results are found.
27
+ */
28
+ noResultsText?: string;
29
+ };
30
+ /**
31
+ * TabMenuDropdown UI component
32
+ */
33
+ export declare const TabMenuDropdown: ({ buttonLabel, filterLabel, filterPlaceholder, links, minFilterItems, noResultsText, }: TabMenuDropdownProps) => React.JSX.Element;