@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.
@@ -5,7 +5,8 @@ import './dashboard-inner.css';
5
5
  */
6
6
  interface DashboardInnerProps extends ComponentPropsWithoutRef<'div'> {
7
7
  /**
8
- * Child elements to be assigned to named slots.
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. All children must be assigned to a named slot either 'sidebar' or 'content'.
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: "ease-in-out";
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: "ease-out";
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.1",
4
+ "version": "1.0.0-beta.3",
5
5
  "description": "PDS toolkit built using the React framework",
6
6
  "publishConfig": {
7
7
  "access": "public",