@pantheon-systems/pds-toolkit-react 1.0.0-dev.18 → 1.0.0-dev.181

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 (224) hide show
  1. package/README.md +31 -1
  2. package/_dist/components/Avatar/Avatar.d.ts +29 -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 +34 -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 +624 -0
  15. package/_dist/components/Icon/iconList.d.ts +1 -0
  16. package/_dist/components/Modal/Modal.d.ts +40 -0
  17. package/_dist/components/Pager/AdvancedPagination.d.ts +4 -0
  18. package/_dist/components/Pager/BasicPagination.d.ts +4 -0
  19. package/_dist/components/Pager/MiniPagination.d.ts +4 -0
  20. package/_dist/components/Pager/NavigationButton.d.ts +13 -0
  21. package/_dist/components/Pager/Pager.d.ts +24 -0
  22. package/_dist/components/Pager/PagerContext.d.ts +23 -0
  23. package/_dist/components/Pager/PagerItem.d.ts +14 -0
  24. package/_dist/components/Pager/usePaginationUI.d.ts +1 -0
  25. package/_dist/components/Panel/Panel.d.ts +30 -0
  26. package/_dist/components/PantheonLogo/PantheonLogo.d.ts +32 -0
  27. package/_dist/components/PantheonLogo/pantheon-logo-data.d.ts +4 -0
  28. package/_dist/components/PlatformIcon/PlatformIcon.d.ts +13 -0
  29. package/_dist/components/Popover/Popover.d.ts +57 -0
  30. package/_dist/components/PullQuote/PullQuote.d.ts +34 -0
  31. package/_dist/components/Skiplink/Skiplink.d.ts +21 -0
  32. package/_dist/components/SocialLinks/SocialLinks.d.ts +23 -0
  33. package/_dist/components/StatusIndicator/StatusIndicator.d.ts +20 -0
  34. package/_dist/components/Stepper/Stepper.d.ts +46 -0
  35. package/_dist/components/Table/Table.d.ts +15 -0
  36. package/_dist/components/TableOfContents/TableOfContents.d.ts +25 -0
  37. package/_dist/components/Tabs/Tabs.d.ts +63 -0
  38. package/_dist/components/Tag/Tag.d.ts +39 -0
  39. package/_dist/components/Tooltip/Tooltip.d.ts +51 -0
  40. package/_dist/components/badges/IndicatorBadge/IndicatorBadge.d.ts +27 -0
  41. package/_dist/components/badges/StatusBadge/StatusBadge.d.ts +35 -0
  42. package/_dist/components/badges/Tally/Tally.d.ts +35 -0
  43. package/_dist/components/buttons/Button/Button.d.ts +5 -0
  44. package/_dist/components/buttons/ButtonLink/ButtonLink.d.ts +44 -0
  45. package/_dist/components/buttons/IconButton/IconButton.d.ts +53 -0
  46. package/_dist/components/buttons/MenuButton/MenuButton.d.ts +63 -0
  47. package/_dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +53 -0
  48. package/_dist/components/buttons/SplitButton/SplitButton.d.ts +36 -0
  49. package/_dist/components/buttons/ToggleButton/ToggleButton.d.ts +35 -0
  50. package/_dist/components/cards/Card/Card.d.ts +30 -0
  51. package/_dist/components/cards/CardSelectGroup/CardSelectGroup.d.ts +56 -0
  52. package/_dist/components/cards/LinksCard/LinksCard.d.ts +17 -0
  53. package/_dist/components/cards/NewSiteCard/NewSiteCard.d.ts +25 -0
  54. package/_dist/components/cards/PricingCard/PricingCard.d.ts +64 -0
  55. package/_dist/components/cards/SiteCard/SiteCard.d.ts +25 -0
  56. package/_dist/components/expansion-panels/ExpansionPanel/ExpansionPanel.d.ts +19 -0
  57. package/_dist/components/expansion-panels/ExpansionPanelGroup/ExpansionPanelGroup.d.ts +15 -0
  58. package/_dist/components/footer/FooterHeading/FooterHeading.d.ts +15 -0
  59. package/_dist/components/footer/FooterLinks/FooterLinks.d.ts +17 -0
  60. package/_dist/components/footer/SiteFooter/SiteFooter.d.ts +18 -0
  61. package/_dist/components/inputs/Checkbox/Checkbox.d.ts +92 -0
  62. package/_dist/components/inputs/CheckboxFieldset/CheckboxFieldset.d.ts +60 -0
  63. package/_dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +76 -0
  64. package/_dist/components/inputs/Combobox/Combobox.d.ts +125 -0
  65. package/_dist/components/inputs/FileUpload/FileUpload.d.ts +37 -0
  66. package/_dist/components/inputs/InputFormatted/InputFormatted.d.ts +35 -0
  67. package/_dist/components/inputs/InputGroup/InputGroup.d.ts +19 -0
  68. package/_dist/components/inputs/InputObscured/InputObscured.d.ts +33 -0
  69. package/_dist/components/inputs/InputText/InputText.d.ts +75 -0
  70. package/_dist/components/inputs/InputWrapper/InputWrapper.d.ts +5 -0
  71. package/_dist/components/inputs/RadioGroup/RadioGroup.d.ts +92 -0
  72. package/_dist/components/inputs/Select/Select.d.ts +99 -0
  73. package/_dist/components/inputs/Switch/Switch.d.ts +74 -0
  74. package/_dist/components/inputs/TextInput/TextInput.d.ts +127 -0
  75. package/_dist/components/inputs/Textarea/Textarea.d.ts +107 -0
  76. package/_dist/components/inputs/ToggleSwitch/ToggleSwitch.d.ts +33 -0
  77. package/_dist/components/inputs/input-types.d.ts +1 -0
  78. package/_dist/components/inputs/input-utilities.d.ts +61 -0
  79. package/_dist/components/inputs/inputs-common.d.ts +40 -0
  80. package/_dist/components/navigation/DashboardNav/DashboardNav.d.ts +35 -0
  81. package/_dist/components/navigation/DashboardNav/DashboardNavItem.d.ts +25 -0
  82. package/_dist/components/navigation/DashboardNav/dashboard-nav-sample-content.d.ts +30 -0
  83. package/_dist/components/navigation/DashboardNav/dashboard-nav-utilities.d.ts +4 -0
  84. package/_dist/components/navigation/DashboardSearch/DashboardSearch.d.ts +69 -0
  85. package/_dist/components/navigation/DashboardSearch/SiteOptionDisplay.d.ts +10 -0
  86. package/_dist/components/navigation/DropdownMenu/DropdownMenu.d.ts +28 -0
  87. package/_dist/components/navigation/NavMenu/NavMenu.d.ts +19 -0
  88. package/_dist/components/navigation/NavMenu/NavMenuDropdown.d.ts +14 -0
  89. package/_dist/components/navigation/Navbar/Navbar.d.ts +60 -0
  90. package/_dist/components/navigation/SideNav/SideNav.d.ts +47 -0
  91. package/_dist/components/navigation/SideNavCompact/SideNavCompact.d.ts +47 -0
  92. package/_dist/components/navigation/UserMenu/UserMenu.d.ts +69 -0
  93. package/_dist/components/navigation/UserMenu/user-menu-sample-content.d.ts +2 -0
  94. package/_dist/components/navigation/WorkspaceSelector/WorkspaceSelector.d.ts +58 -0
  95. package/_dist/components/navigation/navigation-types.d.ts +39 -0
  96. package/_dist/components/navigation/navigation-utilities.d.ts +7 -0
  97. package/_dist/components/notifications/Banner/Banner.d.ts +47 -0
  98. package/_dist/components/notifications/InlineMessage/InlineMessage.d.ts +37 -0
  99. package/_dist/components/notifications/SectionMessage/SectionMessage.d.ts +47 -0
  100. package/_dist/components/notifications/Toaster/Toast.d.ts +30 -0
  101. package/_dist/components/notifications/Toaster/Toaster.d.ts +16 -0
  102. package/_dist/components/notifications/Toaster/useToast.d.ts +2 -0
  103. package/_dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +53 -0
  104. package/_dist/components/progress-indicators/ProgressRing/ProgressRing.d.ts +41 -0
  105. package/_dist/components/progress-indicators/Spinner/Spinner.d.ts +33 -0
  106. package/_dist/components/tiles/AvatarTileList/AvatarTileList.d.ts +22 -0
  107. package/_dist/components/tiles/StatsTileList/StatsTileList.d.ts +26 -0
  108. package/_dist/components/tiles/Tile/Tile.d.ts +23 -0
  109. package/_dist/components/tiles/TileGrid/TileGrid.d.ts +38 -0
  110. package/_dist/css/component-css/pds-avatar-tile-list.css +1 -0
  111. package/_dist/css/component-css/pds-avatar.css +1 -0
  112. package/_dist/css/component-css/pds-banner.css +1 -0
  113. package/_dist/css/component-css/pds-breadcrumbs.css +1 -0
  114. package/_dist/css/component-css/pds-button-link.css +1 -0
  115. package/_dist/css/component-css/pds-button.css +81 -0
  116. package/_dist/css/component-css/pds-callout.css +1 -0
  117. package/_dist/css/component-css/pds-card-select-group.css +1 -0
  118. package/_dist/css/component-css/pds-card.css +1 -0
  119. package/_dist/css/component-css/pds-checkbox-group.css +1 -0
  120. package/_dist/css/component-css/pds-checkbox.css +1 -0
  121. package/_dist/css/component-css/pds-combobox.css +1 -0
  122. package/_dist/css/component-css/pds-comparison-list.css +1 -0
  123. package/_dist/css/component-css/pds-cta-link.css +1 -0
  124. package/_dist/css/component-css/pds-cta-slice.css +1 -0
  125. package/_dist/css/component-css/pds-dashboard-nav.css +5 -0
  126. package/_dist/css/component-css/pds-dashboard-search.css +1 -0
  127. package/_dist/css/component-css/pds-dropdown-menu.css +2 -0
  128. package/_dist/css/component-css/pds-expansion-panel-group.css +1 -0
  129. package/_dist/css/component-css/pds-expansion-panel.css +1 -0
  130. package/_dist/css/component-css/pds-file-upload.css +5 -0
  131. package/_dist/css/component-css/pds-footer-heading.css +1 -0
  132. package/_dist/css/component-css/pds-footer-links.css +1 -0
  133. package/_dist/css/component-css/pds-heading.css +1 -0
  134. package/_dist/css/component-css/pds-icon-button.css +17 -0
  135. package/_dist/css/component-css/pds-icon-story-only.css +1 -0
  136. package/_dist/css/component-css/pds-index.css +157 -0
  137. package/_dist/css/component-css/pds-indicator-badge.css +37 -0
  138. package/_dist/css/component-css/pds-inline-message.css +1 -0
  139. package/_dist/css/component-css/pds-input-group.css +1 -0
  140. package/_dist/css/component-css/pds-input-text.css +1 -0
  141. package/_dist/css/component-css/pds-input-utilities.css +1 -0
  142. package/_dist/css/component-css/pds-input-wrapper.css +1 -0
  143. package/_dist/css/component-css/pds-inputs-common-deprecated.css +1 -0
  144. package/_dist/css/component-css/pds-inputs-common.css +1 -0
  145. package/_dist/css/component-css/pds-links-card.css +1 -0
  146. package/_dist/css/component-css/pds-menu-button.css +1 -0
  147. package/_dist/css/component-css/pds-modal.css +1 -0
  148. package/_dist/css/component-css/pds-nav-menu.css +1 -0
  149. package/_dist/css/component-css/pds-navbar.css +3 -0
  150. package/_dist/css/component-css/pds-new-site-card.css +1 -0
  151. package/_dist/css/component-css/pds-pager.css +1 -0
  152. package/_dist/css/component-css/pds-panel.css +1 -0
  153. package/_dist/css/component-css/pds-pantheon-logo.css +1 -0
  154. package/_dist/css/component-css/pds-platform-icon.css +1 -0
  155. package/_dist/css/component-css/pds-popover.css +1 -0
  156. package/_dist/css/component-css/pds-pricing-card-local.css +1 -0
  157. package/_dist/css/component-css/pds-pricing-card.css +1 -0
  158. package/_dist/css/component-css/pds-progress-bar.css +1 -0
  159. package/_dist/css/component-css/pds-progress-ring.css +1 -0
  160. package/_dist/css/component-css/pds-pull-quote.css +1 -0
  161. package/_dist/css/component-css/pds-radio-group.css +1 -0
  162. package/_dist/css/component-css/pds-section-message.css +1 -0
  163. package/_dist/css/component-css/pds-segmented-button.css +1 -0
  164. package/_dist/css/component-css/pds-select.css +1 -0
  165. package/_dist/css/component-css/pds-side-nav-compact.css +1 -0
  166. package/_dist/css/component-css/pds-side-nav.css +1 -0
  167. package/_dist/css/component-css/pds-site-card.css +1 -0
  168. package/_dist/css/component-css/pds-site-footer.css +1 -0
  169. package/_dist/css/component-css/pds-skiplink.css +1 -0
  170. package/_dist/css/component-css/pds-social-links.css +1 -0
  171. package/_dist/css/component-css/pds-spinner.css +1 -0
  172. package/_dist/css/component-css/pds-split-button.css +2 -0
  173. package/_dist/css/component-css/pds-stats-tile-list.css +1 -0
  174. package/_dist/css/component-css/pds-status-badge.css +9 -0
  175. package/_dist/css/component-css/pds-status-indicator.css +1 -0
  176. package/_dist/css/component-css/pds-stepper.css +1 -0
  177. package/_dist/css/component-css/pds-switch.css +3 -0
  178. package/_dist/css/component-css/pds-table-of-contents.css +1 -0
  179. package/_dist/css/component-css/pds-table.css +1 -0
  180. package/_dist/css/component-css/pds-tabs.css +1 -0
  181. package/_dist/css/component-css/pds-tag.css +1 -0
  182. package/_dist/css/component-css/pds-tally.css +1 -0
  183. package/_dist/css/component-css/pds-text-input.css +1 -0
  184. package/_dist/css/component-css/pds-textarea.css +1 -0
  185. package/_dist/css/component-css/pds-tile.css +1 -0
  186. package/_dist/css/component-css/pds-tiles-common.css +1 -0
  187. package/_dist/css/component-css/pds-toaster.css +1 -0
  188. package/_dist/css/component-css/pds-toggle-button.css +1 -0
  189. package/_dist/css/component-css/pds-toggle-switch.css +3 -0
  190. package/_dist/css/component-css/pds-tooltip.css +1 -0
  191. package/_dist/css/component-css/pds-user-menu-story-only.css +1 -0
  192. package/_dist/css/component-css/pds-user-menu.css +1 -0
  193. package/_dist/css/component-css/pds-workspace-selector.css +1 -0
  194. package/_dist/css/design-tokens/pds-design-tokens-dark-mode.css +272 -0
  195. package/_dist/css/design-tokens/pds-design-tokens-light-mode.css +333 -0
  196. package/_dist/css/design-tokens/pds-design-tokens.css +105 -0
  197. package/_dist/css/pds-components.css +120 -70
  198. package/_dist/css/pds-core.css +6 -2
  199. package/_dist/css/pds-layouts.css +2 -1
  200. package/_dist/index.css +1 -0
  201. package/_dist/index.d.ts +93 -0
  202. package/_dist/index.js +10947 -0
  203. package/_dist/index.js.map +1 -0
  204. package/_dist/layouts/Container/Container.d.ts +25 -0
  205. package/_dist/layouts/DashboardLayout/DashboardLayout.d.ts +52 -0
  206. package/_dist/layouts/DashboardLayout/DemoContent.d.ts +2 -0
  207. package/_dist/layouts/FlexContainer/FlexContainer.d.ts +27 -0
  208. package/_dist/layouts/GlobalWrapper/GlobalWrapper.d.ts +19 -0
  209. package/_dist/layouts/SidebarLayout/SidebarLayout.d.ts +36 -0
  210. package/_dist/layouts/StepperLayout/StepperLayout.d.ts +13 -0
  211. package/_dist/layouts/ThreeItemLayout/ThreeItemLayout.d.ts +15 -0
  212. package/_dist/layouts/TwoItemLayout/TwoItemLayout.d.ts +17 -0
  213. package/_dist/layouts/layout-types.d.ts +1 -0
  214. package/_dist/libs/components/customPropTypes.d.ts +85 -0
  215. package/_dist/libs/components/utils.d.ts +4 -0
  216. package/_dist/libs/types/custom-types.d.ts +10 -0
  217. package/_dist/utilities/context-providers/ResponsiveContext/ResponsiveContext.d.ts +6 -0
  218. package/_dist/vars/spacing.d.ts +17 -0
  219. package/_dist/vars/z-index.d.ts +5 -0
  220. package/package.json +85 -43
  221. package/_dist/cjs/index.js +0 -98
  222. package/_dist/cjs/index.js.map +0 -1
  223. package/_dist/esm/index.js +0 -98
  224. package/_dist/esm/index.js.map +0 -1
