@pantheon-systems/pds-toolkit-react 1.0.0-beta.1 → 1.0.0-beta.3
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/inputs/Select/Select.d.ts +10 -1
- package/_dist/css/component-css/pds-index.css +2 -2
- package/_dist/css/component-css/pds-menu-button.css +1 -1
- package/_dist/css/component-css/pds-select.css +1 -1
- package/_dist/css/component-css/pds-switch.css +1 -1
- package/_dist/css/pds-components.css +2 -2
- package/_dist/index.css +1 -1
- package/_dist/index.js +3072 -2971
- package/_dist/index.js.map +1 -1
- package/_dist/layouts/DashboardInner/DashboardInner.d.ts +2 -1
- package/_dist/layouts/SidebarLayout/SidebarLayout.d.ts +2 -1
- package/_dist/libs/types/custom-types.d.ts +29 -0
- package/_dist/vars/animation.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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
|
/**
|
|
@@ -5,7 +5,8 @@ import { GridGapOptions } from '@layouts/layout-types';
|
|
|
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
|
/**
|
|
@@ -26,6 +26,10 @@ export type HeadingItemType = {
|
|
|
26
26
|
export type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span';
|
|
27
27
|
export type HeadingLevelCommon = Exclude<HeadingLevel, 'h1' | 'h5' | 'h6'>;
|
|
28
28
|
export type LinkItemType = {
|
|
29
|
+
/**
|
|
30
|
+
* Screen reader label for critical items. Only used when isCritical is true.
|
|
31
|
+
*/
|
|
32
|
+
criticalLabel?: string;
|
|
29
33
|
/**
|
|
30
34
|
* Description of the item
|
|
31
35
|
*/
|
|
@@ -38,6 +42,10 @@ export type LinkItemType = {
|
|
|
38
42
|
* Optional icon for this item. Choose from available icons in the Icon component.
|
|
39
43
|
*/
|
|
40
44
|
iconName?: PDSIcon;
|
|
45
|
+
/**
|
|
46
|
+
* Is this a critical action item?
|
|
47
|
+
*/
|
|
48
|
+
isCritical?: boolean;
|
|
41
49
|
/**
|
|
42
50
|
* Is the item a link?
|
|
43
51
|
*/
|
|
@@ -56,6 +64,10 @@ export type MenuItemType = {
|
|
|
56
64
|
* (optional) Callback function to execute when menu item is activated
|
|
57
65
|
*/
|
|
58
66
|
callback?: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* Screen reader label for critical items. Only used when isCritical is true.
|
|
69
|
+
*/
|
|
70
|
+
criticalLabel?: string;
|
|
59
71
|
/**
|
|
60
72
|
* Description of the item
|
|
61
73
|
*/
|
|
@@ -72,6 +84,10 @@ export type MenuItemType = {
|
|
|
72
84
|
* Optional ID value for this item.
|
|
73
85
|
*/
|
|
74
86
|
id?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Is this a critical action item?
|
|
89
|
+
*/
|
|
90
|
+
isCritical?: boolean;
|
|
75
91
|
/**
|
|
76
92
|
* Label for a menu item
|
|
77
93
|
*/
|
|
@@ -82,6 +98,14 @@ export type MenuItemType = {
|
|
|
82
98
|
testId?: string;
|
|
83
99
|
};
|
|
84
100
|
export type NodeItemType = {
|
|
101
|
+
/**
|
|
102
|
+
* Screen reader label for critical items. Only used when isCritical is true.
|
|
103
|
+
*/
|
|
104
|
+
criticalLabel?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Is this a critical action item?
|
|
107
|
+
*/
|
|
108
|
+
isCritical?: boolean;
|
|
85
109
|
/**
|
|
86
110
|
* Is the item a node?
|
|
87
111
|
*/
|
|
@@ -97,6 +121,11 @@ export type SeparatorItemType = {
|
|
|
97
121
|
*/
|
|
98
122
|
isSeparator: boolean;
|
|
99
123
|
};
|
|
124
|
+
export type MenuItem = HeadingItemType | LinkItemType | MenuItemType | NodeItemType | SeparatorItemType;
|
|
125
|
+
export declare const isSeparatorItemType: (item: MenuItem) => item is SeparatorItemType;
|
|
126
|
+
export declare const isHeadingItemType: (item: MenuItem) => item is HeadingItemType;
|
|
127
|
+
export declare const isLinkItemType: (item: MenuItem) => item is LinkItemType;
|
|
128
|
+
export declare const isNodeItemType: (item: MenuItem) => item is NodeItemType;
|
|
100
129
|
export type SitePlanLevel = 'sandbox' | 'basic' | 'performance-small' | 'performance-medium' | 'performance-large' | 'performance-xl' | 'performance-2xl' | 'elite' | 'pro' | 'business' | 'flagship-performance';
|
|
101
130
|
export declare const SitePlanLevelLabel: Record<SitePlanLevel, string>;
|
|
102
131
|
export type SiteStatus = 'active' | 'frozen' | 'restricted';
|
|
@@ -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