@australiangreens/ag-internal-components 0.0.50 → 0.0.52
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/dist/DevDemo/DevDemo.d.ts.map +1 -1
- package/dist/DevDemo/DomainCodeDemo.d.ts.map +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/AgDialog/AgDialog.d.ts +24 -0
- package/dist/components/AgDialog/AgDialog.d.ts.map +1 -0
- package/dist/components/AgDialog/index.d.ts +2 -23
- package/dist/components/AgDialog/index.d.ts.map +1 -1
- package/dist/components/ExampleComponent/ExampleComponent.comp.test.d.ts +2 -0
- package/dist/components/ExampleComponent/ExampleComponent.comp.test.d.ts.map +1 -0
- package/dist/components/ExampleComponent/ExampleComponent.d.ts +6 -0
- package/dist/components/ExampleComponent/ExampleComponent.d.ts.map +1 -0
- package/dist/components/ExampleComponent/{index.stories.d.ts → ExampleComponent.stories.d.ts} +1 -1
- package/dist/components/ExampleComponent/ExampleComponent.stories.d.ts.map +1 -0
- package/dist/components/ExampleComponent/index.d.ts +2 -5
- package/dist/components/ExampleComponent/index.d.ts.map +1 -1
- package/dist/components/NavBar/NavBar.comp.test.d.ts +2 -0
- package/dist/components/NavBar/NavBar.comp.test.d.ts.map +1 -0
- package/dist/components/NavBar/NavBar.d.ts +22 -0
- package/dist/components/NavBar/NavBar.d.ts.map +1 -0
- package/dist/components/NavBar/index.d.ts +2 -16
- package/dist/components/NavBar/index.d.ts.map +1 -1
- package/dist/esm/index.js +613 -623
- package/dist/esm/index.js.map +1 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts +3 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts +3 -1
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.d.ts +1 -5
- package/dist/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts +7 -1
- package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts.map +1 -1
- package/dist/layouts/AppLayout/index.d.ts.map +1 -1
- package/dist/layouts/PageLayout/PageLayout.comp.test.d.ts +2 -0
- package/dist/layouts/PageLayout/PageLayout.comp.test.d.ts.map +1 -0
- package/dist/layouts/PageLayout/PageLayout.d.ts +60 -0
- package/dist/layouts/PageLayout/PageLayout.d.ts.map +1 -0
- package/dist/layouts/PageLayout/index.d.ts +2 -59
- package/dist/layouts/PageLayout/index.d.ts.map +1 -1
- package/dist/layouts/PageLayout/index.stories.d.ts +4 -4
- package/package.json +8 -5
- package/dist/components/ExampleComponent/index.comp.test.d.ts +0 -2
- package/dist/components/ExampleComponent/index.comp.test.d.ts.map +0 -1
- package/dist/components/ExampleComponent/index.stories.d.ts.map +0 -1
- package/dist/components/NavBar/index.comp.test.d.ts +0 -2
- package/dist/components/NavBar/index.comp.test.d.ts.map +0 -1
- package/dist/layouts/PageLayout/index.comp.test.d.ts +0 -2
- package/dist/layouts/PageLayout/index.comp.test.d.ts.map +0 -1
|
@@ -5,6 +5,8 @@ export interface BaseAppLayoutProps {
|
|
|
5
5
|
/** Either an array of objects used to automatically generate the content of
|
|
6
6
|
* the navbar (WIP), or a node to render directly.*/
|
|
7
7
|
navBarMiddle: NavBarProps['middle'];
|
|
8
|
+
/** A node to render directly.*/
|
|
9
|
+
navBarBottom: NavBarProps['bottom'];
|
|
8
10
|
/**
|
|
9
11
|
* The initial titleText. Shortcut for calling a setter from useAppLayout()
|
|
10
12
|
* hook since its such a common action.
|
|
@@ -32,6 +34,6 @@ export interface BaseAppLayoutProps {
|
|
|
32
34
|
domainCode?: NavBarProps['domainCode'];
|
|
33
35
|
}
|
|
34
36
|
type AppLayoutProps = PropsWithChildren<BaseAppLayoutProps>;
|
|
35
|
-
export default function AppLayout({ children, initialTitleText, initialNavBarOpen, pageContainerProps, pageContentDataTestId, topBarDataTestId, navBarDataTestId, navBarMiddle, user, domainCode, }: AppLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export default function AppLayout({ children, initialTitleText, initialNavBarOpen, pageContainerProps, pageContentDataTestId, topBarDataTestId, navBarDataTestId, navBarMiddle, navBarBottom, user, domainCode, }: AppLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
36
38
|
export {};
|
|
37
39
|
//# sourceMappingURL=AppLayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLayout.d.ts","sourceRoot":"","sources":["../../../src/layouts/AppLayout/AppLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAGrE,OAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAW5C,MAAM,WAAW,kBAAkB;IACjC;wDACoD;IACpD,YAAY,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEpC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;mBACe;IACf,kBAAkB,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC;IAE1D,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,yDAAyD;IACzD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;mCAC+B;IAC/B,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAE3B,oCAAoC;IACpC,UAAU,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CACxC;AAED,KAAK,cAAc,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,IAAI,EACJ,UAAU,GACX,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"AppLayout.d.ts","sourceRoot":"","sources":["../../../src/layouts/AppLayout/AppLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAGrE,OAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAW5C,MAAM,WAAW,kBAAkB;IACjC;wDACoD;IACpD,YAAY,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEpC,gCAAgC;IAChC,YAAY,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEpC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;mBACe;IACf,kBAAkB,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC;IAE1D,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,yDAAyD;IACzD,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;mCAC+B;IAC/B,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAE3B,oCAAoC;IACpC,UAAU,CAAC,EAAE,WAAW,CAAC,YAAY,CAAC,CAAC;CACxC;AAED,KAAK,cAAc,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,QAAQ,EACR,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,UAAU,GACX,EAAE,cAAc,2CAkDhB"}
|
|
@@ -37,11 +37,13 @@ export interface NavBarProps {
|
|
|
37
37
|
user?: User;
|
|
38
38
|
/** Displayed below the user information when available */
|
|
39
39
|
domainCode?: DomainCode;
|
|
40
|
+
/** The contents to be displayed at the bottom, specified to the current page */
|
|
41
|
+
bottom?: ReactNode;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
44
|
* A styled navigation bar. At this point in time its pretty unopinionated, it
|
|
43
45
|
* just renders whatever children it is given. The NavBarLightStyledList
|
|
44
46
|
* component can be used for consistent styling against the background.
|
|
45
47
|
*/
|
|
46
|
-
export default function NavBar({ open, offsetTop, widthOpen, widthClosed, 'data-testid': dataTestId, top, middle, user, domainCode, }: NavBarProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
export default function NavBar({ open, offsetTop, widthOpen, widthClosed, 'data-testid': dataTestId, top, middle, bottom, user, domainCode, }: NavBarProps): import("react/jsx-runtime").JSX.Element;
|
|
47
49
|
//# sourceMappingURL=NavBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/layouts/AppLayout/NavBar/NavBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/layouts/AppLayout/NavBar/NavBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAG3C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,OAAO,CAAC;IAEd,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,EAAE,MAAM,CAAC;IAElB,WAAW,EAAE,MAAM,CAAC;IAEpB;kBACc;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,6EAA6E;IAC7E,GAAG,CAAC,EAAE,SAAS,CAAC;IAEhB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,EAAE,SAAS,GAAG,UAAU,EAAE,CAAC;IAEjC,qEAAqE;IACrE,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ,0DAA0D;IAC1D,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,gFAAgF;IAChF,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,IAAI,EACJ,SAAa,EACb,SAAS,EACT,WAAW,EACX,aAAa,EAAE,UAAU,EACzB,GAAG,EACH,MAAM,EACN,MAAM,EACN,IAAI,EACJ,UAAU,GACX,EAAE,WAAW,2CAyCb"}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
navBarOpen: boolean;
|
|
3
|
-
}
|
|
4
|
-
export default function SettingsEtcPlaceholder({ navBarOpen }: SettingsEtcPlaceholderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export {};
|
|
1
|
+
export default function SettingsEtcPlaceholder(): import("react/jsx-runtime").JSX.Element;
|
|
6
2
|
//# sourceMappingURL=SettingsEtcPlaceholder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SettingsEtcPlaceholder.d.ts","sourceRoot":"","sources":["../../../../src/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SettingsEtcPlaceholder.d.ts","sourceRoot":"","sources":["../../../../src/layouts/AppLayout/NavBar/SettingsEtcPlaceholder.tsx"],"names":[],"mappings":"AAWA,MAAM,CAAC,OAAO,UAAU,sBAAsB,4CA4D7C"}
|
|
@@ -4,6 +4,8 @@ export interface UserInfoProps {
|
|
|
4
4
|
user?: User;
|
|
5
5
|
domainCode?: DomainCode;
|
|
6
6
|
open: boolean;
|
|
7
|
+
navBarWidthClosed: number;
|
|
8
|
+
navBarWidthOpen: number;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* If user has a defined name and a valid url for picture, the picture will for
|
|
@@ -15,6 +17,10 @@ export interface UserInfoProps {
|
|
|
15
17
|
*
|
|
16
18
|
* If user is undefined or the name is undefined, a generic empty avatar image
|
|
17
19
|
* will be displayed.
|
|
20
|
+
*
|
|
21
|
+
* ! navBarWidthClosed and navBarWidthOpen are needed to size the avatar
|
|
22
|
+
* ! correctly. Specifying css in Styling.tsx might
|
|
23
|
+
* ! be a better approach. See [EVNT-59]
|
|
18
24
|
*/
|
|
19
|
-
export default function UserInfo({ user, domainCode, open }: UserInfoProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default function UserInfo({ user, domainCode, open, navBarWidthClosed, navBarWidthOpen, }: UserInfoProps): import("react/jsx-runtime").JSX.Element;
|
|
20
26
|
//# sourceMappingURL=UserInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserInfo.d.ts","sourceRoot":"","sources":["../../../../src/layouts/AppLayout/NavBar/UserInfo.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UserInfo.d.ts","sourceRoot":"","sources":["../../../../src/layouts/AppLayout/NavBar/UserInfo.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAc/B,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAC/B,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,iBAAiB,EACjB,eAAe,GAChB,EAAE,aAAa,2CAoEf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/AppLayout/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/AppLayout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout.comp.test.d.ts","sourceRoot":"","sources":["../../../src/layouts/PageLayout/PageLayout.comp.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ComponentProps, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import PageContainer from './PageContainer';
|
|
3
|
+
export interface SidePanelProps {
|
|
4
|
+
titleText?: string;
|
|
5
|
+
content?: ReactNode;
|
|
6
|
+
flavour?: 'push' | 'overlay';
|
|
7
|
+
arrowButtons?: 'open' | 'close' | 'both' | 'none';
|
|
8
|
+
width?: number;
|
|
9
|
+
startOpen?: boolean;
|
|
10
|
+
/** Use this and onChangeOpen if you want to use component as a controlled component */
|
|
11
|
+
open?: boolean;
|
|
12
|
+
onChangeOpen?: (open: boolean) => void;
|
|
13
|
+
/** Called when the sliding transition to open has finished */
|
|
14
|
+
onOpened?: () => void;
|
|
15
|
+
/** Called when the sliding transition to open has finished */
|
|
16
|
+
onClosed?: () => void;
|
|
17
|
+
dataTestId?: string;
|
|
18
|
+
}
|
|
19
|
+
interface BasePageLayoutProps {
|
|
20
|
+
titleText?: string;
|
|
21
|
+
leftPanel?: SidePanelProps;
|
|
22
|
+
rightPanel?: SidePanelProps;
|
|
23
|
+
/** This will only have an effect for panels whose state is not controlled by
|
|
24
|
+
* parent */
|
|
25
|
+
sidePanelsAreMutuallyExclusive?: boolean;
|
|
26
|
+
/** Temporary, get rid of later */
|
|
27
|
+
debugOpacity?: boolean;
|
|
28
|
+
/** Props applied to the PageContainer component, which is a styled MUI Container */
|
|
29
|
+
pageContainerProps?: ComponentProps<typeof PageContainer>;
|
|
30
|
+
topBarDataTestId?: string;
|
|
31
|
+
pageContentDataTestId?: string;
|
|
32
|
+
}
|
|
33
|
+
interface PageLayoutWithNavBarProps extends BasePageLayoutProps {
|
|
34
|
+
/** Only used by side panels for alignment purposes */
|
|
35
|
+
navBarOpen: boolean;
|
|
36
|
+
/** Only used by side panels for alignment purposes */
|
|
37
|
+
navBarWidthOpen: number;
|
|
38
|
+
/** Only used by side panels for alignment purposes */
|
|
39
|
+
navBarWidthClosed: number;
|
|
40
|
+
}
|
|
41
|
+
interface PagelayoutWithoutNavBarProps extends BasePageLayoutProps {
|
|
42
|
+
navBarOpen?: never;
|
|
43
|
+
navBarWidthOpen?: never;
|
|
44
|
+
navBarWidthClosed?: never;
|
|
45
|
+
}
|
|
46
|
+
export type PageLayoutProps = PropsWithChildren<PageLayoutWithNavBarProps | PagelayoutWithoutNavBarProps>;
|
|
47
|
+
/**
|
|
48
|
+
* To be used by all Page components in our apps to use a standard Top Bar, Left
|
|
49
|
+
* Panel, Right Panel and Page Contents within the contents for a uniform look.
|
|
50
|
+
*
|
|
51
|
+
* At present it is somewhat crudely adapted from the code used in the
|
|
52
|
+
* ListManager app. It _assumes_ NavBar component on the left.
|
|
53
|
+
*
|
|
54
|
+
* It is in the process of being tidied up, and as such is very much in flux.
|
|
55
|
+
* The end goal is to unify the left most NavBar component with the PageLayout,
|
|
56
|
+
* but this has to be done incrementally.
|
|
57
|
+
*/
|
|
58
|
+
export default function PageLayout({ children, titleText, leftPanel, rightPanel, sidePanelsAreMutuallyExclusive, debugOpacity, pageContainerProps, pageContentDataTestId, topBarDataTestId, navBarOpen, navBarWidthOpen, navBarWidthClosed, }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=PageLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout.d.ts","sourceRoot":"","sources":["../../../src/layouts/PageLayout/PageLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAM1F,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAmB5C,MAAM,WAAW,cAAc;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,uFAAuF;IACvF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,mBAAmB;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B;gBACY;IACZ,8BAA8B,CAAC,EAAE,OAAO,CAAC;IAEzC,kCAAkC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,oFAAoF;IACpF,kBAAkB,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC;IAE1D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,UAAU,yBAA0B,SAAQ,mBAAmB;IAC7D,sDAAsD;IACtD,UAAU,EAAE,OAAO,CAAC;IACpB,sDAAsD;IACtD,eAAe,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,UAAU,4BAA6B,SAAQ,mBAAmB;IAChE,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,eAAe,CAAC,EAAE,KAAK,CAAC;IACxB,iBAAiB,CAAC,EAAE,KAAK,CAAC;CAC3B;AAED,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAC7C,yBAAyB,GAAG,4BAA4B,CACzD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,QAAQ,EACR,SAAc,EACd,SAAS,EACT,UAAU,EACV,8BAAqC,EACrC,YAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,iBAAiB,GAClB,EAAE,eAAe,2CAuLjB"}
|
|
@@ -1,60 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface SidePanelProps {
|
|
4
|
-
titleText?: string;
|
|
5
|
-
content?: ReactNode;
|
|
6
|
-
flavour?: 'push' | 'overlay';
|
|
7
|
-
arrowButtons?: 'open' | 'close' | 'both' | 'none';
|
|
8
|
-
width?: number;
|
|
9
|
-
startOpen?: boolean;
|
|
10
|
-
/** Use this and onChangeOpen if you want to use component as a controlled component */
|
|
11
|
-
open?: boolean;
|
|
12
|
-
onChangeOpen?: (open: boolean) => void;
|
|
13
|
-
/** Called when the sliding transition to open has finished */
|
|
14
|
-
onOpened?: () => void;
|
|
15
|
-
/** Called when the sliding transition to open has finished */
|
|
16
|
-
onClosed?: () => void;
|
|
17
|
-
dataTestId?: string;
|
|
18
|
-
}
|
|
19
|
-
interface BasePageLayoutProps {
|
|
20
|
-
titleText?: string;
|
|
21
|
-
leftPanel?: SidePanelProps;
|
|
22
|
-
rightPanel?: SidePanelProps;
|
|
23
|
-
/** This will only have an effect for panels whose state is not controlled by
|
|
24
|
-
* parent */
|
|
25
|
-
sidePanelsAreMutuallyExclusive?: boolean;
|
|
26
|
-
/** Temporary, get rid of later */
|
|
27
|
-
debugOpacity?: boolean;
|
|
28
|
-
/** Props applied to the PageContainer component, which is a styled MUI Container */
|
|
29
|
-
pageContainerProps?: ComponentProps<typeof PageContainer>;
|
|
30
|
-
topBarDataTestId?: string;
|
|
31
|
-
pageContentDataTestId?: string;
|
|
32
|
-
}
|
|
33
|
-
interface PageLayoutWithNavBarProps extends BasePageLayoutProps {
|
|
34
|
-
/** Only used by side panels for alignment purposes */
|
|
35
|
-
navBarOpen: boolean;
|
|
36
|
-
/** Only used by side panels for alignment purposes */
|
|
37
|
-
navBarWidthOpen: number;
|
|
38
|
-
/** Only used by side panels for alignment purposes */
|
|
39
|
-
navBarWidthClosed: number;
|
|
40
|
-
}
|
|
41
|
-
interface PagelayoutWithoutNavBarProps extends BasePageLayoutProps {
|
|
42
|
-
navBarOpen?: never;
|
|
43
|
-
navBarWidthOpen?: never;
|
|
44
|
-
navBarWidthClosed?: never;
|
|
45
|
-
}
|
|
46
|
-
export type PageLayoutProps = PropsWithChildren<PageLayoutWithNavBarProps | PagelayoutWithoutNavBarProps>;
|
|
47
|
-
/**
|
|
48
|
-
* To be used by all Page components in our apps to use a standard Top Bar, Left
|
|
49
|
-
* Panel, Right Panel and Page Contents within the contents for a uniform look.
|
|
50
|
-
*
|
|
51
|
-
* At present it is somewhat crudely adapted from the code used in the
|
|
52
|
-
* ListManager app. It _assumes_ NavBar component on the left.
|
|
53
|
-
*
|
|
54
|
-
* It is in the process of being tidied up, and as such is very much in flux.
|
|
55
|
-
* The end goal is to unify the left most NavBar component with the PageLayout,
|
|
56
|
-
* but this has to be done incrementally.
|
|
57
|
-
*/
|
|
58
|
-
export default function PageLayout({ children, titleText, leftPanel, rightPanel, sidePanelsAreMutuallyExclusive, debugOpacity, pageContainerProps, pageContentDataTestId, topBarDataTestId, navBarOpen, navBarWidthOpen, navBarWidthClosed, }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
-
export {};
|
|
1
|
+
export { default } from './PageLayout';
|
|
2
|
+
export * from './PageLayout';
|
|
60
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/PageLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/layouts/PageLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,cAAc,cAAc,CAAC"}
|
|
@@ -21,8 +21,8 @@ declare const meta: {
|
|
|
21
21
|
navBarWidthOpen: number;
|
|
22
22
|
navBarWidthClosed: number;
|
|
23
23
|
titleText?: string | undefined;
|
|
24
|
-
leftPanel?: import("
|
|
25
|
-
rightPanel?: import("
|
|
24
|
+
leftPanel?: import("./PageLayout").SidePanelProps | undefined;
|
|
25
|
+
rightPanel?: import("./PageLayout").SidePanelProps | undefined;
|
|
26
26
|
sidePanelsAreMutuallyExclusive?: boolean | undefined;
|
|
27
27
|
debugOpacity?: boolean | undefined;
|
|
28
28
|
pageContainerProps?: (Pick<{
|
|
@@ -43,8 +43,8 @@ declare const meta: {
|
|
|
43
43
|
navBarWidthOpen?: undefined;
|
|
44
44
|
navBarWidthClosed?: undefined;
|
|
45
45
|
titleText?: string | undefined;
|
|
46
|
-
leftPanel?: import("
|
|
47
|
-
rightPanel?: import("
|
|
46
|
+
leftPanel?: import("./PageLayout").SidePanelProps | undefined;
|
|
47
|
+
rightPanel?: import("./PageLayout").SidePanelProps | undefined;
|
|
48
48
|
sidePanelsAreMutuallyExclusive?: boolean | undefined;
|
|
49
49
|
debugOpacity?: boolean | undefined;
|
|
50
50
|
pageContainerProps?: (Pick<{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@australiangreens/ag-internal-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.52",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/australiangreens/ag-internal-components#readme",
|
|
7
7
|
"license": "MIT",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test:watch": "vitest",
|
|
21
21
|
"### LIFECYCLE SCRIPTS ###": "See https://yarnpkg.com/advanced/lifecycle-scripts",
|
|
22
22
|
"prepare": "husky install",
|
|
23
|
-
"prepublishOnly": "yarn
|
|
23
|
+
"prepublishOnly": "yarn build",
|
|
24
24
|
"### HUSKY GIT HOOKS ###": "Called by husky pre-commit and pre-push scripts",
|
|
25
25
|
"prepush": "sh ./scripts/githooks/pre-push.sh",
|
|
26
26
|
"precommit": "sh ./scripts/githooks/pre-commit.sh",
|
|
@@ -42,7 +42,9 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@australiangreens/ag-error": "^0.1.7",
|
|
44
44
|
"@australiangreens/ag-error-jest": "^0.1.9",
|
|
45
|
+
"@types/react-transition-group": "^4.4.6",
|
|
45
46
|
"jotai": "^2.3.1",
|
|
47
|
+
"react-transition-group": "^4.4.5",
|
|
46
48
|
"souvlaki": "^0.3.0"
|
|
47
49
|
},
|
|
48
50
|
"peerDependencies": {
|
|
@@ -54,8 +56,8 @@
|
|
|
54
56
|
"react-dom": "^18.2.0"
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|
|
57
|
-
"@emotion/react": "11.11.1",
|
|
58
|
-
"@emotion/styled": "11.11.0",
|
|
59
|
+
"@emotion/react": "^11.11.1",
|
|
60
|
+
"@emotion/styled": "^11.11.0",
|
|
59
61
|
"@mui/icons-material": "^5.14.3",
|
|
60
62
|
"@mui/material": "^5.14.5",
|
|
61
63
|
"@storybook/addon-essentials": "^7.0.26",
|
|
@@ -65,7 +67,7 @@
|
|
|
65
67
|
"@storybook/react": "^7.0.26",
|
|
66
68
|
"@storybook/react-vite": "^7.0.26",
|
|
67
69
|
"@storybook/testing-library": "^0.0.14-next.2",
|
|
68
|
-
"@testing-library/dom": "9.3.1",
|
|
70
|
+
"@testing-library/dom": "^9.3.1",
|
|
69
71
|
"@testing-library/jest-dom": "^6.0.0",
|
|
70
72
|
"@testing-library/react": "^14.0.0",
|
|
71
73
|
"@testing-library/user-event": "^14.4.3",
|
|
@@ -102,6 +104,7 @@
|
|
|
102
104
|
"typescript": "^5.0.2",
|
|
103
105
|
"vite": "^4.3.9",
|
|
104
106
|
"vite-plugin-dts": "^3.5.2",
|
|
107
|
+
"vite-plugin-linter": "^2.0.2",
|
|
105
108
|
"vite-tsconfig-paths": "^4.2.0",
|
|
106
109
|
"vitest": "^0.34.1"
|
|
107
110
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.comp.test.d.ts","sourceRoot":"","sources":["../../../src/components/ExampleComponent/index.comp.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ExampleComponent/index.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,gBAAgB,MAAM,GAAG,CAAC;AAGjC,QAAA,MAAM,IAAI;;;CAO+B,CAAC;AAE1C,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAIxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.comp.test.d.ts","sourceRoot":"","sources":["../../../src/components/NavBar/index.comp.test.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.comp.test.d.ts","sourceRoot":"","sources":["../../../src/layouts/PageLayout/index.comp.test.tsx"],"names":[],"mappings":""}
|