@@ -0,0 +1,25 @@
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { ContainerWidth } from '@libs/types/custom-types';
3
+ import '../../utilities/container.css';
4
+ /**
5
+ * Prop types for Container
6
+ */
7
+ interface ContainerProps extends ComponentPropsWithoutRef<'div'> {
8
+ /**
9
+ * Container content.
10
+ */
11
+ children?: ReactNode;
12
+ /**
13
+ * Width of the container.
14
+ */
15
+ width?: ContainerWidth;
16
+ /**
17
+ * Additional class names
18
+ */
19
+ className?: string;
20
+ }
21
+ /**
22
+ * Container UI component
23
+ */
24
+ export declare const Container: ({ children, width, className, ...props }: ContainerProps) => React.JSX.Element;
25
+ export {};
@@ -0,0 +1,52 @@
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ export declare const DashboardContext: React.Context<any>;
3
+ import './dashboard-layout.css';
4
+ /**
5
+ * Prop types for DashboardLayout
6
+ */
7
+ export interface DashboardLayoutProps extends ComponentPropsWithoutRef<'div'> {
8
+ /**
9
+ * Child elements to be assigned to named slots.
10
+ */
11
+ children: ReactNode;
12
+ /**
13
+ * Whether to include a sidebar toggle button.
14
+ */
15
+ hasSidebarToggle?: boolean;
16
+ /**
17
+ * Whether the sidebar should be expanded by default.
18
+ */
19
+ initialSidebarExpanded?: boolean;
20
+ /**
21
+ * A fully-formed link element using the router of your choice. The link text will be used as the aria-label. If the logo should not be a link, set to `null`.
22
+ */
23
+ logoLinkContent?: ReactNode;
24
+ /**
25
+ * Width of the sidebar when collapsed in rems. This should not need to be modified.
26
+ */
27
+ sidebarCollapsedWidth?: number;
28
+ /**
29
+ * Width of the sidebar when expanded in rems. This should not need to be modified, unless slightly to accommodate longer top-level navigation items.
30
+ */
31
+ sidebarExpandedWidth?: number;
32
+ /**
33
+ * Translatable string for sidebar toggle button.
34
+ */
35
+ sidebarToggleLabel?: string;
36
+ /**
37
+ * Translatable string for skiplink.
38
+ */
39
+ skiplinkText?: string;
40
+ /**
41
+ * Additional class names. Will be merged with existing component root classes.
42
+ */
43
+ className?: string;
44
+ /**
45
+ * for admin view UI changes
46
+ */
47
+ isAdmin?: boolean;
48
+ }
49
+ /**
50
+ * DashboardLayout UI component
51
+ */
52
+ export declare const DashboardLayout: ({ children, hasSidebarToggle, initialSidebarExpanded, isAdmin, logoLinkContent, sidebarCollapsedWidth, sidebarExpandedWidth, sidebarToggleLabel, skiplinkText, className, ...props }: DashboardLayoutProps) => React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DemoContent: () => React.JSX.Element;
@@ -0,0 +1,27 @@
1
+ export function FlexContainer({ alignContent, alignItems, flexDirection, flexWrap, justifyContent, mobileFlex, spacing, children, className, ...props }: {
2
+ [x: string]: any;
3
+ alignContent: any;
4
+ alignItems: any;
5
+ flexDirection: any;
6
+ flexWrap: any;
7
+ justifyContent: any;
8
+ mobileFlex?: string;
9
+ spacing?: string;
10
+ children: any;
11
+ className: any;
12
+ }): React.JSX.Element;
13
+ export namespace FlexContainer {
14
+ namespace propTypes {
15
+ let alignContent: PropTypes.Requireable<string>;
16
+ let alignItems: PropTypes.Requireable<string>;
17
+ let flexDirection: PropTypes.Requireable<string>;
18
+ let flexWrap: PropTypes.Requireable<string>;
19
+ let justifyContent: PropTypes.Requireable<string>;
20
+ let mobileFlex: PropTypes.Requireable<string>;
21
+ let spacing: PropTypes.Requireable<string>;
22
+ let children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
23
+ let className: PropTypes.Requireable<string>;
24
+ }
25
+ }
26
+ import React from 'react';
27
+ import PropTypes from 'prop-types';
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ /**
3
+ * Prop types for GlobalWrapper
4
+ */
5
+ interface GlobalWrapperProps {
6
+ /**
7
+ * Child components
8
+ */
9
+ children: React.ReactNode;
10
+ /**
11
+ * Mobile menu will be enabled when viewport is at or below this number in pixels.
12
+ */
13
+ mobileMenuMaxWidth?: number;
14
+ }
15
+ /**
16
+ * GlobalWrapper wrapper component.
17
+ */
18
+ export declare const GlobalWrapper: ({ children, mobileMenuMaxWidth, }: GlobalWrapperProps) => React.JSX.Element;
19
+ export {};
@@ -0,0 +1,36 @@
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { GridGapOptions } from '@layouts/layout-types';
3
+ /**
4
+ * Prop types for SidebarLayout
5
+ */
6
+ interface SidebarLayoutProps extends ComponentPropsWithoutRef<'div'> {
7
+ /**
8
+ * Children to render in the layout.
9
+ */
10
+ children: ReactNode;
11
+ /**
12
+ * Gap between grid items
13
+ */
14
+ gridGap?: GridGapOptions;
15
+ /**
16
+ * Sidebar location.
17
+ */
18
+ sidebarLocation?: 'left' | 'right';
19
+ /**
20
+ * Sidebar location on mobile.
21
+ */
22
+ sidebarMobileLocation?: 'before' | 'after';
23
+ /**
24
+ * Sidebar width.
25
+ */
26
+ sidebarWidth?: 'narrow' | 'standard' | 'wide';
27
+ /**
28
+ * Additional class names
29
+ */
30
+ className?: string;
31
+ }
32
+ /**
33
+ * SidebarLayout UI component
34
+ */
35
+ export declare const SidebarLayout: ({ children, gridGap, sidebarLocation, sidebarMobileLocation, sidebarWidth, className, ...props }: SidebarLayoutProps) => React.JSX.Element;
36
+ export {};
@@ -0,0 +1,13 @@
1
+ export function StepperLayout({ children, className, ...props }: {
2
+ [x: string]: any;
3
+ children: any;
4
+ className: any;
5
+ }): React.JSX.Element;
6
+ export namespace StepperLayout {
7
+ namespace propTypes {
8
+ let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
9
+ let className: PropTypes.Requireable<string>;
10
+ }
11
+ }
12
+ import React from 'react';
13
+ import PropTypes from 'prop-types';
@@ -0,0 +1,15 @@
1
+ export function ThreeItemLayout({ children, gridGap, className, ...props }: {
2
+ [x: string]: any;
3
+ children: any;
4
+ gridGap?: string;
5
+ className: any;
6
+ }): React.JSX.Element;
7
+ export namespace ThreeItemLayout {
8
+ namespace propTypes {
9
+ let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
10
+ let gridGap: PropTypes.Requireable<string>;
11
+ let className: PropTypes.Requireable<string>;
12
+ }
13
+ }
14
+ import React from 'react';
15
+ import PropTypes from 'prop-types';
@@ -0,0 +1,17 @@
1
+ export function TwoItemLayout({ children, gridGap, layoutVariant, className, ...props }: {
2
+ [x: string]: any;
3
+ children: any;
4
+ gridGap?: string;
5
+ layoutVariant?: string;
6
+ className: any;
7
+ }): React.JSX.Element;
8
+ export namespace TwoItemLayout {
9
+ namespace propTypes {
10
+ let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
+ let gridGap: PropTypes.Requireable<string>;
12
+ let layoutVariant: PropTypes.Requireable<string>;
13
+ let className: PropTypes.Requireable<string>;
14
+ }
15
+ }
16
+ import React from 'react';
17
+ import PropTypes from 'prop-types';
@@ -0,0 +1 @@
1
+ export type GridGapOptions = 'narrow' | 'standard' | 'wide';
@@ -0,0 +1,85 @@
1
+ export const PDSIcon: PropTypes.Requireable<string>;
2
+ export const ContainerWidth: PropTypes.Requireable<string>;
3
+ export const HeadingItemType: PropTypes.Requireable<Required<PropTypes.InferProps<{
4
+ /**
5
+ * Label for a menu item
6
+ */
7
+ label: PropTypes.Validator<string>;
8
+ /**
9
+ * Is the item a heading?
10
+ */
11
+ isHeading: PropTypes.Validator<boolean>;
12
+ }>>>;
13
+ export const LinkItemType: PropTypes.Requireable<Required<PropTypes.InferProps<{
14
+ /**
15
+ * Description of the item
16
+ */
17
+ description: PropTypes.Requireable<string>;
18
+ /**
19
+ * Is this item disabled?
20
+ */
21
+ disabled: PropTypes.Requireable<boolean>;
22
+ /**
23
+ * Optional icon for this item. Choose from available icons in the Icon component.
24
+ */
25
+ iconName: PropTypes.Requireable<string>;
26
+ /**
27
+ * Is the item a link?
28
+ */
29
+ isLink: PropTypes.Validator<boolean>;
30
+ /**
31
+ * The content of the link.
32
+ */
33
+ linkContent: PropTypes.Requireable<PropTypes.ReactNodeLike>;
34
+ /**
35
+ * Optional `data-testid` value for this item.
36
+ */
37
+ testId: PropTypes.Requireable<string>;
38
+ }>>>;
39
+ export const MenuItemType: PropTypes.Requireable<Required<PropTypes.InferProps<{
40
+ /**
41
+ * (optional) Callback function to execute when menu item is activated
42
+ */
43
+ callback: PropTypes.Requireable<(...args: any[]) => any>;
44
+ /**
45
+ * Description of the item
46
+ */
47
+ description: PropTypes.Requireable<string>;
48
+ /**
49
+ * Is this item disabled?
50
+ */
51
+ disabled: PropTypes.Requireable<boolean>;
52
+ /**
53
+ * Optional icon for this item. Choose from available icons in the Icon component.
54
+ */
55
+ iconName: PropTypes.Requireable<string>;
56
+ /**
57
+ * Optional ID value for this item.
58
+ */
59
+ id: PropTypes.Requireable<string>;
60
+ /**
61
+ * Label for a menu item
62
+ */
63
+ label: PropTypes.Validator<string>;
64
+ /**
65
+ * Optional `data-testid` value for this item.
66
+ */
67
+ testId: PropTypes.Requireable<string>;
68
+ }>>>;
69
+ export const NodeItemType: PropTypes.Requireable<Required<PropTypes.InferProps<{
70
+ /**
71
+ * Is the item a node?
72
+ */
73
+ isNode: PropTypes.Validator<boolean>;
74
+ /**
75
+ * The content of the node.
76
+ */
77
+ nodeContent: PropTypes.Requireable<PropTypes.ReactNodeLike>;
78
+ }>>>;
79
+ export const SeparatorItemType: PropTypes.Requireable<Required<PropTypes.InferProps<{
80
+ /**
81
+ * Is the item a separator?
82
+ */
83
+ isSeparator: PropTypes.Validator<boolean>;
84
+ }>>>;
85
+ import PropTypes from 'prop-types';
@@ -0,0 +1,4 @@
1
+ export function createRandomID(): string;
2
+ export function getDescendants(node: any, collect: any): any;
3
+ export function mergeClasses(styles: any): any;
4
+ export function initiateSlots(children: any): {};
@@ -0,0 +1,10 @@
1
+ export type ButtonDisplayType = 'label-only' | 'icon-start' | 'icon-end';
2
+ export type ButtonSize = 'sm' | 'md' | 'lg';
3
+ export type ButtonType = 'button' | 'submit' | 'reset';
4
+ export type ButtonVariant = 'primary' | 'secondary' | 'subtle' | 'brand' | 'brand-secondary' | 'critical' | 'navbar' | 'inline';
5
+ export type ContainerWidth = 'narrow' | 'standard' | 'wide' | 'x-wide' | 'full';
6
+ export type FuiOffset = number | {
7
+ mainAxis?: number;
8
+ crossAxis?: number;
9
+ alignmentAxis?: number | null;
10
+ };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const ResponsiveContext: React.Context<any>;
3
+ export declare const ResponsiveContextProvider: ({ children, mobileMenuMaxWidth, }: {
4
+ children: any;
5
+ mobileMenuMaxWidth?: number;
6
+ }) => React.JSX.Element;
@@ -0,0 +1,17 @@
1
+ export const SPACING_2XL: 1.953;
2
+ export const SPACING_2XS: 0.512;
3
+ export const SPACING_3XL: 2.441;
4
+ export const SPACING_3XS: 0.41;
5
+ export const SPACING_4XL: 3.052;
6
+ export const SPACING_4XS: 0.328;
7
+ export const SPACING_5XL: 3.815;
8
+ export const SPACING_5XS: 0.25;
9
+ export const SPACING_6XL: 4.678;
10
+ export const SPACING_6XS: 0.125;
11
+ export const SPACING_7XL: 5.96;
12
+ export const SPACING_8XL: 7.451;
13
+ export const SPACING_L: 1.25;
14
+ export const SPACING_M: 1;
15
+ export const SPACING_S: 0.8;
16
+ export const SPACING_XL: 1.563;
17
+ export const SPACING_XS: 0.64;
@@ -0,0 +1,5 @@
1
+ export const Z_INDEX_NAVIGATION: 100;
2
+ export const Z_INDEX_DROPDOWN: 200;
3
+ export const Z_INDEX_NOTIFICATIONS: 300;
4
+ export const Z_INDEX_OVERLAY: 400;
5
+ export const Z_INDEX_MODAL: 500;
package/package.json CHANGED
@@ -1,42 +1,65 @@
1
1
  {
2
2
  "name": "@pantheon-systems/pds-toolkit-react",
3
3
  "technology": "React",
4
- "version": "1.0.0-dev.18",
4
+ "version": "1.0.0-dev.181",
5
5
  "description": "PDS toolkit built using the React framework",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/pantheon-systems/pds-toolkit-react.git"
9
9
  },
