@abgov/react-components 7.2.0-dev.4 → 7.2.0-dev.40

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.
@@ -0,0 +1,42 @@
1
+ import { DataAttributes, GoabWorkspaceLayoutOnScrollStateChangeDetail } from '@abgov/ui-components-common';
2
+ import { default as React, ReactNode, JSX } from 'react';
3
+ interface WCProps {
4
+ testid?: string;
5
+ }
6
+ declare module "react" {
7
+ namespace JSX {
8
+ interface IntrinsicElements {
9
+ "goa-workspace-layout": WCProps & React.HTMLAttributes<HTMLElement> & {
10
+ ref: React.RefObject<HTMLElement | null>;
11
+ };
12
+ }
13
+ }
14
+ }
15
+ export interface GoabWorkspaceLayoutProps extends DataAttributes {
16
+ /** Content rendered in the side navigation region (e.g. work-side-menu). */
17
+ sideMenu?: ReactNode;
18
+ /** Content rendered in the sticky page header region. */
19
+ pageHeader?: ReactNode;
20
+ /** Content rendered in the sticky page footer region. */
21
+ pageFooter?: ReactNode;
22
+ /**
23
+ * A GoabPushDrawer rendered as a sibling of the main card, inside the same
24
+ * workspace shell. Use this slot when the page needs a push drawer alongside
25
+ * the workspace layout — it gives the drawer the shell-level height and flex
26
+ * context it expects, so the consumer does not have to wrap the layout in
27
+ * their own flex container. The side menu is not pushed; only the card is.
28
+ */
29
+ pushDrawer?: ReactNode;
30
+ /** Main scrollable content. */
31
+ children?: ReactNode;
32
+ /** Sets a data-testid attribute for automated testing. */
33
+ testId?: string;
34
+ /**
35
+ * Called whenever the internal scroll state changes (no-scroll → at-top →
36
+ * middle → at-bottom)
37
+ */
38
+ onScrollStateChange?: (detail: GoabWorkspaceLayoutOnScrollStateChangeDetail) => void;
39
+ }
40
+ export declare function GoabWorkspaceLayout({ sideMenu, pageHeader, pageFooter, pushDrawer, children, testId, onScrollStateChange, ...rest }: GoabWorkspaceLayoutProps): JSX.Element;
41
+ export default GoabWorkspaceLayout;
42
+ export { useGoabWorkspaceLayoutScrollState, type GoabWorkspaceLayoutScrollStateValue, } from './workspace-layout-scroll-state';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/react-components",
3
- "version": "7.2.0-dev.4",
3
+ "version": "7.2.0-dev.40",
4
4
  "description": "Government of Alberta - UI components for React",
5
5
  "bugs": {
6
6
  "url": "https://github.com/GovAlta/ui-components/issues"