@pantheon-systems/pds-toolkit-react 2.0.0-alpha.16 → 2.0.0-alpha.17

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.
Files changed (32) hide show
  1. package/dist/components/Avatar/Avatar.d.ts +5 -1
  2. package/dist/components/Drawer/Drawer.d.ts +3 -3
  3. package/dist/components/IdentityBlock/IdentityBlock.d.ts +37 -0
  4. package/dist/components/Tooltip/Tooltip.d.ts +5 -1
  5. package/dist/components/icons/Icon/generated-icon-data.d.ts +16 -2
  6. package/dist/components/navigation/SideNavGlobal/SideNavGlobal.d.ts +5 -15
  7. package/dist/components/navigation/SideNavGlobal/SideNavGlobalItem.d.ts +5 -1
  8. package/dist/css/component-css/pds-avatar.css +1 -1
  9. package/dist/css/component-css/pds-combobox-multiselect.css +1 -1
  10. package/dist/css/component-css/pds-drawer.css +1 -1
  11. package/dist/css/component-css/pds-dropdown.css +2 -2
  12. package/dist/css/component-css/pds-identity-block.css +1 -0
  13. package/dist/css/component-css/pds-index.css +8 -8
  14. package/dist/css/component-css/pds-panel-list.css +1 -1
  15. package/dist/css/component-css/pds-section-message.css +1 -1
  16. package/dist/css/component-css/pds-side-nav-global.css +2 -2
  17. package/dist/css/component-css/pds-user-menu.css +1 -1
  18. package/dist/css/component-css/pds-workspace-selector.css +1 -1
  19. package/dist/css/layout-css/pds-app-layout.css +2 -2
  20. package/dist/css/layout-css/pds-index.css +2 -2
  21. package/dist/css/pds-components.css +8 -8
  22. package/dist/css/pds-core.css +1 -1
  23. package/dist/css/pds-layouts.css +2 -2
  24. package/dist/index.css +1 -1
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.js +4800 -4675
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.source.d.ts +1 -0
  29. package/dist/layouts/AppLayout/AppLayout.d.ts +35 -3
  30. package/dist/svg/landmark.svg +3 -0
  31. package/dist/svg/sidebar.svg +3 -0
  32. package/package.json +1 -1
@@ -43,6 +43,7 @@ export * from './components/footer/SiteFooter/SiteFooter';
43
43
  export * from './components/icons/Icon/Icon';
44
44
  export * from './components/icons/PaymentIcon/PaymentIcon';
45
45
  export * from './components/icons/PlatformIcon/PlatformIcon';
46
+ export * from './components/IdentityBlock/IdentityBlock';
46
47
  export * from './components/inputs/Checkbox/Checkbox';
47
48
  export * from './components/inputs/CheckboxFieldset/CheckboxFieldset';
48
49
  export * from './components/inputs/CheckboxGroup/CheckboxGroup';
@@ -1,9 +1,10 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { DrawerProps } from '../../components/Drawer/Drawer';
2
3
  import './app-layout.css';
3
4
  /**
4
5
  * Prop types for AppLayout
5
6
  */