10
10
  "author": "Pantheon Systems",
11
+ "engines": {
12
+ "node": ">=18.0.0 <=20.x"
13
+ },
11
14
  "bugs": {
12
15
  "url": "https://github.com/pantheon-systems/pds-toolkit-react/issues"
13
16
  },
14
17
  "homepage": "https://github.com/pantheon-systems/pds-toolkit-react#readme",
15
- "main": "_dist/cjs/index.js",
16
- "module": "_dist/esm/index.js",
18
+ "module": "_dist/index.js",
19
+ "types": "_dist/index.d.ts",
20
+ "exports": {
21
+ ".": {
22
+ "types": "./_dist/index.d.ts",
23
+ "import": "./_dist/index.js"
24
+ },
25
+ "./*": "./_dist/*"
26
+ },
17
27
  "files": [
18
28
  "_dist"
19
29
  ],
30
+ "sideEffects": [
31
+ "*.css"
32
+ ],
33
+ "type": "module",
20
34
  "scripts": {
21
- "build": "rollup -c",
22
- "postbuild": "npm run build:css && npm run build:css:components && npm run build:css:layouts",
35
+ "build": "npm run vite build && npm run build:types || true",
36
+ "build:types": "tsc -p tsconfig.build.json",
37
+ "prebuild": "vendor-copy",
38
+ "postbuild": "npm run build:css && npm run build:css:components && npm run build:css:layouts && npm run build:css:packageExtraCss",
23
39
  "build:css": "postcss src/core.css -o _dist/css/pds-core.css",
24
40
  "build:css:components": "postcss src/components/index.css -o _dist/css/pds-components.css",
25
41
  "build:css:layouts": "postcss src/layouts/index.css -o _dist/css/pds-layouts.css",
42
+ "build:css:packageExtraCss": "node scripts/package-extra-css.js",
26
43
  "build:css:watch": "npm run build:css -- -w",
44
+ "typecheck:tsc": "tsc --noEmit",
45
+ "typecheck:attw": "attw --pack . --ignore-rules cjs-resolves-to-esm no-resolution internal-resolution-error",
46
+ "typecheck:publint": "npx publint",
47
+ "typecheck": "npm run typecheck:attw && npm run typecheck:publint && npm run typecheck:tsc",
27
48
  "prestorybook": "npm run build:css",
28
49
  "storybook": "storybook dev -p 6006",
29
50
  "prestorybook:build": "npm run build:css",
30
51
  "storybook:build": "storybook build",
31
52
  "develop": "concurrently --raw --kill-others \"npm run storybook\" \"npm run build:css:watch\"",
32
- "eslint": "eslint --ext .jsx --ext .js",
33
- "eslint:all": "eslint src --ext .jsx --ext .js --cache",
53
+ "predevelop": "vendor-copy",
54
+ "eslint": "eslint --ext .jsx,.tsx,.js,.ts",
55
+ "eslint:all": "eslint src --ext .jsx,.tsx,.js,.ts --cache",
56
+ "format:fix": "prettier . --write && npm run eslint:all -- --fix",
34
57
  "pretest": "npm run build:css",
35
58
  "test": "playwright test",
36
59
  "pretest:vrt": "npm run build:css",
37
- "test:vrt": "playwright test --project 'vrt:chromium' 'vrt:firefox' 'vrt:webkit' 'vrt:Mobile Chrome' 'vrt:Mobile Safari'",
38
- "pretest:vrt:update-snapshots": "npm run build:css",
39
- "test:vrt:update-snapshots": "npm run test:vrt -- --update-snapshots",
60
+ "test:vrt": "playwright test --project 'firefox' 'safari' 'iphone'",
61
+ "pretest:vrt:update": "npm run build:css",
62
+ "test:vrt:update": "npm run test:vrt -- --update-snapshots",
40
63
  "pretest:a11y:generate": "npm run build:css",
41
64
  "test:a11y:generate": "npm run storybook:build && npx sb extract && node __tests__/a11y/a11y.generate-tests.js",
42
65
  "test:a11y": "playwright test --project 'a11y'",
@@ -48,72 +71,91 @@
48
71
  "generate:foundation": "plop foundation",
49
72
  "generate:pattern": "plop pattern",
50
73
  "generate:utility": "plop utility",
51
- "prepare": "husky install"
74
+ "prepare": "husky install",
75
+ "build-storybook": "storybook build",
76
+ "vite": "vite"
52
77
  },
