@pantheon-systems/pds-toolkit-react 1.0.0-beta.4 → 1.0.0-beta.6
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/Callout/Callout.d.ts +2 -1
- package/_dist/components/DashboardStat/DashboardStat.d.ts +2 -2
- package/_dist/components/StatusIndicator/StatusIndicator.d.ts +2 -1
- package/_dist/components/badges/StatusBadge/StatusBadge.d.ts +2 -1
- package/_dist/components/buttons/Button/Button.d.ts +5 -4
- package/_dist/components/buttons/IconButton/IconButton.d.ts +3 -2
- package/_dist/components/buttons/MenuButton/MenuButton.d.ts +3 -3
- package/_dist/components/buttons/SplitButton/SplitButton.d.ts +3 -3
- package/_dist/components/cards/Card/Card.d.ts +1 -1
- package/_dist/components/inputs/Checkbox/Checkbox.d.ts +1 -1
- package/_dist/components/inputs/CheckboxFieldset/CheckboxFieldset.d.ts +1 -1
- package/_dist/components/inputs/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/_dist/components/inputs/Combobox/Combobox.d.ts +1 -1
- package/_dist/components/inputs/FileUpload/FileUpload.d.ts +1 -1
- package/_dist/components/inputs/RadioGroup/RadioGroup.d.ts +1 -1
- package/_dist/components/inputs/Select/Select.d.ts +1 -1
- package/_dist/components/inputs/Select/select-sample-data.d.ts +6 -0
- package/_dist/components/inputs/TextInput/TextInput.d.ts +3 -3
- package/_dist/components/inputs/Textarea/Textarea.d.ts +4 -3
- package/_dist/components/navigation/ButtonNav/ButtonNav.d.ts +1 -1
- package/_dist/components/navigation/DashboardNav/DashboardNavItem.d.ts +3 -3
- package/_dist/components/navigation/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/_dist/components/navigation/NavMenu/NavMenu.d.ts +2 -2
- package/_dist/components/navigation/NavMenu/NavMenuDropdown.d.ts +2 -2
- package/_dist/components/navigation/SideNav/SideNav.d.ts +1 -1
- package/_dist/components/navigation/SideNavCompact/SideNavCompact.d.ts +1 -1
- package/_dist/components/navigation/SideNavGlobal/SideNavGlobalItem.d.ts +3 -3
- package/_dist/components/navigation/TabMenu/TabMenu.d.ts +3 -3
- package/_dist/components/navigation/TabMenu/TabMenuDropdown.d.ts +3 -3
- package/_dist/components/navigation/WorkspaceSelector/WorkspaceSelector.d.ts +14 -0
- package/_dist/components/navigation/navigation-utilities.d.ts +1 -1
- package/_dist/components/notifications/Banner/Banner.d.ts +3 -1
- package/_dist/components/notifications/InlineMessage/InlineMessage.d.ts +2 -1
- package/_dist/components/notifications/SectionMessage/SectionMessage.d.ts +2 -1
- package/_dist/components/panels/Panel/Panel.d.ts +11 -4
- package/_dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +2 -1
- package/_dist/css/component-css/pds-combobox-multiselect.css +1 -1
- package/_dist/css/component-css/pds-combobox.css +1 -1
- package/_dist/css/component-css/pds-index.css +4 -4
- package/_dist/css/component-css/pds-navbar.css +1 -1
- package/_dist/css/component-css/pds-workspace-selector.css +1 -1
- package/_dist/css/pds-components.css +4 -4
- package/_dist/index.css +1 -1
- package/_dist/index.d.ts +3 -1
- package/_dist/index.js +4634 -4519
- package/_dist/index.js.map +1 -1
- package/_dist/layouts/FlexContainer/FlexContainer.d.ts +1 -1
- package/_dist/layouts/SidebarLayout/SidebarLayout.d.ts +1 -1
- package/_dist/layouts/ThreeItemLayout/ThreeItemLayout.d.ts +1 -1
- package/_dist/layouts/TwoItemLayout/TwoItemLayout.d.ts +1 -1
- package/_dist/libs/types/custom-types.d.ts +4 -1
- package/_dist/{components/navigation → libs/types}/navigation-types.d.ts +2 -2
- package/_dist/mocks/data/navigation-items.d.ts +6 -94
- package/_dist/utilities/context-providers/OverlayContext/OverlayContext.d.ts +12 -0
- package/package.json +3 -4
- /package/_dist/{components/inputs → libs/types}/input-types.d.ts +0 -0
- /package/_dist/{layouts → libs/types}/layout-types.d.ts +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { StatusType } from '@libs/types/custom-types';
|
|
2
3
|
import './callout.css';
|
|
3
|
-
type CalloutType =
|
|
4
|
+
type CalloutType = StatusType | 'code' | 'earlyAccess';
|
|
4
5
|
type TypeLabels = Record<CalloutType, string>;
|
|
5
6
|
export interface CalloutProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import './dashboard-stat.css';
|
|
3
|
-
export type
|
|
3
|
+
export type DashboardStatStatus = 'success' | 'warning' | 'launch' | 'error' | 'ready' | 'notReady';
|
|
4
4
|
/**
|
|
5
5
|
* Prop types for DashboardStat
|
|
6
6
|
*/
|
|
@@ -16,7 +16,7 @@ export interface DashboardStatProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
16
16
|
/**
|
|
17
17
|
* Status of the stat, which determines the icon and icon color.
|
|
18
18
|
*/
|
|
19
|
-
status?:
|
|
19
|
+
status?: DashboardStatStatus;
|
|
20
20
|
/**
|
|
21
21
|
* Title of the stat, displayed as the main heading of the component.
|
|
22
22
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { StatusType } from '@libs/types/custom-types';
|
|
2
3
|
import './status-indicator.css';
|
|
3
4
|
export interface StatusIndicatorProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
5
|
/**
|
|
@@ -16,7 +17,7 @@ export interface StatusIndicatorProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
16
17
|
/**
|
|
17
18
|
* Sets status type
|
|
18
19
|
*/
|
|
19
|
-
type:
|
|
20
|
+
type: Exclude<StatusType, 'discovery'> | 'neutral' | 'new' | 'working';
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* StatusIndicator UI component
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { StatusType } from '@libs/types/custom-types';
|
|
2
3
|
import './status-badge.css';
|
|
3
4
|
/**
|
|
4
5
|
* StatusBadge component props
|
|
@@ -27,7 +28,7 @@ export interface StatusBadgeProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
27
28
|
/**
|
|
28
29
|
* Status type for badge. Only renders if `hasStatusIndicator` is true.
|
|
29
30
|
*/
|
|
30
|
-
statusType?:
|
|
31
|
+
statusType?: StatusType | 'frozen' | 'disabled';
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
33
34
|
* StatusBadge UI component
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { ButtonDisplayType, ButtonSize, ButtonType, ButtonVariant } from '@libs/types/custom-types';
|
|
2
3
|
import { PDSIcon } from '@components/icons/Icon/Icon';
|
|
3
4
|
import './button.css';
|
|
4
5
|
interface ButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
@@ -9,7 +10,7 @@ interface ButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
9
10
|
/**
|
|
10
11
|
* Type of button
|
|
11
12
|
*/
|
|
12
|
-
buttonType?:
|
|
13
|
+
buttonType?: ButtonType;
|
|
13
14
|
/**
|
|
14
15
|
* Additional class names
|
|
15
16
|
*/
|
|
@@ -21,7 +22,7 @@ interface ButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
21
22
|
/**
|
|
22
23
|
* How the button is displayed.
|
|
23
24
|
*/
|
|
24
|
-
displayType?:
|
|
25
|
+
displayType?: ButtonDisplayType;
|
|
25
26
|
/**
|
|
26
27
|
* Which icon to render
|
|
27
28
|
*/
|
|
@@ -49,7 +50,7 @@ interface ButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
49
50
|
/**
|
|
50
51
|
* Which size of button to render
|
|
51
52
|
*/
|
|
52
|
-
size?:
|
|
53
|
+
size?: ButtonSize;
|
|
53
54
|
/**
|
|
54
55
|
* Text for an optional tooltip to be displayed when the button is `disabled` or `isLoading`.
|
|
55
56
|
*/
|
|
@@ -57,7 +58,7 @@ interface ButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
57
58
|
/**
|
|
58
59
|
* Which variant of button to render
|
|
59
60
|
*/
|
|
60
|
-
variant?:
|
|
61
|
+
variant?: ButtonVariant;
|
|
61
62
|
}
|
|
62
63
|
/**
|
|
63
64
|
* A Component used to render a Button
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef, MouseEvent } from 'react';
|
|
2
|
+
import { ButtonSize, ButtonType } from '@libs/types/custom-types';
|
|
2
3
|
import { PDSIcon } from '@components/icons/Icon/Icon';
|
|
3
4
|
import './icon-button.css';
|
|
4
5
|
interface IconButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
@@ -9,7 +10,7 @@ interface IconButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
9
10
|
/**
|
|
10
11
|
* Type of button
|
|
11
12
|
*/
|
|
12
|
-
buttonType?:
|
|
13
|
+
buttonType?: ButtonType;
|
|
13
14
|
/**
|
|
14
15
|
* Additional class names.
|
|
15
16
|
*/
|
|
@@ -37,7 +38,7 @@ interface IconButtonProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
37
38
|
/**
|
|
38
39
|
* Which size of button to render.
|
|
39
40
|
*/
|
|
40
|
-
size?:
|
|
41
|
+
size?: ButtonSize;
|
|
41
42
|
/**
|
|
42
43
|
* Which variant of button to render.
|
|
43
44
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
import { HeadingItemType, LinkItemType, MenuItemType, NodeItemType, SeparatorItemType } from '@libs/types/custom-types';
|
|
2
|
+
import { ButtonSize, ButtonVariant, HeadingItemType, LinkItemType, MenuItemType, NodeItemType, SeparatorItemType } from '@libs/types/custom-types';
|
|
3
3
|
import { PDSIcon } from '@components/icons/Icon/Icon';
|
|
4
4
|
import './menu-button.css';
|
|
5
5
|
/**
|
|
@@ -49,7 +49,7 @@ export interface MenuButtonProps extends ComponentPropsWithRef<'span'> {
|
|
|
49
49
|
/**
|
|
50
50
|
* Which size of button to render.
|
|
51
51
|
*/
|
|
52
|
-
size?:
|
|
52
|
+
size?: Exclude<ButtonSize, 'lg'>;
|
|
53
53
|
/**
|
|
54
54
|
* Optional `data-testid` value for this component.
|
|
55
55
|
*/
|
|
@@ -61,7 +61,7 @@ export interface MenuButtonProps extends ComponentPropsWithRef<'span'> {
|
|
|
61
61
|
/**
|
|
62
62
|
* Which variant of button to render — only valid for icon-end (default) display type.
|
|
63
63
|
*/
|
|
64
|
-
variant?: 'primary' | 'secondary' | 'navbar'
|
|
64
|
+
variant?: Extract<ButtonVariant, 'primary' | 'secondary' | 'navbar'>;
|
|
65
65
|
/**
|
|
66
66
|
* Is this button located with the Navbar component?
|
|
67
67
|
* This will adjust the styling and position of the dropdown.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { LinkItemType, MenuItemType } from '@libs/types/custom-types';
|
|
2
|
+
import { ButtonSize, ButtonVariant, LinkItemType, MenuItemType } from '@libs/types/custom-types';
|
|
3
3
|
import './split-button.css';
|
|
4
4
|
/**
|
|
5
5
|
* Prop types for SplitButton
|
|
@@ -28,11 +28,11 @@ interface SplitButtonProps extends ComponentPropsWithoutRef<'span'> {
|
|
|
28
28
|
/**
|
|
29
29
|
* Which size of button to render
|
|
30
30
|
*/
|
|
31
|
-
size?:
|
|
31
|
+
size?: Exclude<ButtonSize, 'lg'>;
|
|
32
32
|
/**
|
|
33
33
|
* Which variant of button to render
|
|
34
34
|
*/
|
|
35
|
-
variant?: 'primary' | 'secondary'
|
|
35
|
+
variant?: Extract<ButtonVariant, 'primary' | 'secondary'>;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* A component used to render a button with a primary action and a menu of additional options
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import { GridGapOptions } from '@
|
|
2
|
+
import { GridGapOptions } from '@libs/types/layout-types';
|
|
3
3
|
import './card.css';
|
|
4
4
|
export type CardBackground = 'default' | 'mint-gradient' | 'sundown-gradient' | 'yellow-gradient' | 'transparent';
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ChangeEvent, ComponentPropsWithoutRef, FocusEvent, ReactNode } from 'react';
|
|
2
|
-
import { ValidationStatus } from '
|
|
2
|
+
import { ValidationStatus } from '@libs/types/input-types';
|
|
3
3
|
import './combobox.css';
|
|
4
4
|
type LabelStrings = {
|
|
5
5
|
clearButton?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { PDSIcon } from '@components/icons/Icon/Icon';
|
|
3
|
-
import { ValidationStatus } from '
|
|
3
|
+
import { ValidationStatus } from '@libs/types/input-types';
|
|
4
4
|
import './select.css';
|
|
5
5
|
type LabelStrings = {
|
|
6
6
|
selectOptionText: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SelectOptionsType, SelectOptionType } from './Select';
|
|
2
|
+
export declare const githubAccountOptions: SelectOptionType[];
|
|
3
|
+
export declare const userRoleOptions: SelectOptionType[];
|
|
4
|
+
export declare const validationExampleOptions: SelectOptionType[];
|
|
5
|
+
export declare const sampleSelectOptionsWithGroups: SelectOptionsType;
|
|
6
|
+
export declare const sampleSelectOptions: SelectOptionType[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ChangeEvent, ComponentPropsWithoutRef, FocusEvent, ReactNode } from 'react';
|
|
2
|
-
import { ValidationStatus } from '
|
|
2
|
+
import { ValidationStatus } from '@libs/types/input-types';
|
|
3
3
|
import './text-input.css';
|
|
4
|
-
type
|
|
4
|
+
type LabelStrings = {
|
|
5
5
|
clearButton: string;
|
|
6
6
|
counterOverLimit?: string;
|
|
7
7
|
searchShortcut: string;
|
|
@@ -114,7 +114,7 @@ export interface TextInputProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
114
114
|
/**
|
|
115
115
|
* Translation strings for various labels or other visually-hidden text.
|
|
116
116
|
*/
|
|
117
|
-
translationStrings?:
|
|
117
|
+
translationStrings?: LabelStrings;
|
|
118
118
|
/**
|
|
119
119
|
* Type of input field to use.
|
|
120
120
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ChangeEvent, ComponentPropsWithoutRef, FocusEvent, ReactNode } from 'react';
|
|
2
|
-
import { ValidationStatus } from '
|
|
2
|
+
import { ValidationStatus } from '@libs/types/input-types';
|
|
3
3
|
import './textarea.css';
|
|
4
|
-
|
|
4
|
+
type LabelStrings = {
|
|
5
5
|
clearButton: string;
|
|
6
6
|
counterOverLimit?: string;
|
|
7
7
|
searchShortcut: string;
|
|
@@ -90,7 +90,7 @@ export interface TextareaProps {
|
|
|
90
90
|
/**
|
|
91
91
|
* Translation strings for various labels or other visually-hidden text.
|
|
92
92
|
*/
|
|
93
|
-
translationStrings?:
|
|
93
|
+
translationStrings?: LabelStrings;
|
|
94
94
|
/**
|
|
95
95
|
* Validation message for the textarea field based on the validation status.
|
|
96
96
|
*/
|
|
@@ -108,3 +108,4 @@ export interface TextareaProps {
|
|
|
108
108
|
* Textarea UI component
|
|
109
109
|
*/
|
|
110
110
|
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
111
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
|
-
import { NavigationItem } from '@
|
|
2
|
+
import { NavigationItem } from '@libs/types/navigation-types';
|
|
3
3
|
import './button-nav.css';
|
|
4
4
|
export type ButtonNavItem = Omit<NavigationItem, 'links'>;
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PDSIcon } from '@components/icons/Icon/Icon';
|
|
2
|
-
import { NavigationItem } from '@
|
|
2
|
+
import { NavigationItem } from '@libs/types/navigation-types';
|
|
3
3
|
import './dashboard-nav.css';
|
|
4
|
-
export
|
|
4
|
+
export interface DashboardNavItemProps extends NavigationItem {
|
|
5
5
|
/**
|
|
6
6
|
* Icon to display next to the link content.
|
|
7
7
|
*/
|
|
@@ -17,7 +17,7 @@ export type DashboardNavItemProps = NavigationItem & {
|
|
|
17
17
|
submenu: string;
|
|
18
18
|
toggle: string;
|
|
19
19
|
};
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
/**
|
|
22
22
|
* DashboardNavItem UI component
|
|
23
23
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
2
|
-
import { NavigationItem } from '@
|
|
2
|
+
import { NavigationItem } from '@libs/types/navigation-types';
|
|
3
3
|
import './dropdown-menu.css';
|
|
4
4
|
/**
|
|
5
5
|
* Prop types for DropdownMenu
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { NavMenuItem } from '@libs/types/navigation-types';
|
|
3
3
|
import './nav-menu.css';
|
|
4
4
|
/**
|
|
5
5
|
* Prop types for NavMenu
|
|
@@ -20,7 +20,7 @@ interface NavMenuProps extends ComponentPropsWithoutRef<'nav'> {
|
|
|
20
20
|
/**
|
|
21
21
|
* Menu Items.
|
|
22
22
|
*/
|
|
23
|
-
menuItems?:
|
|
23
|
+
menuItems?: NavMenuItem[];
|
|
24
24
|
/**
|
|
25
25
|
* Mobile menu will be enabled when viewport is at or below this number in pixels.
|
|
26
26
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { NavMenuItem } from '@libs/types/navigation-types';
|
|
3
3
|
/**
|
|
4
4
|
* Prop types for NavMenuDropdown
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@ interface NavMenuDropdownProps extends ComponentPropsWithoutRef<'button'> {
|
|
|
7
7
|
/**
|
|
8
8
|
* Dropdown items.
|
|
9
9
|
*/
|
|
10
|
-
items?:
|
|
10
|
+
items?: NavMenuItem[];
|
|
11
11
|
/**
|
|
12
12
|
* Dropdown label.
|
|
13
13
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactElement } from 'react';
|
|
2
|
-
import { NavigationItem } from '@
|
|
2
|
+
import { NavigationItem } from '@libs/types/navigation-types';
|
|
3
3
|
import './side-nav-compact.css';
|
|
4
4
|
export type SideNavCompactItem = NavigationItem & {
|
|
5
5
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PDSIcon } from '@components/icons/Icon/Icon';
|
|
2
|
-
import { NavigationItem } from '@
|
|
2
|
+
import { NavigationItem } from '@libs/types/navigation-types';
|
|
3
3
|
import './side-nav-global.css';
|
|
4
|
-
export
|
|
4
|
+
export interface SideNavGlobalItemProps extends NavigationItem {
|
|
5
5
|
/**
|
|
6
6
|
* Icon to display next to the link content.
|
|
7
7
|
*/
|
|
@@ -17,7 +17,7 @@ export type SideNavGlobalItemProps = NavigationItem & {
|
|
|
17
17
|
submenu: string;
|
|
18
18
|
toggle: string;
|
|
19
19
|
};
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
/**
|
|
22
22
|
* SideNavGlobalItem UI component
|
|
23
23
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
2
|
import { PDSIcon } from '@components/icons/Icon/Icon';
|
|
3
|
-
import { NavigationItem } from '@
|
|
3
|
+
import { NavigationItem } from '@libs/types/navigation-types';
|
|
4
4
|
import { TabMenuDropdownProps } from './TabMenuDropdown';
|
|
5
5
|
import './tab-menu.css';
|
|
6
6
|
type DropdownSettings = Omit<TabMenuDropdownProps, 'links'>;
|
|
7
|
-
export
|
|
7
|
+
export interface TabMenuItemProps extends NavigationItem {
|
|
8
8
|
/**
|
|
9
9
|
* Settings for dropdown menu. Leave null if no dropdown is needed.
|
|
10
10
|
*/
|
|
@@ -18,7 +18,7 @@ export type TabMenuItemProps = NavigationItem & {
|
|
|
18
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
19
|
*/
|
|
20
20
|
promoteActiveChildLink?: boolean;
|
|
21
|
-
}
|
|
21
|
+
}
|
|
22
22
|
/**
|
|
23
23
|
* Prop types for TabMenu.
|
|
24
24
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NavigationItem } from '@
|
|
1
|
+
import { NavigationItem } from '@libs/types/navigation-types';
|
|
2
2
|
import './tab-menu.css';
|
|
3
|
-
export
|
|
3
|
+
export interface TabMenuDropdownProps {
|
|
4
4
|
/**
|
|
5
5
|
* Button label for the dropdown trigger.
|
|
6
6
|
*/
|
|
@@ -25,7 +25,7 @@ export type TabMenuDropdownProps = {
|
|
|
25
25
|
* Text to display when no results are found.
|
|
26
26
|
*/
|
|
27
27
|
noResultsText?: string;
|
|
28
|
-
}
|
|
28
|
+
}
|
|
29
29
|
/**
|
|
30
30
|
* TabMenuDropdown UI component
|
|
31
31
|
*/
|
|
@@ -20,14 +20,28 @@ export type WorkspaceSelectorItem = {
|
|
|
20
20
|
* Is this the currently selected workspace?
|
|
21
21
|
*/
|
|
22
22
|
isActive?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* This workspace has restricted access.
|
|
25
|
+
*/
|
|
26
|
+
isRestricted?: boolean;
|
|
23
27
|
/**
|
|
24
28
|
* This user does not have access to this workspace.
|
|
25
29
|
*/
|
|
26
30
|
isUnprivileged?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Callback function to run when a restricted workspace is clicked.
|
|
33
|
+
* Only used when isRestricted is true.
|
|
34
|
+
*/
|
|
35
|
+
onRestrictedSelection?: () => void;
|
|
27
36
|
/**
|
|
28
37
|
* Account plan tier.
|
|
29
38
|
*/
|
|
30
39
|
planTier?: PlanTiers;
|
|
40
|
+
/**
|
|
41
|
+
* Visually-hidden label to indicate restricted access.
|
|
42
|
+
* @default 'Restricted'
|
|
43
|
+
*/
|
|
44
|
+
restrictedLabel?: string;
|
|
31
45
|
/**
|
|
32
46
|
* Id of the workspace.
|
|
33
47
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { PDSIcon } from '@components/icons/Icon/Icon';
|
|
3
|
-
import { NavigationItem } from '@
|
|
3
|
+
import { NavigationItem } from '@libs/types/navigation-types';
|
|
4
4
|
/**
|
|
5
5
|
* Recursively searches through navigation items to find the first active link
|
|
6
6
|
* @param items - Array of navigation items to search through
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { StatusType } from '@libs/types/custom-types';
|
|
2
3
|
import './banner.css';
|
|
4
|
+
type BannerType = Exclude<StatusType, 'success' | 'discovery'>;
|
|
3
5
|
type Banner = {
|
|
4
6
|
id: string;
|
|
5
7
|
isDismissible?: boolean;
|
|
6
8
|
message: string | ReactNode;
|
|
7
9
|
onDismiss?: () => void;
|
|
8
|
-
type?:
|
|
10
|
+
type?: BannerType;
|
|
9
11
|
};
|
|
10
12
|
/**
|
|
11
13
|
* Prop types for Banner
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { StatusType } from '@libs/types/custom-types';
|
|
2
3
|
import './inline-message.css';
|
|
3
4
|
/**
|
|
4
5
|
* The type of message to display.
|
|
5
6
|
*/
|
|
6
|
-
export type InlineMessageType =
|
|
7
|
+
export type InlineMessageType = Exclude<StatusType, 'discovery'> | 'working';
|
|
7
8
|
/**
|
|
8
9
|
* Labels for each message type.
|
|
9
10
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { StatusType } from '@libs/types/custom-types';
|
|
2
3
|
import { Button } from '@components/buttons/Button/Button';
|
|
3
4
|
import './section-message.css';
|
|
4
|
-
export type SectionMessageType =
|
|
5
|
+
export type SectionMessageType = StatusType;
|
|
5
6
|
type TypeLabels = Record<SectionMessageType, string>;
|
|
6
7
|
export interface SectionMessageProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
8
|
/**
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { StatusType } from '@libs/types/custom-types';
|
|
3
|
+
import { GridGapOptions } from '@libs/types/layout-types';
|
|
3
4
|
import './panel.css';
|
|
4
|
-
type
|
|
5
|
+
type PanelStatusType = Exclude<StatusType, 'discovery'>;
|
|
6
|
+
type TypeLabels = Record<PanelStatusType, string>;
|
|
5
7
|
export interface PanelProps extends ComponentPropsWithoutRef<'div'> {
|
|
6
8
|
/**
|
|
7
9
|
* Panel content.
|
|
@@ -22,7 +24,12 @@ export interface PanelProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
22
24
|
/**
|
|
23
25
|
* Status type for panel. Only renders if `hasStatusIndicator` is true.
|
|
24
26
|
*/
|
|
25
|
-
statusType?: StatusType;
|
|
27
|
+
statusType?: Exclude<StatusType, 'discovery'> | 'neutral';
|
|
28
|
+
/**
|
|
29
|
+
* Status type labels for screen readers. Provide translation strings if needed.
|
|
30
|
+
* Set to empty string ('') to create a visual-only indicator.
|
|
31
|
+
*/
|
|
32
|
+
typeLabels?: TypeLabels;
|
|
26
33
|
/**
|
|
27
34
|
* Which variant of panel to render
|
|
28
35
|
*/
|
|
@@ -31,5 +38,5 @@ export interface PanelProps extends ComponentPropsWithoutRef<'div'> {
|
|
|
31
38
|
/**
|
|
32
39
|
* Panel UI component
|
|
33
40
|
*/
|
|
34
|
-
export declare const Panel: ({ children, className, hasStatusIndicator, padding, statusType, variant, ...props }: PanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export declare const Panel: ({ children, className, hasStatusIndicator, padding, statusType, typeLabels, variant, ...props }: PanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
42
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { StatusType } from '@libs/types/custom-types';
|
|
2
3
|
import './progress-bar.css';
|
|
3
4
|
interface ProgressBarBreakpoint {
|
|
4
|
-
colorType:
|
|
5
|
+
colorType: Exclude<StatusType, 'discovery'> | 'neutral';
|
|
5
6
|
percentage: number;
|
|
6
7
|
}
|
|
7
8
|
interface ProgressBarProps extends ComponentPropsWithoutRef<'div'> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
.pds-combobox-multi{position:relative}.pds-combobox-multi:disabled .pds-combobox-multi__input-wrapper{border-color:var(--pds-color-border-disabled)}.pds-combobox-multi__items-wrapper .pds-combobox-multi__selected-item:not(:last-child){display:none}.pds-combobox-multi__selected-item{align-items:center;background:var(--pds-color-neutral-200);border-radius:3px;color:var(--pds-color--neutral-500);display:inline-flex;font-size:.75rem;font-weight:400;gap:.41rem;justify-content:center;line-height:120%;padding:.25rem .512rem;text-wrap:nowrap}.pds-combobox-multi__selected-item:hover{background:var(--pds-color-neutral-300)}.pds-combobox-multi__selected-item:focus-visible{outline:none}.pds-combobox-multi__selected-item-text{margin-top:1px}.pds-combobox-multi__selected-item-remove{border-radius:.1875rem;color:var(--pds-color-fg-default-secondary);cursor:pointer;display:flex;height:16px;justify-content:center;width:14px}.pds-combobox-multi__selected-item-remove:hover{color:var(--pds-color-fg-default)}.pds-combobox-multi__selected-item--marked-for-deletion .pds-combobox-multi__selected-item-remove{outline:1px solid var(--pds-color-interactive-focus)}.pds-combobox-multi__input-wrapper{align-items:center;background-color:var(--pds-color-bg-default);border:1px solid var(--pds-color-border-input);border-radius:.1875rem;box-sizing:border-box;column-gap:.512rem;display:flex;gap:.512rem;height:var(--pds-spacing-input-height);justify-content:space-between;padding-inline:.64rem;position:relative;transition:background-color .2s ease-in-out 0s,border-color .2s ease-in-out 0s;width:100%}.pds-combobox-multi__input-wrapper:focus-within{border-color:var(--pds-color-interactive-focus);outline:none;transition:outline .2s ease-in-out 0s}.pds-combobox-multi__counter{display:inline-block;height:24px;position:relative}.pds-combobox-multi__counter-wrapper{display:flex;position:relative}.pds-combobox-multi__counter-layer{width:8px}.pds-combobox-multi__counter-item,.pds-combobox-multi__counter-layer{background:var(--pds-color-neutral-200);border-radius:3px;box-shadow:-3px 0 0 0 var(--pds-color-neutral-000);height:24px}.pds-combobox-multi__counter-item{align-items:center;color:var(--pds-color--neutral-500);display:flex;font-size:.75rem;font-weight:400;justify-content:center;width:20.5px}.pds-combobox-multi__trigger{align-items:center;background-color:transparent;border:none;border-radius:.1875rem;color:var(--pds-color-fg-default);display:flex;flex-grow:1;height:1.563rem;justify-content:flex-end;margin-inline-start:auto}.pds-combobox-multi__trigger:disabled{cursor:not-allowed}.pds-combobox-multi__trigger:focus-visible{outline:none}.pds-combobox-multi__trigger-icon{color:var(--pds-color-fg-default-secondary);pointer-events:none;transition:transform .2s ease-in-out 0s}.pds-combobox-multi__trigger[aria-expanded=true]
|
|
2
|
-
.pds-combobox-multi__trigger-icon{transform:rotate(180deg);transition:transform .2s ease-in-out 0s}.pds-combobox-multi__dropdown{background-color:var(--pds-color-dropdown-background);border-radius:.1875rem;box-shadow:var(--pds-elevation-overlay);box-sizing:border-box;display:flex;flex-direction:column;margin-block-start:.512rem;max-height:18rem;overflow-x:hidden;overflow-y:auto;position:absolute;width:100%}.pds-combobox-multi__dropdown-list{flex:1;margin-block-start:0;overflow-y:auto;padding:0}.pds-combobox-multi__dropdown-input-wrapper{align-items:center;background-color:var(--pds-color-dropdown-background);border-bottom:1px solid var(--pds-color-border-default);column-gap:.512rem;display:flex;gap:.64rem;padding:.64rem 1rem;position:sticky;top:0;z-index:1}.pds-combobox-multi__dropdown-input{background-color:transparent;border:none;caret-color:var(--pds-color-fg-default);color:var(--pds-color-fg-default);flex-grow:1;line-height:1;padding-inline:0;width:100%}.pds-combobox-multi__dropdown-input:focus{outline:none}.pds-combobox-multi__dropdown-input::placeholder{color:var(--pds-color-fg-default-secondary)}.pds-combobox-multi__dropdown-item{padding:.64rem 1rem}.pds-combobox-multi__dropdown-item-label{align-items:center;display:flex;gap:6px;justify-content:space-between;line-height:normal;width:100%}.pds-combobox-multi__dropdown-item-icon{color:var(--pds-color-status-success-foreground)}.pds-combobox-multi__loading,.pds-combobox-multi__no-results{color:var(--pds-color-fg-default);font-size:1rem;padding:1rem}
|
|
2
|
+
.pds-combobox-multi__trigger-icon{transform:rotate(180deg);transition:transform .2s ease-in-out 0s}.pds-combobox-multi__dropdown{background-color:var(--pds-color-dropdown-background);border-radius:.1875rem;box-shadow:var(--pds-elevation-overlay);box-sizing:border-box;display:flex;flex-direction:column;margin-block-start:.512rem;max-height:18rem;overflow-x:hidden;overflow-y:auto;position:absolute;width:100%}.pds-combobox-multi__dropdown:focus-visible{outline:none}.pds-combobox-multi__dropdown-list{flex:1;margin-block-start:0;overflow-y:auto;padding:0}.pds-combobox-multi__dropdown-input-wrapper{align-items:center;background-color:var(--pds-color-dropdown-background);border-bottom:1px solid var(--pds-color-border-default);column-gap:.512rem;display:flex;gap:.64rem;padding:.64rem 1rem;position:sticky;top:0;z-index:1}.pds-combobox-multi__dropdown-input{background-color:transparent;border:none;caret-color:var(--pds-color-fg-default);color:var(--pds-color-fg-default);flex-grow:1;line-height:1;padding-inline:0;width:100%}.pds-combobox-multi__dropdown-input:focus{outline:none}.pds-combobox-multi__dropdown-input::placeholder{color:var(--pds-color-fg-default-secondary)}.pds-combobox-multi__dropdown-item{padding:.64rem 1rem}.pds-combobox-multi__dropdown-item-label{align-items:center;display:flex;gap:6px;justify-content:space-between;line-height:normal;width:100%}.pds-combobox-multi__dropdown-item-icon{color:var(--pds-color-status-success-foreground)}.pds-combobox-multi__loading,.pds-combobox-multi__no-results{color:var(--pds-color-fg-default);font-size:1rem;padding:1rem}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.pds-combobox{position:relative}.pds-combobox__input-wrapper{align-items:center;background-color:var(--pds-color-bg-default);border:1px solid var(--pds-color-border-input);border-radius:.1875rem;box-sizing:border-box;display:flex;gap:.64rem;column-gap:.512rem;height:var(--pds-spacing-input-height);justify-content:space-between;padding-inline:.64rem;position:relative;transition:background-color .2s ease-in-out 0s,border-color .2s ease-in-out 0s;width:100%}.pds-combobox__input-wrapper:focus-within{border-color:var(--pds-color-interactive-focus);outline:none;transition:outline .2s ease-in-out 0s}.pds-combobox__input{background-color:transparent;border:none;caret-color:var(--pds-color-fg-default);color:var(--pds-color-fg-default);flex-grow:1;line-height:1;padding-inline:0;width:100%}.pds-combobox__input:focus{outline:none}.pds-combobox__input::placeholder{color:var(--pds-color-fg-default-secondary)}.pds-combobox__trigger{align-items:center;background-color:transparent;border:none;border-radius:.1875rem;color:var(--pds-color-fg-default);display:flex;height:1.563rem}.pds-combobox__trigger:focus-visible{outline:1px solid var(--pds-color-interactive-focus)}.pds-combobox__trigger-icon{color:var(--pds-color-fg-default-secondary);pointer-events:none;transition:transform .2s ease-in-out 0s}.pds-combobox__trigger[aria-expanded=true] .pds-combobox__trigger-icon{transform:rotate(180deg);transition:transform .2s ease-in-out 0s}.pds-combobox__dropdown{background-color:var(--pds-color-dropdown-background);border-radius:.1875rem;box-shadow:var(--pds-elevation-overlay);box-sizing:border-box;margin-block-start:.512rem;max-height:18rem;overflow-x:hidden;overflow-y:auto;position:absolute;width:100%}.pds-combobox__options{display:flex;flex-direction:column;list-style:none;margin:0;padding:0;row-gap:.0625rem}.pds-combobox__loading,.pds-combobox__no-results{color:var(--pds-color-fg-default);font-size:1rem;padding:1rem}
|
|
1
|
+
.pds-combobox{position:relative}.pds-combobox__input-wrapper{align-items:center;background-color:var(--pds-color-bg-default);border:1px solid var(--pds-color-border-input);border-radius:.1875rem;box-sizing:border-box;display:flex;gap:.64rem;column-gap:.512rem;height:var(--pds-spacing-input-height);justify-content:space-between;padding-inline:.64rem;position:relative;transition:background-color .2s ease-in-out 0s,border-color .2s ease-in-out 0s;width:100%}.pds-combobox__input-wrapper:focus-within{border-color:var(--pds-color-interactive-focus);outline:none;transition:outline .2s ease-in-out 0s}.pds-combobox__input{background-color:transparent;border:none;caret-color:var(--pds-color-fg-default);color:var(--pds-color-fg-default);flex-grow:1;line-height:1;padding-inline:0;width:100%}.pds-combobox__input:focus{outline:none}.pds-combobox__input::placeholder{color:var(--pds-color-fg-default-secondary)}.pds-combobox__trigger{align-items:center;background-color:transparent;border:none;border-radius:.1875rem;color:var(--pds-color-fg-default);display:flex;height:1.563rem}.pds-combobox__trigger:focus-visible{outline:1px solid var(--pds-color-interactive-focus)}.pds-combobox__trigger-icon{color:var(--pds-color-fg-default-secondary);pointer-events:none;transition:transform .2s ease-in-out 0s}.pds-combobox__trigger[aria-expanded=true] .pds-combobox__trigger-icon{transform:rotate(180deg);transition:transform .2s ease-in-out 0s}.pds-combobox__dropdown{background-color:var(--pds-color-dropdown-background);border-radius:.1875rem;box-shadow:var(--pds-elevation-overlay);box-sizing:border-box;margin-block-start:.512rem;max-height:18rem;overflow-x:hidden;overflow-y:auto;position:absolute;width:100%}.pds-combobox__dropdown:focus-visible{outline:none}.pds-combobox__options{display:flex;flex-direction:column;list-style:none;margin:0;padding:0;row-gap:.0625rem}.pds-combobox__loading,.pds-combobox__no-results{color:var(--pds-color-fg-default);font-size:1rem;padding:1rem}
|