6
- interface AppLayoutProps extends ComponentPropsWithoutRef<'div'> {
7
+ export interface AppLayoutProps extends ComponentPropsWithoutRef<'div'> {
7
8
  /**
8
9
  * Children to render in the layout.
9
10
  */
@@ -12,21 +13,44 @@ interface AppLayoutProps extends ComponentPropsWithoutRef<'div'> {
12
13
  * Additional class names
13
14
  */
14
15
  className?: string;
16
+ /**
17
+ * Content for the left-side Drawer (e.g., workspace switcher).
18
+ * Only rendered when `hasDrawerToggle` is true.
19
+ */
20
+ drawerContent?: ReactNode;
21
+ /**
22
+ * Pass-through props for the Drawer component.
23
+ */
24
+ drawerProps?: Partial<DrawerProps>;
25
+ /**
26
+ * Show a toggle button in the sidebar header that opens a Drawer overlay.
27
+ */
28
+ hasDrawerToggle?: boolean;
15
29
  /**
16
30
  * Is the sidebar able to be collapsed and expanded by the user?
17
31
  * If false or not provided, the sidebar will always be expanded.
18
32
  */
19
33
  hasSidebarToggle?: boolean;
34
+ /**
35
+ * Controlled open state for the drawer.
36
+ */
37
+ isDrawerOpen?: boolean;
20
38
  /**
21
39
  * Is the sidebar collapsed?
22
40
  * This is only relevant if `hasSidebarToggle` is true.
23
41
  */
24
42
  isSidebarCollapsed?: boolean;
43
+ /**
44
+ * Enable keyboard shortcuts to toggle the sidebar.
45
+ * `[` collapses, `]` expands. Only active when `hasSidebarToggle` is true.
46
+ */
47
+ keyboardShortcuts?: boolean;
25
48
  /**
26
49
  * Labels for translatable strings.
27
50
  */
28
51
  labels?: {
29
52
  collapseSidebar: string;
53
+ drawerToggle: string;
30
54
  expandSidebar: string;
31
55
  };
32
56
  /**
@@ -42,6 +66,10 @@ interface AppLayoutProps extends ComponentPropsWithoutRef<'div'> {
42
66
  * Additional props for the main content element.
43
67
  */
44
68
  mainContentProps?: ComponentPropsWithoutRef<'div'> | ComponentPropsWithoutRef<'main'>;
69
+ /**
70
+ * Callback when the drawer toggle button is clicked.
71
+ */
72
+ onDrawerToggle?: () => void;
45
73
  /**
46
74
  * Callback function to handle sidebar toggle.
47
75
  * If not provided, the sidebar will use an internal function to manage collapsed state.
@@ -65,6 +93,11 @@ interface AppLayoutProps extends ComponentPropsWithoutRef<'div'> {
65
93
  * This is also the width of the sidebar when it is not collapsable (hasSidebarToggle is false).
66
94
  */
67
95
  sidebarExpandedWidth?: string;
96
+ /**
97
+ * Maximum width of the sidebar when expanded in rems.
98
+ * Prevents the sidebar from growing too wide on large screens.
99
+ */
100
+ sidebarExpandedWidthMax?: number;
68
101
  /**
69
102
  * Minimum width of the sidebar when expanded in rems.
70
103
  * This is also the min-width of the sidebar when it is not collapsable (hasSidebarToggle is false).
@@ -78,5 +111,4 @@ interface AppLayoutProps extends ComponentPropsWithoutRef<'div'> {
78
111
  /**
79
112
  * AppLayout UI component
80
113
  */
81
- export declare const AppLayout: ({ children, className, hasSidebarToggle, isSidebarCollapsed, labels, mainBackground, mainContentElement, mainContentProps, onSidebarToggle, scrollableContent, sidebarBackground, sidebarCollapsedWidth, sidebarExpandedWidth, sidebarExpandedWidthMin, sidebarProps, ...props }: AppLayoutProps) => import("react/jsx-runtime").JSX.Element;
82
- export {};
114
+ export declare const AppLayout: ({ children, className, drawerContent, drawerProps, hasDrawerToggle, hasSidebarToggle, isDrawerOpen, isSidebarCollapsed, keyboardShortcuts, labels, mainBackground, mainContentElement, mainContentProps, onDrawerToggle, onSidebarToggle, scrollableContent, sidebarBackground, sidebarCollapsedWidth, sidebarExpandedWidth, sidebarExpandedWidthMax, sidebarExpandedWidthMin, sidebarProps, ...props }: AppLayoutProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor" aria-hidden="true" focusable="false" role="img">
2
+ <path d="M242.9 11.9c8-5.2 18.3-5.2 26.3 0l232 152c8.9 5.8 12.9 16.8 9.8 26.9S498.6 208 488 208l-40 0 0 160 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L56 416c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-160-40 0c-10.6 0-20-7-23-17.1s1-21.1 9.8-26.9l232-152zM112 368l64 0 0-160-64 0 0 160zm112 0l64 0 0-160-64 0 0 160zm112 0l64 0 0-160-64 0 0 160zM104.4 160L407.6 160 256 60.7 104.4 160zM24 464l464 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 512c-13.3 0-24-10.7-24-24s10.7-24 24-24z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor" aria-hidden="true" focusable="false" role="img">
2
+ <path d="M0 128C0 92.7 28.7 64 64 64l384 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM176 240c0-13.3-10.7-24-24-24l-80 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24zm0 88c0-13.3-10.7-24-24-24l-80 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24zm48 72l224 0c8.8 0 16-7.2 16-16l0-256c0-8.8-7.2-16-16-16l-224 0 0 288zM176 152c0-13.3-10.7-24-24-24l-80 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24z"/>
3
+ </svg>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pantheon-systems/pds-toolkit-react",
3
3
  "technology": "React",
4
- "version": "2.0.0-alpha.16",
4
+ "version": "2.0.0-alpha.17",
5
5
  "description": "PDS toolkit built using the React framework",
6
6
  "publishConfig": {
7
7
  "access": "public",