53
78
  "devDependencies": {
79
+ "@arethetypeswrong/cli": "^0.15.3",
54
80
  "@axe-core/playwright": "^4.7.0",
55
81
  "@babel/preset-env": "^7.21.5",
56
82
  "@babel/preset-react": "^7.18.6",
57
83
  "@csstools/postcss-design-tokens": "^2.0.4",
58
84
  "@csstools/postcss-global-data": "^1.0.3",
59
- "@floating-ui/react-dom": "~1.3.0",
60
- "@pantheon-systems/pds-design-tokens": "^1.0.0-dev.75",
61
85
  "@playwright/test": "^1.36.2",
62
- "@rollup/plugin-babel": "^6.0.3",
63
- "@rollup/plugin-commonjs": "^24.1.0",
64
- "@rollup/plugin-node-resolve": "^15.0.2",
65
- "@storybook/addon-a11y": "^7.4.0",
66
- "@storybook/addon-essentials": "^7.4.0",
67
- "@storybook/addon-interactions": "^7.4.0",
68
- "@storybook/addon-links": "^7.4.0",
69
- "@storybook/addon-postcss": "^2.0.0",
70
- "@storybook/addon-styling": "^1.3.7",
71
- "@storybook/blocks": "^7.4.0",
72
- "@storybook/manager-api": "^7.4.0",
73
- "@storybook/react": "^7.4.0",
74
- "@storybook/react-webpack5": "^7.4.0",
75
- "@storybook/testing-library": "^0.2.0",
76
- "@storybook/theming": "^7.4.0",
86
+ "@storybook/addon-a11y": "^8.2.4",
87
+ "@storybook/addon-essentials": "^8.2.4",
88
+ "@storybook/addon-interactions": "^8.2.4",
89
+ "@storybook/addon-links": "^8.2.4",
90
+ "@storybook/addon-webpack5-compiler-swc": "^1.0.2",
91
+ "@storybook/blocks": "^8.2.4",
92
+ "@storybook/react": "^8.2.4",
93
+ "@storybook/react-vite": "^8.2.4",
94
+ "@storybook/react-webpack5": "^8.2.4",
95
+ "@storybook/test": "^8.2.4",
96
+ "@storybook/theming": "^8.2.4",
97
+ "@typescript-eslint/eslint-plugin": "^7.7.0",
98
+ "@typescript-eslint/parser": "^7.7.0",
99
+ "@vitejs/plugin-react": "^4.3.0",
77
100
  "axe-html-reporter": "^2.2.3",
78
101
  "concurrently": "^8.0.1",
79
102
  "cssnano": "^6.0.1",
80
- "eslint": "^8.40.0",
81
- "eslint-config-prettier": "^8.8.0",
103
+ "eslint": "^8.57.0",
104
+ "eslint-config-prettier": "^9.1.0",
105
+ "eslint-plugin-prettier": "^5.1.3",
82
106
  "eslint-plugin-react": "^7.32.2",
83
- "eslint-plugin-storybook": "^0.6.13",
107
+ "eslint-plugin-storybook": "^0.8.0",
108
+ "fast-glob": "^3.3.2",
84
109
  "husky": "^8.0.3",
85
110
  "lint-staged": "^13.2.3",
86
111
  "plop": "^3.1.2",
87
- "postcss": "^8.4.23",
112
+ "postcss": "^8.4.38",
88
113
  "postcss-cli": "^10.1.0",
89
114
  "postcss-custom-media": "^9.1.3",
90
115
  "postcss-import": "^15.1.0",
91
116
  "postcss-insert": "^1.0.0",
117
+ "postcss-loader": "^8.1.1",
92
118
  "postcss-nested": "^6.0.1",
93
- "prettier": "^2.8.8",
119
+ "prettier": "3.2.5",
120
+ "prettier-plugin-css-order": "^2.1.2",
94
121
  "prop-types": "^15.8.1",
95
122
  "react": "^18.2.0",
96
123
  "react-dom": "^18.2.0",
97
- "rollup": "^2.79.1",
98
- "rollup-plugin-peer-deps-external": "^2.2.4",
99
- "rollup-plugin-postcss": "^4.0.2",
100
- "rollup-plugin-terser": "^7.0.2",
101
- "storybook": "^7.4.0",
102
- "storybook-dark-mode": "^3.0.1"
124
+ "storybook": "^8.2.4",
125
+ "storybook-dark-mode": "^4.0.1",
126
+ "typescript": "^5.4.5",
127
+ "vendor-copy": "^3.0.1",
128
+ "vite": "^5.2.11",
129
+ "vite-plugin-lib-inject-css": "^2.1.1",
130
+ "vite-tsconfig-paths": "^4.3.2"
103
131
  },
