@australiangreens/ag-internal-components 0.0.44 → 0.0.46
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/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/domainCode/DomainCodeDialog.d.ts.map +1 -1
- package/dist/esm/index.js +489 -454
- package/dist/esm/index.js.map +1 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts +8 -3
- package/dist/layouts/AppLayout/AppLayout.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts +7 -4
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts +19 -0
- package/dist/layouts/AppLayout/NavBar/UserInfo.d.ts.map +1 -0
- package/dist/layouts/AppLayout/NavBar/types.d.ts +5 -0
- package/dist/layouts/AppLayout/NavBar/types.d.ts.map +1 -1
- package/dist/providers/Atom/AtomProvider.d.ts +4 -1
- package/dist/providers/Atom/AtomProvider.d.ts.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/simpleHashCode.d.ts +2 -0
- package/dist/utils/simpleHashCode.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { NavBarLink } from './types';
|
|
2
|
+
import { NavBarLink, User } from './types';
|
|
3
|
+
import { DomainCode } from '../../../domainCode';
|
|
3
4
|
export interface NavBarProps {
|
|
4
5
|
open: boolean;
|
|
5
6
|
offsetTop?: number;
|
|
@@ -32,13 +33,15 @@ export interface NavBarProps {
|
|
|
32
33
|
* ```
|
|
33
34
|
*/
|
|
34
35
|
middle: ReactNode | NavBarLink[];
|
|
35
|
-
/**
|
|
36
|
-
|
|
36
|
+
/** User information displayed at bottom of navabar when it is open*/
|
|
37
|
+
user?: User;
|
|
38
|
+
/** Displayed below the user information when available */
|
|
39
|
+
domainCode?: DomainCode;
|
|
37
40
|
}
|
|
38
41
|
/**
|
|
39
42
|
* A styled navigation bar. At this point in time its pretty unopinionated, it
|
|
40
43
|
* just renders whatever children it is given. The NavBarLightStyledList
|
|
41
44
|
* component can be used for consistent styling against the background.
|
|
42
45
|
*/
|
|
43
|
-
export default function NavBar({ open, offsetTop, widthOpen, widthClosed, 'data-testid': dataTestId, top, middle,
|
|
46
|
+
export default function NavBar({ open, offsetTop, widthOpen, widthClosed, 'data-testid': dataTestId, top, middle, user, domainCode, }: NavBarProps): JSX.Element;
|
|
44
47
|
//# 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,MAAM,SAAS,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;CACzB;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,IAAI,EACJ,UAAU,GACX,EAAE,WAAW,eA4Bb"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DomainCode } from '../../../domainCode';
|
|
2
|
+
import { User } from './types';
|
|
3
|
+
export interface UserInfoProps {
|
|
4
|
+
user?: User;
|
|
5
|
+
domainCode?: DomainCode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* If user has a defined name and a valid url for picture, the picture will for
|
|
9
|
+
* the avatar image.
|
|
10
|
+
*
|
|
11
|
+
* If there is a defined name but the picture is invalid or undefined, the
|
|
12
|
+
* intials will be used to generate the avatar image. The colour will be random
|
|
13
|
+
* for different names, but always the same for the same name.
|
|
14
|
+
*
|
|
15
|
+
* If user is undefined or the name is undefined, a generic empty avatar image
|
|
16
|
+
* will be displayed.
|
|
17
|
+
*/
|
|
18
|
+
export default function UserInfo({ user, domainCode }: UserInfoProps): JSX.Element;
|
|
19
|
+
//# sourceMappingURL=UserInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAmB/B,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,aAAa,eAgCnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/AppLayout/NavBar/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;CAElB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/layouts/AppLayout/NavBar/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;CAElB;AAED,MAAM,WAAW,IAAI;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createStore } from 'jotai';
|
|
1
|
+
import { createStore, useAtom, useAtomValue, useSetAtom } from 'jotai';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
export declare const atomStore: {
|
|
4
4
|
get: <Value>(atom: import("jotai").Atom<Value>) => Value;
|
|
@@ -96,4 +96,7 @@ export declare const AtomProvider: ({ children, store, }: PropsWithChildren<{
|
|
|
96
96
|
dev_restore_atoms?: undefined;
|
|
97
97
|
} | undefined;
|
|
98
98
|
}>) => JSX.Element;
|
|
99
|
+
export declare const useLibraryAtom: typeof useAtom;
|
|
100
|
+
export declare const useSetLibraryAtom: typeof useSetAtom;
|
|
101
|
+
export declare const useLibraryAtomValue: typeof useAtomValue;
|
|
99
102
|
//# sourceMappingURL=AtomProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AtomProvider.d.ts","sourceRoot":"","sources":["../../../../src/providers/Atom/AtomProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AtomProvider.d.ts","sourceRoot":"","sources":["../../../../src/providers/Atom/AtomProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAmB,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAoB,CAAC;AAE3C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAKxB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,OAAO,OAClB,CAAC;AAEnB,eAAO,MAAM,iBAAiB,EAAE,OAAO,UAEf,CAAC;AAEzB,eAAO,MAAM,mBAAmB,EAAE,OAAO,YAER,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simpleHashCode.d.ts","sourceRoot":"","sources":["../../../src/utils/simpleHashCode.ts"],"names":[],"mappings":"AACA,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,UAQzC"}
|
package/package.json
CHANGED