@xyo-network/react-appbar 2.25.48 → 2.25.49
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/components/AppBar/Application.d.ts +4 -3
- package/dist/cjs/components/AppBar/Application.js +2 -1
- package/dist/cjs/components/AppBar/Application.js.map +1 -1
- package/dist/docs.json +4284 -4229
- package/dist/esm/components/AppBar/Application.d.ts +4 -3
- package/dist/esm/components/AppBar/Application.js +3 -2
- package/dist/esm/components/AppBar/Application.js.map +1 -1
- package/package.json +7 -7
- package/src/components/AppBar/Application.tsx +12 -13
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { ToolbarProps } from '@mui/material';
|
|
2
|
+
import { AppBarExProps } from '@xylabs/react-common';
|
|
3
|
+
import { ReactElement } from 'react';
|
|
4
|
+
export interface ApplicationAppBarProps extends AppBarExProps {
|
|
4
5
|
contextToolbar?: ReactElement<ToolbarProps>;
|
|
5
6
|
systemToolbar?: ReactElement<ToolbarProps>;
|
|
6
7
|
responsive?: boolean;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Toolbar, useMediaQuery, useTheme } from '@mui/material';
|
|
3
|
+
import { AppBarEx } from '@xylabs/react-common';
|
|
3
4
|
import { FlexGrowRow, FlexRow } from '@xylabs/react-flexbox';
|
|
4
5
|
import { ContextToolbar, SystemToolbar } from '../Toolbar';
|
|
5
6
|
export const ApplicationAppBar = ({ systemToolbar, contextToolbar, children, responsive = true, ...props }) => {
|
|
6
7
|
const { breakpoints } = useTheme();
|
|
7
8
|
const belowSm = useMediaQuery(breakpoints.down('sm'));
|
|
8
|
-
return (
|
|
9
|
+
return (_jsxs(AppBarEx, { position: "sticky", ...props, children: [_jsxs(FlexRow, { flexWrap: "nowrap", justifyContent: "flex-start", children: [contextToolbar ?? _jsx(ContextToolbar, { version: true }), _jsx(FlexGrowRow, { children: belowSm && responsive ? null : children }), systemToolbar ?? _jsx(SystemToolbar, {})] }), belowSm && children && responsive ? _jsx(Toolbar, { children: children }) : null] }));
|
|
9
10
|
};
|
|
10
11
|
//# sourceMappingURL=Application.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Application.js","sourceRoot":"","sources":["../../../../src/components/AppBar/Application.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Application.js","sourceRoot":"","sources":["../../../../src/components/AppBar/Application.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAgB,aAAa,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,EAAE,QAAQ,EAAiB,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAG5D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAQ1D,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC9I,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,CAAA;IAClC,MAAM,OAAO,GAAG,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;IACrD,OAAO,CACL,MAAC,QAAQ,IAAC,QAAQ,EAAC,QAAQ,KAAK,KAAK,aACnC,MAAC,OAAO,IAAC,QAAQ,EAAC,QAAQ,EAAC,cAAc,EAAC,YAAY,aACnD,cAAc,IAAI,KAAC,cAAc,IAAC,OAAO,SAAG,EAC7C,KAAC,WAAW,cAAE,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,GAAe,EACnE,aAAa,IAAI,KAAC,aAAa,KAAG,IAC3B,EACT,OAAO,IAAI,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,KAAC,OAAO,cAAE,QAAQ,GAAW,CAAC,CAAC,CAAC,IAAI,IAChE,CACZ,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"@xylabs/react-flexbox": "^2.12.20",
|
|
20
20
|
"@xylabs/react-shared": "^2.12.20",
|
|
21
21
|
"@xyo-network/core": "^2.20.44",
|
|
22
|
-
"@xyo-network/react-archive": "^2.25.
|
|
23
|
-
"@xyo-network/react-archivist-api": "^2.25.
|
|
24
|
-
"@xyo-network/react-auth": "^2.25.
|
|
25
|
-
"@xyo-network/react-network": "^2.25.
|
|
26
|
-
"@xyo-network/react-shared": "^2.25.
|
|
27
|
-
"@xyo-network/react-theme": "^2.25.
|
|
22
|
+
"@xyo-network/react-archive": "^2.25.49",
|
|
23
|
+
"@xyo-network/react-archivist-api": "^2.25.49",
|
|
24
|
+
"@xyo-network/react-auth": "^2.25.49",
|
|
25
|
+
"@xyo-network/react-network": "^2.25.49",
|
|
26
|
+
"@xyo-network/react-shared": "^2.25.49",
|
|
27
|
+
"@xyo-network/react-theme": "^2.25.49",
|
|
28
28
|
"lodash": "^4.17.21",
|
|
29
29
|
"react": "^18.1.0",
|
|
30
30
|
"react-dom": "^18.1.0",
|
|
@@ -107,6 +107,6 @@
|
|
|
107
107
|
},
|
|
108
108
|
"sideEffects": false,
|
|
109
109
|
"types": "dist/esm/index.d.ts",
|
|
110
|
-
"version": "2.25.
|
|
110
|
+
"version": "2.25.49",
|
|
111
111
|
"packageManager": "yarn@3.1.1"
|
|
112
112
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Toolbar, ToolbarProps, useMediaQuery, useTheme } from '@mui/material'
|
|
2
|
+
import { AppBarEx, AppBarExProps } from '@xylabs/react-common'
|
|
2
3
|
import { FlexGrowRow, FlexRow } from '@xylabs/react-flexbox'
|
|
3
|
-
import
|
|
4
|
+
import { ReactElement } from 'react'
|
|
4
5
|
|
|
5
6
|
import { ContextToolbar, SystemToolbar } from '../Toolbar'
|
|
6
7
|
|
|
7
|
-
export interface ApplicationAppBarProps extends
|
|
8
|
+
export interface ApplicationAppBarProps extends AppBarExProps {
|
|
8
9
|
contextToolbar?: ReactElement<ToolbarProps>
|
|
9
10
|
systemToolbar?: ReactElement<ToolbarProps>
|
|
10
11
|
responsive?: boolean
|
|
@@ -14,15 +15,13 @@ export const ApplicationAppBar: React.FC<ApplicationAppBarProps> = ({ systemTool
|
|
|
14
15
|
const { breakpoints } = useTheme()
|
|
15
16
|
const belowSm = useMediaQuery(breakpoints.down('sm'))
|
|
16
17
|
return (
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</Container>
|
|
26
|
-
</AppBar>
|
|
18
|
+
<AppBarEx position="sticky" {...props}>
|
|
19
|
+
<FlexRow flexWrap="nowrap" justifyContent="flex-start">
|
|
20
|
+
{contextToolbar ?? <ContextToolbar version />}
|
|
21
|
+
<FlexGrowRow>{belowSm && responsive ? null : children}</FlexGrowRow>
|
|
22
|
+
{systemToolbar ?? <SystemToolbar />}
|
|
23
|
+
</FlexRow>
|
|
24
|
+
{belowSm && children && responsive ? <Toolbar>{children}</Toolbar> : null}
|
|
25
|
+
</AppBarEx>
|
|
27
26
|
)
|
|
28
27
|
}
|