@pantheon-systems/pds-toolkit-react 1.0.0-dev.192 → 1.0.0-dev.194
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_dist/components/LinkNewWindow/LinkNewWindow.d.ts +5 -1
- package/_dist/components/Panel/Panel.d.ts +7 -2
- package/_dist/components/SiteDashboardHeading/SiteDashboardHeading.d.ts +28 -0
- package/_dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +7 -2
- package/_dist/components/buttons/ToggleButton/ToggleButton.d.ts +7 -3
- package/_dist/components/inputs/FileUpload/FileUpload.d.ts +1 -1
- package/_dist/components/navigation/DashboardSearch/SiteOptionDisplay.d.ts +2 -2
- package/_dist/css/component-css/pds-index.css +4 -4
- package/_dist/css/component-css/pds-link-new-window.css +1 -1
- package/_dist/css/component-css/pds-panel.css +1 -1
- package/_dist/css/component-css/pds-section-message.css +1 -1
- package/_dist/css/component-css/pds-segmented-button.css +1 -1
- package/_dist/css/component-css/pds-side-nav.css +1 -1
- package/_dist/css/component-css/pds-site-dashboard-heading.css +1 -0
- package/_dist/css/component-css/pds-tab-menu.css +2 -2
- package/_dist/css/pds-components.css +4 -4
- package/_dist/css/pds-core.css +1 -1
- package/_dist/css/pds-layouts.css +3 -2
- package/_dist/index.css +1 -1
- package/_dist/index.d.ts +3 -2
- package/_dist/index.js +2323 -2260
- package/_dist/index.js.map +1 -1
- package/_dist/layouts/{DashboardLayout/DashboardLayout.d.ts → DashboardGlobal/DashboardGlobal.d.ts} +10 -9
- package/_dist/layouts/DashboardInner/DashboardInner.d.ts +20 -0
- package/_dist/libs/types/custom-types.d.ts +6 -0
- package/_dist/mocks/data/navigation-items.d.ts +357 -0
- package/_dist/mocks/markup/dashboard-main-content.d.ts +16 -0
- package/_dist/mocks/markup/dashboard-navigation.d.ts +11 -0
- package/_dist/mocks/markup/modal.d.ts +2 -0
- package/package.json +1 -1
- package/_dist/components/navigation/DashboardNav/dashboard-nav-sample-content.d.ts +0 -30
- package/_dist/components/navigation/UserMenu/user-menu-sample-content.d.ts +0 -2
- package/_dist/components/navigation/WorkspaceSelector/workspace-sample-content.d.ts +0 -35
- package/_dist/layouts/DashboardLayout/DemoContent.d.ts +0 -2
|
@@ -8,6 +8,10 @@ export interface LinkNewWindowProps extends ComponentPropsWithoutRef<'a'> {
|
|
|
8
8
|
* Content for the LinkNewWindow.
|
|
9
9
|
*/
|
|
10
10
|
children?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Optional font size for the LinkNewWindow. If not provided, the font size will be inherited from the parent element.
|
|
13
|
+
*/
|
|
14
|
+
fontSize?: 'sm' | 'md' | 'lg';
|
|
11
15
|
/**
|
|
12
16
|
* Translation string for the "opens in a new window" message.
|
|
13
17
|
*/
|
|
@@ -24,4 +28,4 @@ export interface LinkNewWindowProps extends ComponentPropsWithoutRef<'a'> {
|
|
|
24
28
|
/**
|
|
25
29
|
* LinkNewWindow UI component
|
|
26
30
|
*/
|
|
27
|
-
export declare const LinkNewWindow: ({ children, newWindowText, url, className, ...props }: LinkNewWindowProps) => React.JSX.Element;
|
|
31
|
+
export declare const LinkNewWindow: ({ children, fontSize, newWindowText, url, className, ...props }: LinkNewWindowProps) => React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import './panel.css';
|
|
3
|
+
import { GridGapOptions } from '@layouts/layout-types';
|
|
3
4
|
type StatusType = 'info' | 'success' | 'warning' | 'critical';
|
|
4
5
|
export interface PanelProps extends ComponentPropsWithoutRef<'div'> {
|
|
5
6
|
/**
|
|
@@ -10,10 +11,14 @@ export interface PanelProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
10
11
|
* Should the panel show a status indicator.
|
|
11
12
|
*/
|
|
12
13
|
hasStatusIndicator?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Padding for the panel.
|
|
16
|
+
*/
|
|
17
|
+
padding?: GridGapOptions;
|
|
13
18
|
/**
|
|
14
19
|
* Status type for panel. Only renders if `hasStatusIndicator` is true.
|
|
15
20
|
*/
|
|
16
|
-
statusType
|
|
21
|
+
statusType?: StatusType;
|
|
17
22
|
/**
|
|
18
23
|
* Which variant of panel to render
|
|
19
24
|
*/
|
|
@@ -26,5 +31,5 @@ export interface PanelProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
26
31
|
/**
|
|
27
32
|
* Panel UI component
|
|
28
33
|
*/
|
|
29
|
-
export declare const Panel: ({ children, hasStatusIndicator, statusType, variant, className, ...props }: PanelProps) => React.JSX.Element;
|
|
34
|
+
export declare const Panel: ({ children, hasStatusIndicator, padding, statusType, variant, className, ...props }: PanelProps) => React.JSX.Element;
|
|
30
35
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { SitePlanLevel, SiteType } from '@libs/types/custom-types';
|
|
3
|
+
import './site-dashboard-heading.css';
|
|
4
|
+
/**
|
|
5
|
+
* Prop types for SiteDashboardHeading
|
|
6
|
+
*/
|
|
7
|
+
export interface SiteDashboardHeadingProps extends ComponentPropsWithoutRef<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Name of the site.
|
|
10
|
+
*/
|
|
11
|
+
siteName: string;
|
|
12
|
+
/**
|
|
13
|
+
* Site plan level.
|
|
14
|
+
*/
|
|
15
|
+
sitePlanLevel?: SitePlanLevel;
|
|
16
|
+
/**
|
|
17
|
+
* Site type.
|
|
18
|
+
*/
|
|
19
|
+
siteType?: SiteType;
|
|
20
|
+
/**
|
|
21
|
+
* Additional class names
|
|
22
|
+
*/
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* SiteDashboardHeading UI component
|
|
27
|
+
*/
|
|
28
|
+
export declare const SiteDashboardHeading: ({ siteName, sitePlanLevel, siteType, className, ...props }: SiteDashboardHeadingProps) => React.JSX.Element;
|
|
@@ -5,6 +5,7 @@ import './segmented-button.css';
|
|
|
5
5
|
* Structure for each option in the SegmentedButton component.
|
|
6
6
|
*/
|
|
7
7
|
interface OptionType {
|
|
8
|
+
id?: string;
|
|
8
9
|
value: string;
|
|
9
10
|
label: string;
|
|
10
11
|
iconName?: PDSIcon;
|
|
@@ -28,7 +29,7 @@ export interface SegmentedButtonProps {
|
|
|
28
29
|
/**
|
|
29
30
|
* Optional initial selected option value.
|
|
30
31
|
*/
|
|
31
|
-
|
|
32
|
+
defaultValue?: string;
|
|
32
33
|
/**
|
|
33
34
|
* Label for the SegmentedButton — visually hidden, used for screen readers only.
|
|
34
35
|
*/
|
|
@@ -41,6 +42,10 @@ export interface SegmentedButtonProps {
|
|
|
41
42
|
* Array of button options — must be between 2 and 6 options.
|
|
42
43
|
*/
|
|
43
44
|
options: OptionType[];
|
|
45
|
+
/**
|
|
46
|
+
* Size of the SegmentedButton.
|
|
47
|
+
*/
|
|
48
|
+
size?: 'sm' | 'md';
|
|
44
49
|
/**
|
|
45
50
|
* Additional class names
|
|
46
51
|
*/
|
|
@@ -49,5 +54,5 @@ export interface SegmentedButtonProps {
|
|
|
49
54
|
/**
|
|
50
55
|
* SegmentedButton UI component
|
|
51
56
|
*/
|
|
52
|
-
export declare const SegmentedButton: ({ disabled, id,
|
|
57
|
+
export declare const SegmentedButton: ({ disabled, id, defaultValue, label, onChange, options, size, className, ...props }: SegmentedButtonProps) => React.JSX.Element;
|
|
53
58
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export function ToggleButton({ disabled, id,
|
|
1
|
+
export function ToggleButton({ disabled, id, defaultValue, label, onChange, options, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
disabled?: boolean;
|
|
4
4
|
id: any;
|
|
5
|
-
|
|
5
|
+
defaultValue: any;
|
|
6
6
|
label: any;
|
|
7
7
|
onChange: any;
|
|
8
8
|
options: any;
|
|
@@ -11,7 +11,7 @@ export namespace ToggleButton {
|
|
|
11
11
|
namespace propTypes {
|
|
12
12
|
let disabled: PropTypes.Requireable<boolean>;
|
|
13
13
|
let id: PropTypes.Validator<string>;
|
|
14
|
-
let
|
|
14
|
+
let defaultValue: PropTypes.Requireable<string>;
|
|
15
15
|
let label: PropTypes.Validator<string>;
|
|
16
16
|
let onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
17
17
|
let options: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -27,6 +27,10 @@ export namespace ToggleButton {
|
|
|
27
27
|
* Option icon
|
|
28
28
|
*/
|
|
29
29
|
iconName: PropTypes.Requireable<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Unique ID for the option
|
|
32
|
+
*/
|
|
33
|
+
id: PropTypes.Requireable<string>;
|
|
30
34
|
}>[]>;
|
|
31
35
|
let className: PropTypes.Requireable<string>;
|
|
32
36
|
}
|
|
@@ -73,5 +73,5 @@ export interface FileUploadProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
73
73
|
/**
|
|
74
74
|
* FileUpload UI component
|
|
75
75
|
*/
|
|
76
|
-
export declare const FileUpload:
|
|
76
|
+
export declare const FileUpload: React.ForwardRefExoticComponent<FileUploadProps & React.RefAttributes<HTMLInputElement>>;
|
|
77
77
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { SiteStatus } from '@libs/types/custom-types';
|
|
2
|
+
import { SiteStatus, SiteType } from '@libs/types/custom-types';
|
|
3
3
|
export type SiteOption = {
|
|
4
4
|
/**
|
|
5
5
|
* ID of the site.
|
|
@@ -20,7 +20,7 @@ export type SiteOption = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Site type.
|
|
22
22
|
*/
|
|
23
|
-
type?:
|
|
23
|
+
type?: SiteType;
|
|
24
24
|
};
|
|
25
25
|
/** Site option display props. */
|
|
26
26
|
export interface SiteOptionDisplayProps extends ComponentPropsWithoutRef<'div'> {
|