@pantheon-systems/pds-toolkit-react 1.0.0-beta.1 → 1.0.0-beta.10
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/README.md +1 -1
- package/_dist/components/CTASlice/CTASlice.d.ts +1 -1
- package/_dist/components/Callout/Callout.d.ts +2 -1
- package/_dist/components/DashboardStat/DashboardStat.d.ts +2 -2
- package/_dist/components/Pagination/Pagination.d.ts +1 -1
- package/_dist/components/Popover/Popover.d.ts +2 -3
- package/_dist/components/SiteDashboardHeading/SiteDashboardHeading.d.ts +5 -4
- package/_dist/components/SocialLinks/SocialLinks.d.ts +1 -1
- package/_dist/components/StatusIndicator/StatusIndicator.d.ts +2 -1
- package/_dist/components/TableOfContents/TableOfContents.d.ts +1 -1
- package/_dist/components/Tabs/Tabs.d.ts +1 -1
- package/_dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/_dist/components/badges/StatusBadge/StatusBadge.d.ts +2 -1
- package/_dist/components/buttons/Button/Button.d.ts +6 -5
- package/_dist/components/buttons/ButtonLink/ButtonLink.d.ts +2 -2
- package/_dist/components/buttons/IconButton/IconButton.d.ts +4 -3
- package/_dist/components/buttons/MenuButton/MenuButton.d.ts +4 -4
- package/_dist/components/buttons/SegmentedButton/SegmentedButton.d.ts +1 -1
- package/_dist/components/buttons/SplitButton/SplitButton.d.ts +3 -3
- package/_dist/components/buttons/UtilityButton/UtilityButton.d.ts +1 -1
- package/_dist/components/cards/Card/Card.d.ts +1 -1
- package/_dist/components/cards/CardHeading/CardHeading.d.ts +1 -1
- package/_dist/components/cards/EmptyStateCard/EmptyStateCard.d.ts +1 -1
- package/_dist/components/cards/LinksCard/LinksCard.d.ts +1 -1
- package/_dist/components/cards/NewSiteCard/NewSiteCard.d.ts +1 -1
- package/_dist/components/cards/PricingCard/PricingCard.d.ts +1 -1
- package/_dist/components/cards/SiteCard/SiteCard.d.ts +1 -1
- package/_dist/components/empty-states/CompactEmptyState/CompactEmptyState.d.ts +3 -3
- package/_dist/components/empty-states/HorizontalEmptyState/HorizontalEmptyState.d.ts +2 -2
- package/_dist/components/empty-states/VerticalEmptyState/VerticalEmptyState.d.ts +1 -1
- package/_dist/components/footer/FooterHeading/FooterHeading.d.ts +1 -1
- package/_dist/components/footer/FooterLinks/FooterLinks.d.ts +1 -1
- package/_dist/components/footer/SiteFooter/SiteFooter.d.ts +1 -1
- package/_dist/components/icons/Icon/Icon.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 +11 -2
- 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/loading-indicators/Skeleton/Skeleton.d.ts +1 -1
- package/_dist/components/navigation/ButtonNav/ButtonNav.d.ts +1 -1
- package/_dist/components/navigation/DashboardNav/DashboardNavItem.d.ts +4 -4
- package/_dist/components/navigation/DashboardSearch/SiteOptionDisplay.d.ts +1 -1
- 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/Navbar/Navbar.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 +4 -4
- package/_dist/components/navigation/TabMenu/TabMenu.d.ts +4 -4
- package/_dist/components/navigation/TabMenu/TabMenuDropdown.d.ts +3 -3
- package/_dist/components/navigation/UserMenu/UserMenu.d.ts +1 -1
- package/_dist/components/navigation/WorkspaceSelector/WorkspaceSelector.d.ts +14 -0
- package/_dist/components/navigation/navigation-utilities.d.ts +2 -2
- 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 +3 -2
- package/_dist/components/panels/Panel/Panel.d.ts +11 -4
- package/_dist/components/panels/PanelList/PanelList.d.ts +5 -1
- package/_dist/components/progress-indicators/ProgressBar/ProgressBar.d.ts +2 -1
- package/_dist/components/steppers/VerticalStepper/VerticalStep.d.ts +1 -1
- package/_dist/components/tiles/Tile/Tile.d.ts +1 -1
- package/_dist/components/tiles/TileGrid/TileGrid.d.ts +2 -2
- package/_dist/css/component-css/pds-code-block.css +1 -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-dashboard-nav.css +1 -1
- package/_dist/css/component-css/pds-index.css +8 -8
- package/_dist/css/component-css/pds-menu-button.css +1 -1
- package/_dist/css/component-css/pds-navbar.css +1 -1
- package/_dist/css/component-css/pds-panel-list.css +1 -1
- package/_dist/css/component-css/pds-select.css +1 -1
- package/_dist/css/component-css/pds-side-nav-global.css +1 -1
- package/_dist/css/component-css/pds-switch.css +1 -1
- package/_dist/css/component-css/pds-workspace-selector.css +1 -1
- package/_dist/css/pds-components.css +8 -8
- package/_dist/index.css +1 -1
- package/_dist/index.d.ts +3 -1
- package/_dist/index.js +5103 -4885
- package/_dist/index.js.map +1 -1
- package/_dist/layouts/AppLayout/AppLayout.d.ts +1 -1
- package/_dist/layouts/Container/Container.d.ts +1 -1
- package/_dist/layouts/DashboardInner/DashboardInner.d.ts +2 -1
- package/_dist/layouts/FlexContainer/FlexContainer.d.ts +1 -1
- package/_dist/layouts/SidebarLayout/SidebarLayout.d.ts +3 -2
- package/_dist/layouts/ThreeItemLayout/ThreeItemLayout.d.ts +1 -1
- package/_dist/layouts/TwoItemLayout/TwoItemLayout.d.ts +1 -1
- package/_dist/libs/components/utility-components.d.ts +1 -1
- package/_dist/libs/types/custom-types.d.ts +38 -2
- package/_dist/{components/navigation → libs/types}/navigation-types.d.ts +7 -7
- package/_dist/mocks/data/navigation-items.d.ts +8 -96
- package/_dist/utilities/context-providers/OverlayContext/OverlayContext.d.ts +12 -0
- package/_dist/vars/animation.d.ts +2 -2
- package/package.json +34 -31
- /package/_dist/{components/inputs → libs/types}/input-types.d.ts +0 -0
- /package/_dist/{layouts → libs/types}/layout-types.d.ts +0 -0
|
@@ -5,7 +5,8 @@ import './dashboard-inner.css';
|
|
|
5
5
|
*/
|
|
6
6
|
interface DashboardInnerProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
7
|
/**
|
|
8
|
-
* Child elements
|
|
8
|
+
* Child elements. Main content can be passed without a slot attribute (unslotted).
|
|
9
|
+
* Optional named slots: `header-left`, `header-right`, `content` (for backwards compatibility).
|
|
9
10
|
*/
|
|
10
11
|
children: ReactNode;
|
|
11
12
|
/**
|
|
@@ -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 './flex-container.css';
|
|
4
4
|
type FlexAlignContent = 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'stretch';
|
|
5
5
|
type FlexAlignItems = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import { GridGapOptions } from '
|
|
2
|
+
import { GridGapOptions } from '../../libs/types/layout-types';
|
|
3
3
|
/**
|
|
4
4
|
* Prop types for SidebarLayout
|
|
5
5
|
*/
|
|
6
6
|
interface SidebarLayoutProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
7
|
/**
|
|
8
|
-
* Children to render in the layout.
|
|
8
|
+
* Children to render in the layout. Main content can be passed without a slot attribute (unslotted).
|
|
9
|
+
* Optional named slots: `sidebar` for sidebar content, `content` for backwards compatibility.
|
|
9
10
|
*/
|
|
10
11
|
children: ReactNode;
|
|
11
12
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import { GridGapOptions, VerticalAlignOptions } from '
|
|
2
|
+
import { GridGapOptions, VerticalAlignOptions } from '../../libs/types/layout-types';
|
|
3
3
|
import '../../utilities/grid/grid.css';
|
|
4
4
|
import './three-item-layout.css';
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import { GridGapOptions, VerticalAlignOptions } from '
|
|
2
|
+
import { GridGapOptions, VerticalAlignOptions } from '../../libs/types/layout-types';
|
|
3
3
|
import '../../utilities/grid/grid.css';
|
|
4
4
|
import './two-item-layout.css';
|
|
5
5
|
/**
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { PDSIcon } from '
|
|
2
|
+
import { PDSIcon } from '../../components/icons/Icon/Icon';
|
|
3
3
|
export type BadgeColor = 'success' | 'critical' | 'info' | 'warning' | 'neutral' | 'brand' | 'silver' | 'gold' | 'platinum' | 'diamond';
|
|
4
4
|
export type ButtonDisplayType = 'label-only' | 'icon-start' | 'icon-end';
|
|
5
5
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
6
6
|
export type ButtonType = 'button' | 'submit' | 'reset';
|
|
7
|
-
export type ButtonVariant = 'primary' | 'secondary' | 'subtle' | 'brand' | 'brand-secondary' | 'critical' | 'navbar' | 'inline';
|
|
7
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'subtle' | 'brand' | 'brand-secondary' | 'critical' | 'critical-secondary' | 'navbar' | 'inline';
|
|
8
8
|
export type ContainerWidth = 'narrow' | 'standard' | 'wide' | 'x-wide' | 'full';
|
|
9
9
|
export type Display = 'block' | 'inline' | 'inline-block' | 'flex' | 'inline-flex' | 'grid' | 'inline-grid' | 'flow-root' | 'none' | 'contents' | 'table' | 'table-row' | 'table-cell' | 'table-caption' | 'table-column' | 'table-column-group' | 'table-footer-group' | 'table-header-group' | 'table-row-group' | 'list-item' | 'inherit' | 'initial' | 'revert' | 'unset';
|
|
10
|
+
export type StatusType = 'info' | 'success' | 'warning' | 'critical' | 'discovery';
|
|
11
|
+
export type StatusTypeExtended = StatusType | 'neutral' | 'working';
|
|
12
|
+
export declare const StatusTypeLabels: Record<StatusType, string>;
|
|
10
13
|
export type FuiOffset = number | {
|
|
11
14
|
alignmentAxis?: number | null;
|
|
12
15
|
crossAxis?: number;
|
|
@@ -26,6 +29,10 @@ export type HeadingItemType = {
|
|
|
26
29
|
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span';
|
|
27
30
|
export type HeadingLevelCommon = Exclude<HeadingLevel, 'h1' | 'h5' | 'h6'>;
|
|
28
31
|
export type LinkItemType = {
|
|
32
|
+
/**
|
|
33
|
+
* Screen reader label for critical items. Only used when isCritical is true.
|
|
34
|
+
*/
|
|
35
|
+
criticalLabel?: string;
|
|
29
36
|
/**
|
|
30
37
|
* Description of the item
|
|
31
38
|
*/
|
|
@@ -38,6 +45,10 @@ export type LinkItemType = {
|
|
|
38
45
|
* Optional icon for this item. Choose from available icons in the Icon component.
|
|
39
46
|
*/
|
|
40
47
|
iconName?: PDSIcon;
|
|
48
|
+
/**
|
|
49
|
+
* Is this a critical action item?
|
|
50
|
+
*/
|
|
51
|
+
isCritical?: boolean;
|
|
41
52
|
/**
|
|
42
53
|
* Is the item a link?
|
|
43
54
|
*/
|
|
@@ -56,6 +67,10 @@ export type MenuItemType = {
|
|
|
56
67
|
* (optional) Callback function to execute when menu item is activated
|
|
57
68
|
*/
|
|
58
69
|
callback?: () => void;
|
|
70
|
+
/**
|
|
71
|
+
* Screen reader label for critical items. Only used when isCritical is true.
|
|
72
|
+
*/
|
|
73
|
+
criticalLabel?: string;
|
|
59
74
|
/**
|
|
60
75
|
* Description of the item
|
|
61
76
|
*/
|
|
@@ -72,6 +87,10 @@ export type MenuItemType = {
|
|
|
72
87
|
* Optional ID value for this item.
|
|
73
88
|
*/
|
|
74
89
|
id?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Is this a critical action item?
|
|
92
|
+
*/
|
|
93
|
+
isCritical?: boolean;
|
|
75
94
|
/**
|
|
76
95
|
* Label for a menu item
|
|
77
96
|
*/
|
|
@@ -82,6 +101,18 @@ export type MenuItemType = {
|
|
|
82
101
|
testId?: string;
|
|
83
102
|
};
|
|
84
103
|
export type NodeItemType = {
|
|
104
|
+
/**
|
|
105
|
+
* Screen reader label for critical items. Only used when isCritical is true.
|
|
106
|
+
*/
|
|
107
|
+
criticalLabel?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Is this item disabled?
|
|
110
|
+
*/
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Is this a critical action item?
|
|
114
|
+
*/
|
|
115
|
+
isCritical?: boolean;
|
|
85
116
|
/**
|
|
86
117
|
* Is the item a node?
|
|
87
118
|
*/
|
|
@@ -97,6 +128,11 @@ export type SeparatorItemType = {
|
|
|
97
128
|
*/
|
|
98
129
|
isSeparator: boolean;
|
|
99
130
|
};
|
|
131
|
+
export type MenuItem = HeadingItemType | LinkItemType | MenuItemType | NodeItemType | SeparatorItemType;
|
|
132
|
+
export declare const isSeparatorItemType: (item: MenuItem) => item is SeparatorItemType;
|
|
133
|
+
export declare const isHeadingItemType: (item: MenuItem) => item is HeadingItemType;
|
|
134
|
+
export declare const isLinkItemType: (item: MenuItem) => item is LinkItemType;
|
|
135
|
+
export declare const isNodeItemType: (item: MenuItem) => item is NodeItemType;
|
|
100
136
|
export type SitePlanLevel = 'sandbox' | 'basic' | 'performance-small' | 'performance-medium' | 'performance-large' | 'performance-xl' | 'performance-2xl' | 'elite' | 'pro' | 'business' | 'flagship-performance';
|
|
101
137
|
export declare const SitePlanLevelLabel: Record<SitePlanLevel, string>;
|
|
102
138
|
export type SiteStatus = 'active' | 'frozen' | 'restricted';
|
|
@@ -3,11 +3,11 @@ export type NavigationItem = {
|
|
|
3
3
|
/**
|
|
4
4
|
* A boolean indicating whether the item is the active item.
|
|
5
5
|
*/
|
|
6
|
-
isActive?: boolean;
|
|
6
|
+
isActive?: boolean | null;
|
|
7
7
|
/**
|
|
8
8
|
* Link content — a fully-formed link element using the router of your choice. If a string is provided instead, the item will be rendered as a link that navigates to the first child item.
|
|
9
9
|
*/
|
|
10
|
-
linkContent
|
|
10
|
+
linkContent?: ReactElement | string;
|
|
11
11
|
/**
|
|
12
12
|
* Submenu items.
|
|
13
13
|
*/
|
|
@@ -17,7 +17,7 @@ export type FlattenedNavigationItem = {
|
|
|
17
17
|
/**
|
|
18
18
|
* A boolean indicating whether the item is the active item.
|
|
19
19
|
*/
|
|
20
|
-
isActive?: boolean;
|
|
20
|
+
isActive?: boolean | null;
|
|
21
21
|
/**
|
|
22
22
|
* Nesting level of the item.
|
|
23
23
|
*/
|
|
@@ -25,13 +25,13 @@ export type FlattenedNavigationItem = {
|
|
|
25
25
|
/**
|
|
26
26
|
* Link content — a fully-formed link element using the router of your choice.
|
|
27
27
|
*/
|
|
28
|
-
linkContent
|
|
28
|
+
linkContent?: ReactElement;
|
|
29
29
|
};
|
|
30
|
-
export interface
|
|
30
|
+
export interface NavMenuItem {
|
|
31
31
|
id?: string;
|
|
32
|
-
isActive?: boolean;
|
|
32
|
+
isActive?: boolean | null;
|
|
33
33
|
isSeparator?: boolean;
|
|
34
34
|
label: string;
|
|
35
35
|
linkContent?: ReactElement;
|
|
36
|
-
links?:
|
|
36
|
+
links?: NavMenuItem[];
|
|
37
37
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { SideNavGlobalItemProps } from '
|
|
1
|
+
import type { SideNavGlobalItemProps } from '../../components/navigation/SideNavGlobal/SideNavGlobalItem';
|
|
2
|
+
import type { WorkspaceSelectorItem } from '../../components/navigation/WorkspaceSelector/WorkspaceSelector';
|
|
2
3
|
export declare const dialogMsgBase = "Activated menu item => ";
|
|
3
|
-
import { UserMenuItem } from '
|
|
4
|
+
import { UserMenuItem } from '../../components/navigation/UserMenu/UserMenu';
|
|
4
5
|
export declare const buttonNavSampleMenuItems: ({
|
|
5
6
|
linkContent: import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
isActive: boolean;
|
|
@@ -54,7 +55,7 @@ export declare const micrositeMenuItems: ({
|
|
|
54
55
|
label?: undefined;
|
|
55
56
|
links?: undefined;
|
|
56
57
|
})[];
|
|
57
|
-
export declare const
|
|
58
|
+
export declare const navMenuSampleNavMenuItems: ({
|
|
58
59
|
label: string;
|
|
59
60
|
links: ({
|
|
60
61
|
linkContent: import("react/jsx-runtime").JSX.Element;
|
|
@@ -76,7 +77,7 @@ export declare const navMenuSampleMenuItems: ({
|
|
|
76
77
|
links?: undefined;
|
|
77
78
|
isActive?: undefined;
|
|
78
79
|
})[];
|
|
79
|
-
export declare const
|
|
80
|
+
export declare const navMenuSampleNavMenuItemsRR: ({
|
|
80
81
|
label: string;
|
|
81
82
|
links: ({
|
|
82
83
|
linkContent: import("react/jsx-runtime").JSX.Element;
|
|
@@ -272,95 +273,6 @@ export declare const tabMenuSampleMenuItemsMultidev: ({
|
|
|
272
273
|
promoteActiveChildLink?: undefined;
|
|
273
274
|
})[];
|
|
274
275
|
export declare const userMenuSampleItems: UserMenuItem[];
|
|
275
|
-
export declare const workspaceItemsSimple:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
279
|
-
imageSrc?: undefined;
|
|
280
|
-
planTier?: undefined;
|
|
281
|
-
isUnprivileged?: undefined;
|
|
282
|
-
isActive?: undefined;
|
|
283
|
-
} | {
|
|
284
|
-
displayName: string;
|
|
285
|
-
imageSrc: string;
|
|
286
|
-
planTier: string;
|
|
287
|
-
workspaceId: string;
|
|
288
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
289
|
-
isUnprivileged?: undefined;
|
|
290
|
-
isActive?: undefined;
|
|
291
|
-
} | {
|
|
292
|
-
displayName: string;
|
|
293
|
-
imageSrc: string;
|
|
294
|
-
planTier: string;
|
|
295
|
-
workspaceId: string;
|
|
296
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
297
|
-
isUnprivileged: boolean;
|
|
298
|
-
isActive?: undefined;
|
|
299
|
-
} | {
|
|
300
|
-
displayName: string;
|
|
301
|
-
planTier: string;
|
|
302
|
-
workspaceId: string;
|
|
303
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
304
|
-
isActive: boolean;
|
|
305
|
-
imageSrc?: undefined;
|
|
306
|
-
isUnprivileged?: undefined;
|
|
307
|
-
} | {
|
|
308
|
-
displayName: string;
|
|
309
|
-
planTier: string;
|
|
310
|
-
workspaceId: string;
|
|
311
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
312
|
-
imageSrc?: undefined;
|
|
313
|
-
isUnprivileged?: undefined;
|
|
314
|
-
isActive?: undefined;
|
|
315
|
-
})[];
|
|
316
|
-
export declare const workspaceItemsPersonal: ({
|
|
317
|
-
displayName: string;
|
|
318
|
-
workspaceId: string;
|
|
319
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
320
|
-
isActive: boolean;
|
|
321
|
-
imageSrc?: undefined;
|
|
322
|
-
planTier?: undefined;
|
|
323
|
-
} | {
|
|
324
|
-
displayName: string;
|
|
325
|
-
imageSrc: string;
|
|
326
|
-
planTier: string;
|
|
327
|
-
workspaceId: string;
|
|
328
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
329
|
-
isActive?: undefined;
|
|
330
|
-
} | {
|
|
331
|
-
displayName: string;
|
|
332
|
-
planTier: string;
|
|
333
|
-
workspaceId: string;
|
|
334
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
335
|
-
isActive?: undefined;
|
|
336
|
-
imageSrc?: undefined;
|
|
337
|
-
})[];
|
|
338
|
-
export declare const workspaceItemsLonger: ({
|
|
339
|
-
displayName: string;
|
|
340
|
-
workspaceId: string;
|
|
341
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
342
|
-
imageSrc?: undefined;
|
|
343
|
-
planTier?: undefined;
|
|
344
|
-
isActive?: undefined;
|
|
345
|
-
} | {
|
|
346
|
-
displayName: string;
|
|
347
|
-
imageSrc: string;
|
|
348
|
-
planTier: string;
|
|
349
|
-
workspaceId: string;
|
|
350
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
351
|
-
isActive?: undefined;
|
|
352
|
-
} | {
|
|
353
|
-
displayName: string;
|
|
354
|
-
planTier: string;
|
|
355
|
-
workspaceId: string;
|
|
356
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
357
|
-
imageSrc?: undefined;
|
|
358
|
-
isActive?: undefined;
|
|
359
|
-
} | {
|
|
360
|
-
displayName: string;
|
|
361
|
-
planTier: string;
|
|
362
|
-
workspaceId: string;
|
|
363
|
-
workspaceLink: import("react/jsx-runtime").JSX.Element;
|
|
364
|
-
isActive: boolean;
|
|
365
|
-
imageSrc?: undefined;
|
|
366
|
-
})[];
|
|
276
|
+
export declare const workspaceItemsSimple: WorkspaceSelectorItem[];
|
|
277
|
+
export declare const workspaceItemsPersonal: WorkspaceSelectorItem[];
|
|
278
|
+
export declare const workspaceItemsLonger: WorkspaceSelectorItem[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
interface OverlayContextType {
|
|
3
|
+
closeOverlay: () => void;
|
|
4
|
+
hasOpenOverlay: boolean;
|
|
5
|
+
openOverlay: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const OverlayContext: React.Context<OverlayContextType>;
|
|
8
|
+
export declare const OverlayContextProvider: ({ children, }: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const useOverlayContext: () => OverlayContextType;
|
|
12
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const ANIMATION_TRANSITION_DEFAULT_DURATION: 200;
|
|
2
2
|
export const ANIMATION_TRANSITION_DEFAULT_DELAY: 0;
|
|
3
|
-
export const ANIMATION_TRANSITION_DEFAULT_TIMING_FUNCTION: "
|
|
3
|
+
export const ANIMATION_TRANSITION_DEFAULT_TIMING_FUNCTION: "cubic-bezier(.2, 0, 0, 1)";
|
|
4
4
|
export const ANIMATION_TRANSITION_REVEAL_DURATION: 300;
|
|
5
|
-
export const ANIMATION_TRANSITION_REVEAL_TIMING_FUNCTION: "
|
|
5
|
+
export const ANIMATION_TRANSITION_REVEAL_TIMING_FUNCTION: "cubic-bezier(.2, 0, 0, 1)";
|
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-beta.
|
|
4
|
+
"version": "1.0.0-beta.10",
|
|
5
5
|
"description": "PDS toolkit built using the React framework",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|
|
@@ -37,26 +37,27 @@
|
|
|
37
37
|
],
|
|
38
38
|
"type": "module",
|
|
39
39
|
"scripts": {
|
|
40
|
-
"build": "
|
|
41
|
-
"build:types": "tsc -p tsconfig.build.json",
|
|
42
|
-
"postbuild": "npm run build:css && npm run build:css:components && npm run build:css:layouts && npm run build:css:packageExtraCss",
|
|
40
|
+
"build:lib": "vite build && npm run build:types",
|
|
41
|
+
"build:types": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
42
|
+
"postbuild:lib": "npm run build:css && npm run build:css:components && npm run build:css:layouts && npm run build:css:packageExtraCss",
|
|
43
43
|
"build:css": "postcss src/core.css -o _dist/css/pds-core.css",
|
|
44
44
|
"build:css:components": "postcss src/components/index.css -o _dist/css/pds-components.css",
|
|
45
45
|
"build:css:layouts": "postcss src/layouts/index.css -o _dist/css/pds-layouts.css",
|
|
46
46
|
"build:css:packageExtraCss": "node scripts/package-extra-css.js",
|
|
47
47
|
"build:css:watch": "npm run build:css -- -w",
|
|
48
|
-
"typecheck:tsc": "tsc --noEmit",
|
|
49
|
-
"typecheck:attw": "attw --pack . --ignore-rules cjs-resolves-to-esm no-resolution internal-resolution-error",
|
|
50
|
-
"typecheck:publint": "npx publint",
|
|
51
|
-
"typecheck": "npm run typecheck:attw && npm run typecheck:publint && npm run typecheck:tsc",
|
|
52
48
|
"prestorybook": "npm run build:css",
|
|
53
49
|
"storybook": "storybook dev -p 6006",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
50
|
+
"prebuild": "npm run build:css",
|
|
51
|
+
"build": "storybook build",
|
|
52
|
+
"build-storybook": "storybook build",
|
|
53
|
+
"predeploy:pantheon": "npm run build:css",
|
|
54
|
+
"deploy:pantheon": "storybook build",
|
|
55
|
+
"start": "node index.js",
|
|
56
56
|
"develop": "concurrently --raw --kill-others \"npm run storybook\" \"npm run build:css:watch\"",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
57
|
+
"typecheck": "npm run typecheck:attw && npm run typecheck:publint && npm run typecheck:tsc",
|
|
58
|
+
"typecheck:tsc": "tsc --noEmit",
|
|
59
|
+
"typecheck:attw": "attw --pack . --ignore-rules cjs-resolves-to-esm no-resolution internal-resolution-error",
|
|
60
|
+
"typecheck:publint": "npx publint",
|
|
60
61
|
"pretest": "npm run build:css",
|
|
61
62
|
"test": "playwright test",
|
|
62
63
|
"pretest:vrt": "npm run build:css",
|
|
@@ -64,20 +65,20 @@
|
|
|
64
65
|
"pretest:vrt:update": "npm run build:css",
|
|
65
66
|
"test:vrt:update": "npm run test:vrt -- --update-snapshots",
|
|
66
67
|
"pretest:a11y:generate": "npm run build:css",
|
|
67
|
-
"test:a11y:generate": "DISABLE_A11Y_ADDON=true npm run
|
|
68
|
+
"test:a11y:generate": "DISABLE_A11Y_ADDON=true npm run build && node __tests__/a11y/a11y.generate-tests.js",
|
|
68
69
|
"test:a11y": "USE_STATIC_STORYBOOK=true DISABLE_A11Y_ADDON=true playwright test --project 'a11y'",
|
|
69
70
|
"test:a11y:results": "npx http-server ./__tests__/a11y/results/",
|
|
70
|
-
"
|
|
71
|
-
"
|
|
71
|
+
"eslint": "eslint --ext .jsx,.tsx,.js,.ts",
|
|
72
|
+
"eslint:all": "eslint src --ext .jsx,.tsx,.js,.ts --cache",
|
|
73
|
+
"format:fix": "prettier . --write && npm run eslint:all -- --fix",
|
|
72
74
|
"generate:component": "plop component",
|
|
73
75
|
"generate:layout": "plop layout",
|
|
74
76
|
"generate:foundation": "plop foundation",
|
|
75
77
|
"generate:pattern": "plop pattern",
|
|
76
78
|
"generate:utility": "plop utility",
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"pack:local": "bash scripts/pack-local.sh"
|
|
79
|
+
"test:version-switcher": "bash scripts/test-version-switcher.sh",
|
|
80
|
+
"pack:local": "bash scripts/pack-local.sh",
|
|
81
|
+
"prepare": "husky install"
|
|
81
82
|
},
|
|
82
83
|
"devDependencies": {
|
|
83
84
|
"@arethetypeswrong/cli": "^0.15.3",
|
|
@@ -87,12 +88,12 @@
|
|
|
87
88
|
"@csstools/postcss-design-tokens": "^2.0.4",
|
|
88
89
|
"@csstools/postcss-global-data": "^1.0.3",
|
|
89
90
|
"@playwright/test": "^1.36.2",
|
|
90
|
-
"@storybook/addon-a11y": "^
|
|
91
|
-
"@storybook/addon-docs": "^
|
|
92
|
-
"@storybook/addon-links": "^
|
|
93
|
-
"@storybook/addon-webpack5-compiler-swc": "^4.0.
|
|
94
|
-
"@storybook/react-vite": "^
|
|
95
|
-
"@storybook/react-webpack5": "^
|
|
91
|
+
"@storybook/addon-a11y": "^10.1.7",
|
|
92
|
+
"@storybook/addon-docs": "^10.1.7",
|
|
93
|
+
"@storybook/addon-links": "^10.1.7",
|
|
94
|
+
"@storybook/addon-webpack5-compiler-swc": "^4.0.2",
|
|
95
|
+
"@storybook/react-vite": "^10.1.7",
|
|
96
|
+
"@storybook/react-webpack5": "^10.1.7",
|
|
96
97
|
"@types/prismjs": "^1.26.5",
|
|
97
98
|
"@types/react": "^19.2.2",
|
|
98
99
|
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
"eslint-plugin-react": "^7.32.2",
|
|
111
112
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
112
113
|
"eslint-plugin-sort-destructure-keys": "^2.0.0",
|
|
113
|
-
"eslint-plugin-storybook": "^
|
|
114
|
+
"eslint-plugin-storybook": "^10.1.7",
|
|
114
115
|
"eslint-plugin-typescript-sort-keys": "^3.3.0",
|
|
115
116
|
"fast-glob": "^3.3.2",
|
|
116
117
|
"husky": "^8.0.3",
|
|
@@ -127,7 +128,8 @@
|
|
|
127
128
|
"prettier-plugin-css-order": "^2.1.2",
|
|
128
129
|
"react": "^18.2.0",
|
|
129
130
|
"react-dom": "^18.2.0",
|
|
130
|
-
"storybook": "^
|
|
131
|
+
"storybook": "^10.1.7",
|
|
132
|
+
"tsc-alias": "^1.8.16",
|
|
131
133
|
"typescript": "^5.4.5",
|
|
132
134
|
"vite": "^7.2.2",
|
|
133
135
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
@@ -144,6 +146,8 @@
|
|
|
144
146
|
"@reactuses/core": "^5.0.15",
|
|
145
147
|
"date-fns": "^4.1.0",
|
|
146
148
|
"downshift": "^9.0.8",
|
|
149
|
+
"express": "^4.22.1",
|
|
150
|
+
"express-rate-limit": "^8.2.1",
|
|
147
151
|
"focus-trap-react": "^10.2.1",
|
|
148
152
|
"hash-sum": "^2.0.0",
|
|
149
153
|
"prism-react-renderer": "^2.4.1",
|
|
@@ -156,8 +160,7 @@
|
|
|
156
160
|
"react-toastify": "^9.0.3"
|
|
157
161
|
},
|
|
158
162
|
"lint-staged": {
|
|
159
|
-
"
|
|
160
|
-
|
|
161
|
-
]
|
|
163
|
+
"*": "prettier --write --ignore-unknown",
|
|
164
|
+
"src/**/*.{js,jsx,ts,tsx}": "npm run eslint -- --fix"
|
|
162
165
|
}
|
|
163
166
|
}
|
|
File without changes
|
|
File without changes
|