@pantheon-systems/pds-toolkit-react 1.0.0-dev.170 → 1.0.0-dev.172

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.
@@ -1,16 +1,25 @@
1
- export function Container({ children, width, className, ...props }: {
2
- [x: string]: any;
3
- children: any;
4
- width?: string;
5
- className: any;
6
- }): React.JSX.Element;
7
- export namespace Container {
8
- namespace propTypes {
9
- export let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
10
- export { ContainerWidth as width };
11
- export let className: PropTypes.Requireable<string>;
12
- }
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;
13
20
  }
14
- import React from 'react';
15
- import PropTypes from 'prop-types';
16
- import { ContainerWidth } from '@libs/components/customPropTypes';
21
+ /**
22
+ * Container UI component
23
+ */
24
+ export declare const Container: ({ children, width, className, ...props }: ContainerProps) => React.JSX.Element;
25
+ export {};
@@ -1,4 +1,4 @@
1
- import React, { ComponentPropsWithoutRef } from 'react';
1
+ import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
  export declare const DashboardContext: React.Context<any>;
3
3
  import './dashboard-layout.css';
4
4
  /**
@@ -6,39 +6,43 @@ import './dashboard-layout.css';
6
6
  */
7
7
  export interface DashboardLayoutProps extends ComponentPropsWithoutRef<'div'> {
8
8
  /**
9
- * Child components
9
+ * Child elements to be assigned to named slots.
10
10
  */
11
- children: React.ReactNode;
11
+ children: ReactNode;
12
12
  /**
13
- * Whether to include a sidebar toggle button
13
+ * Whether to include a sidebar toggle button.
14
14
  */
15
15
  hasSidebarToggle?: boolean;
16
16
  /**
17
- * Whether the sidebar is initially expanded
17
+ * Whether the sidebar should be expanded by default.
18
18
  */
19
19
  initialSidebarExpanded?: boolean;
20
20
  /**
21
- * Width of the sidebar when collapsed in rems
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.
22
26
  */
23
27
  sidebarCollapsedWidth?: number;
24
28
  /**
25
- * Width of the sidebar when expanded in rems
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.
26
30
  */
27
31
  sidebarExpandedWidth?: number;
28
32
  /**
29
- * Sidebar toggle label
33
+ * Translatable string for sidebar toggle button.
30
34
  */
31
35
  sidebarToggleLabel?: string;
32
36
  /**
33
- * Skip link text
37
+ * Translatable string for skiplink.
34
38
  */
35
39
  skiplinkText?: string;
36
40
  /**
37
- * Additional class names
41
+ * Additional class names. Will be merged with existing component root classes.
38
42
  */
39
43
  className?: string;
40
44
  }
41
45
  /**
42
46
  * DashboardLayout UI component
43
47
  */
44
- export declare const DashboardLayout: ({ children, hasSidebarToggle, initialSidebarExpanded, sidebarCollapsedWidth, sidebarExpandedWidth, sidebarToggleLabel, skiplinkText, className, ...props }: DashboardLayoutProps) => React.JSX.Element;
48
+ export declare const DashboardLayout: ({ children, hasSidebarToggle, initialSidebarExpanded, logoLinkContent, sidebarCollapsedWidth, sidebarExpandedWidth, sidebarToggleLabel, skiplinkText, className, ...props }: DashboardLayoutProps) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
- export declare const createRandomID: () => string;
2
- export declare const getDescendants: (node: any, collect: any) => any;
3
- export declare const mergeClasses: (styles: any) => any;
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
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pantheon-systems/pds-toolkit-react",
3
3
  "technology": "React",
4
- "version": "1.0.0-dev.170",
4
+ "version": "1.0.0-dev.172",
5
5
  "description": "PDS toolkit built using the React framework",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,5 +0,0 @@
1
- export type FuiOffset = number | {
2
- mainAxis?: number;
3
- crossAxis?: number;
4
- alignmentAxis?: number | null;
5
- };