104
132
  "peerDependencies": {
105
133
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0"
106
134
  },
107
135
  "dependencies": {
108
136
  "@floating-ui/react": "^0.24.3",
109
- "@tippy.js/react": "^3.1.1",
137
+ "@floating-ui/react-dom": "~1.3.0",
138
+ "@pantheon-systems/pds-design-tokens": "^1.0.0-dev.140",
139
+ "@reactuses/core": "^5.0.15",
110
140
  "focus-trap-react": "^10.2.1",
141
+ "hash-sum": "^2.0.0",
142
+ "react-hotkeys-hook": "^4.5.1",
111
143
  "react-router-dom": "^6.13.0",
112
- "tippy.js": "^6.3.7"
144
+ "react-toastify": "^9.0.3"
113
145
  },
114
146
  "lint-staged": {
115
- "src/**/*.{js,jsx}": [
147
+ "src/**/*.{js,jsx,ts,tsx}": [
116
148
  "npm run eslint"
117
149
  ]
118
- }
150
+ },
151
+ "vendorCopy": [
152
+ {
153
+ "from": "node_modules/@pantheon-systems/pds-design-tokens/build/css/pds-design-tokens-dark-mode.css",
154
+ "to": "public/design-tokens/pds-design-tokens-dark-mode.css"
155
+ },
156
+ {
157
+ "from": "node_modules/@pantheon-systems/pds-design-tokens/build/css/pds-design-tokens-light-mode.css",
158
+ "to": "public/design-tokens/pds-design-tokens-light-mode.css"
159
+ }
160
+ ]
119
161
  }