@australiangreens/ag-internal-components 0.0.70 → 0.0.72
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/.gitignore +0 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +205 -190
- package/dist/esm/index.js.map +1 -1
- package/dist/layouts/AppLayout/AppLayout.d.ts.map +1 -1
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts +10 -5
- package/dist/layouts/AppLayout/NavBar/NavBar.d.ts.map +1 -1
- package/dist/layouts/AppLayout/TopBar.d.ts +8 -2
- package/dist/layouts/AppLayout/TopBar.d.ts.map +1 -1
- package/dist/layouts/AppLayout/stateAtoms.d.ts +3 -0
- package/dist/layouts/AppLayout/stateAtoms.d.ts.map +1 -1
- package/package.json +20 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppLayout.d.ts","sourceRoot":"","sources":["../../../src/layouts/AppLayout/AppLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1D,OAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,aAAa,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"AppLayout.d.ts","sourceRoot":"","sources":["../../../src/layouts/AppLayout/AppLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI1D,OAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAY5C,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,eA+ChB"}
|
|
@@ -9,11 +9,13 @@ export interface NavBarProps {
|
|
|
9
9
|
/** Set the datatest-id on the root element for using reactdom's getByTestId()
|
|
10
10
|
* function */
|
|
11
11
|
'data-testid'?: string;
|
|
12
|
-
/** The contents to be displayed at the top,
|
|
12
|
+
/** The contents to be displayed at the top, intended to be specific to the
|
|
13
|
+
* current page */
|
|
13
14
|
top?: ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* be
|
|
16
|
-
*
|
|
15
|
+
/**
|
|
16
|
+
* Display be below the top section, intended to always be the same,
|
|
17
|
+
* regardless of the current route. Can be provided either as a node directly,
|
|
18
|
+
* or an array of objects that will be used to generate a standard navbar menu.
|
|
17
19
|
*
|
|
18
20
|
* @example
|
|
19
21
|
*
|
|
@@ -37,7 +39,10 @@ export interface NavBarProps {
|
|
|
37
39
|
user?: User;
|
|
38
40
|
/** Displayed below the user information when available */
|
|
39
41
|
domainCode?: DomainCode;
|
|
40
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* The contents to be displayed at the bottom, intended to always be the
|
|
44
|
+
* same, regardless of current route.
|
|
45
|
+
*/
|
|
41
46
|
bottom?: ReactNode;
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/layouts/AppLayout/NavBar/NavBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMjD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE3C,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
|
|
1
|
+
{"version":3,"file":"NavBar.d.ts","sourceRoot":"","sources":["../../../../src/layouts/AppLayout/NavBar/NavBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMjD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE3C,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;sBACkB;IAClB,GAAG,CAAC,EAAE,SAAS,CAAC;IAEhB;;;;;;;;;;;;;;;;;;;;;OAqBG;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;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,IAAI,EACJ,WAAW,EACX,SAAS,EACT,aAAa,EAAE,UAAU,EACzB,GAAG,EACH,MAAM,EACN,MAAM,EACN,IAAI,EACJ,UAAU,GACX,EAAE,WAAW,eA0Cb"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export interface TopBarProps {
|
|
3
3
|
titleText?: string;
|
|
4
|
+
/**
|
|
5
|
+
* The contents to be displayed to the right of the titleText, left aligned to
|
|
6
|
+
* the starting position of the navbar. There is no right content, so at the
|
|
7
|
+
* moment it fills up the remaining space
|
|
8
|
+
*/
|
|
9
|
+
middle?: ReactNode;
|
|
4
10
|
height: number;
|
|
5
11
|
'data-testid'?: string;
|
|
6
12
|
}
|
|
@@ -12,5 +18,5 @@ export declare const classes: {
|
|
|
12
18
|
* the scroll bar will not appear for the whole page, instead just the page
|
|
13
19
|
* content
|
|
14
20
|
*/
|
|
15
|
-
export default function TopBar({ titleText, height, 'data-testid': dataTestId }: TopBarProps): JSX.Element;
|
|
21
|
+
export default function TopBar({ titleText, height, 'data-testid': dataTestId, middle, }: TopBarProps): JSX.Element;
|
|
16
22
|
//# sourceMappingURL=TopBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../../../src/layouts/AppLayout/TopBar.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../../../src/layouts/AppLayout/TopBar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlC,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,SAAc,EACd,MAAM,EACN,aAAa,EAAE,UAAU,EACzB,MAAM,GACP,EAAE,WAAW,eAmCb"}
|
|
@@ -11,6 +11,9 @@ export declare const navBarWidthClosedAtom: import("jotai").PrimitiveAtom<number
|
|
|
11
11
|
export declare const titleTextAtom: import("jotai").PrimitiveAtom<string> & {
|
|
12
12
|
init: string;
|
|
13
13
|
};
|
|
14
|
+
export declare const topBarMiddleAtom: import("jotai").PrimitiveAtom<ReactNode> & {
|
|
15
|
+
init: ReactNode;
|
|
16
|
+
};
|
|
14
17
|
export declare const topBarHeightAtom: import("jotai").PrimitiveAtom<number> & {
|
|
15
18
|
init: number;
|
|
16
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stateAtoms.d.ts","sourceRoot":"","sources":["../../../src/layouts/AppLayout/stateAtoms.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stateAtoms.d.ts","sourceRoot":"","sources":["../../../src/layouts/AppLayout/stateAtoms.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQlC,eAAO,MAAM,cAAc;;CAAa,CAAC;AAEzC,eAAO,MAAM,mBAAmB;;CAAmC,CAAC;AAEpE,eAAO,MAAM,qBAAqB;;CAAqC,CAAC;AAExE,eAAO,MAAM,aAAa;;CAAW,CAAC;AAEtC,eAAO,MAAM,gBAAgB;;CAA6B,CAAC;AAE3D,eAAO,MAAM,gBAAgB;;CAA+B,CAAC;AAG7D,eAAO,MAAM,aAAa;;CAA6B,CAAC"}
|
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.72",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/australiangreens/ag-internal-components#readme",
|
|
7
7
|
"license": "MIT",
|
|
@@ -10,25 +10,6 @@
|
|
|
10
10
|
"contributors": [
|
|
11
11
|
"Anthony Blond <anthony@unfinishedteleporter.com>"
|
|
12
12
|
],
|
|
13
|
-
"scripts": {
|
|
14
|
-
"dev": "vite",
|
|
15
|
-
"build": "vite build && sh ./scripts/post-build.sh",
|
|
16
|
-
"preview": "vite preview",
|
|
17
|
-
"eslint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
|
|
18
|
-
"test": "vitest run",
|
|
19
|
-
"test:coverage": "vitest run --coverage",
|
|
20
|
-
"test:watch": "vitest",
|
|
21
|
-
"### LIFECYCLE SCRIPTS ###": "",
|
|
22
|
-
"prepare": "husky install",
|
|
23
|
-
"prepublishOnly": "pnpm eslint && pnpm test && pnpm build",
|
|
24
|
-
"### HUSKY GIT HOOKS ###": "Called by husky pre-commit and pre-push scripts",
|
|
25
|
-
"prepush": "sh ./scripts/githooks/pre-push.sh",
|
|
26
|
-
"precommit": "sh ./scripts/githooks/pre-commit.sh",
|
|
27
|
-
"commitmsg": "sh ./scripts/githooks/commit-msg.sh",
|
|
28
|
-
"storybook": "storybook dev -p 6006",
|
|
29
|
-
"storybook:no": "storybook dev -p 6006 --no-open",
|
|
30
|
-
"build-storybook": "storybook build"
|
|
31
|
-
},
|
|
32
13
|
"files": [
|
|
33
14
|
"dist/*"
|
|
34
15
|
],
|
|
@@ -100,7 +81,7 @@
|
|
|
100
81
|
"eslint-plugin-storybook": "^0.6.12",
|
|
101
82
|
"eslint-plugin-testing-library": "^5.11.0",
|
|
102
83
|
"eslint-plugin-tsdoc": "^0.2.17",
|
|
103
|
-
"happy-dom": "^
|
|
84
|
+
"happy-dom": "^12.0.1",
|
|
104
85
|
"husky": "^8.0.3",
|
|
105
86
|
"lint-staged": "^13.2.2",
|
|
106
87
|
"prettier": "^2.8.8",
|
|
@@ -132,5 +113,22 @@
|
|
|
132
113
|
},
|
|
133
114
|
"engines": {
|
|
134
115
|
"node": ">=16.14.0"
|
|
116
|
+
},
|
|
117
|
+
"scripts": {
|
|
118
|
+
"dev": "vite",
|
|
119
|
+
"build": "vite build && sh ./scripts/post-build.sh",
|
|
120
|
+
"preview": "vite preview",
|
|
121
|
+
"eslint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
|
|
122
|
+
"test": "vitest run",
|
|
123
|
+
"test:coverage": "vitest run --coverage",
|
|
124
|
+
"test:watch": "vitest",
|
|
125
|
+
"### LIFECYCLE SCRIPTS ###": "",
|
|
126
|
+
"### HUSKY GIT HOOKS ###": "Called by husky pre-commit and pre-push scripts",
|
|
127
|
+
"prepush": "sh ./scripts/githooks/pre-push.sh",
|
|
128
|
+
"precommit": "sh ./scripts/githooks/pre-commit.sh",
|
|
129
|
+
"commitmsg": "sh ./scripts/githooks/commit-msg.sh",
|
|
130
|
+
"storybook": "storybook dev -p 6006",
|
|
131
|
+
"storybook:no": "storybook dev -p 6006 --no-open",
|
|
132
|
+
"build-storybook": "storybook build"
|
|
135
133
|
}
|
|
136
|
-
}
|
|
134
|
+
}
|