@availity/mui-page-header 0.1.6 → 0.2.0
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/CHANGELOG.md +28 -8
- package/dist/index.d.ts +2 -1
- package/dist/index.js +29 -12
- package/dist/index.mjs +29 -12
- package/package.json +12 -9
- package/src/lib/PageHeader.tsx +19 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,28 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.2.0](https://github.com/Availity/element/compare/@availity/mui-page-header@0.1.7...@availity/mui-page-header@0.2.0) (2023-11-21)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-feedback` updated to version `0.1.0`
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **mui-page-header:** add feedback ([c4ae9cf](https://github.com/Availity/element/commit/c4ae9cff82c163c72818f8d015e103f10869cdd0))
|
|
14
|
+
|
|
15
|
+
## [0.1.7](https://github.com/Availity/element/compare/@availity/mui-page-header@0.1.6...@availity/mui-page-header@0.1.7) (2023-11-16)
|
|
16
|
+
|
|
17
|
+
### Dependency Updates
|
|
18
|
+
|
|
19
|
+
- `mui-breadcrumbs` updated to version `0.1.9`
|
|
20
|
+
- `mui-button` updated to version `0.5.1`
|
|
21
|
+
- `mui-link` updated to version `0.2.4`
|
|
22
|
+
- `mui-typography` updated to version `0.1.5`
|
|
23
|
+
|
|
5
24
|
## [0.1.6](https://github.com/Availity/element/compare/@availity/mui-page-header@0.1.5...@availity/mui-page-header@0.1.6) (2023-11-08)
|
|
6
25
|
|
|
7
26
|
### Dependency Updates
|
|
8
27
|
|
|
9
|
-
|
|
28
|
+
- `mui-button` updated to version `0.5.0`
|
|
29
|
+
|
|
10
30
|
## [0.1.5](https://github.com/Availity/element/compare/@availity/mui-page-header@0.1.4...@availity/mui-page-header@0.1.5) (2023-11-08)
|
|
11
31
|
|
|
12
32
|
### Dependency Updates
|
|
13
33
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
34
|
+
- `mui-breadcrumbs` updated to version `0.1.8`
|
|
35
|
+
- `mui-button` updated to version `0.4.5`
|
|
36
|
+
- `mui-divider` updated to version `0.3.4`
|
|
37
|
+
- `mui-link` updated to version `0.2.3`
|
|
38
|
+
- `mui-typography` updated to version `0.1.4`
|
|
39
|
+
|
|
19
40
|
## [0.1.4](https://github.com/Availity/element/compare/@availity/mui-page-header@0.1.3...@availity/mui-page-header@0.1.4) (2023-11-07)
|
|
20
41
|
|
|
21
42
|
## [0.1.3](https://github.com/Availity/element/compare/@availity/mui-page-header@0.1.2...@availity/mui-page-header@0.1.3) (2023-10-25)
|
|
22
43
|
|
|
23
|
-
|
|
24
44
|
### Bug Fixes
|
|
25
45
|
|
|
26
|
-
|
|
46
|
+
- **mui-page-header:** add top and bottom margin ([12586f8](https://github.com/Availity/element/commit/12586f85c83b4527e28fc695f3598d805f8c9fe0))
|
|
27
47
|
|
|
28
48
|
## [0.1.2](https://github.com/Availity/element/compare/@availity/mui-page-header@0.1.1...@availity/mui-page-header@0.1.2) (2023-10-06)
|
|
29
49
|
|
package/dist/index.d.ts
CHANGED
|
@@ -7,9 +7,10 @@ interface ButtonsProps extends Omit<ButtonProps, 'size' | 'height' | 'color'> {
|
|
|
7
7
|
interface PageHeaderProps {
|
|
8
8
|
breadcrumbs: BreadcrumbsProps;
|
|
9
9
|
buttons?: ButtonsProps[];
|
|
10
|
+
feedback?: boolean;
|
|
10
11
|
headerText: string;
|
|
11
12
|
helpLink?: string;
|
|
12
13
|
}
|
|
13
|
-
declare const PageHeader: ({ breadcrumbs, buttons, headerText, helpLink }: PageHeaderProps) => JSX.Element;
|
|
14
|
+
declare const PageHeader: ({ breadcrumbs, buttons, feedback, headerText, helpLink, }: PageHeaderProps) => JSX.Element;
|
|
14
15
|
|
|
15
16
|
export { ButtonsProps, PageHeader, PageHeaderProps };
|
package/dist/index.js
CHANGED
|
@@ -31,8 +31,15 @@ var import_mui_typography = require("@availity/mui-typography");
|
|
|
31
31
|
var import_mui_breadcrumbs = require("@availity/mui-breadcrumbs");
|
|
32
32
|
var import_mui_link = require("@availity/mui-link");
|
|
33
33
|
var import_mui_button = require("@availity/mui-button");
|
|
34
|
+
var import_mui_feedback = require("@availity/mui-feedback");
|
|
34
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
-
var PageHeader = ({
|
|
36
|
+
var PageHeader = ({
|
|
37
|
+
breadcrumbs,
|
|
38
|
+
buttons,
|
|
39
|
+
feedback = false,
|
|
40
|
+
headerText,
|
|
41
|
+
helpLink
|
|
42
|
+
}) => {
|
|
36
43
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Grid, {
|
|
37
44
|
component: import_material.Container,
|
|
38
45
|
container: true,
|
|
@@ -85,20 +92,30 @@ var PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }) => {
|
|
|
85
92
|
children: headerText
|
|
86
93
|
})
|
|
87
94
|
}),
|
|
88
|
-
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Grid, {
|
|
89
96
|
item: true,
|
|
90
97
|
container: true,
|
|
91
98
|
width: "auto",
|
|
92
|
-
children:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
children: [
|
|
100
|
+
buttons && buttons.length > 0 && (buttons == null ? void 0 : buttons.map((buttonProps) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Grid, {
|
|
101
|
+
item: true,
|
|
102
|
+
marginLeft: 2,
|
|
103
|
+
height: "100%",
|
|
104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_button.Button, {
|
|
105
|
+
...buttonProps,
|
|
106
|
+
size: "large",
|
|
107
|
+
color: "secondary"
|
|
108
|
+
})
|
|
109
|
+
}))),
|
|
110
|
+
feedback ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Grid, {
|
|
111
|
+
item: true,
|
|
112
|
+
marginLeft: 2,
|
|
113
|
+
height: "100%",
|
|
114
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_feedback.Feedback, {
|
|
115
|
+
appName: headerText
|
|
116
|
+
})
|
|
117
|
+
}) : null
|
|
118
|
+
]
|
|
102
119
|
})
|
|
103
120
|
]
|
|
104
121
|
}),
|
package/dist/index.mjs
CHANGED
|
@@ -5,8 +5,15 @@ import { Typography } from "@availity/mui-typography";
|
|
|
5
5
|
import { Breadcrumbs } from "@availity/mui-breadcrumbs";
|
|
6
6
|
import { Link } from "@availity/mui-link";
|
|
7
7
|
import { Button } from "@availity/mui-button";
|
|
8
|
+
import { Feedback } from "@availity/mui-feedback";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
var PageHeader = ({
|
|
10
|
+
var PageHeader = ({
|
|
11
|
+
breadcrumbs,
|
|
12
|
+
buttons,
|
|
13
|
+
feedback = false,
|
|
14
|
+
headerText,
|
|
15
|
+
helpLink
|
|
16
|
+
}) => {
|
|
10
17
|
return /* @__PURE__ */ jsxs(Grid, {
|
|
11
18
|
component: Container,
|
|
12
19
|
container: true,
|
|
@@ -59,20 +66,30 @@ var PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }) => {
|
|
|
59
66
|
children: headerText
|
|
60
67
|
})
|
|
61
68
|
}),
|
|
62
|
-
|
|
69
|
+
/* @__PURE__ */ jsxs(Grid, {
|
|
63
70
|
item: true,
|
|
64
71
|
container: true,
|
|
65
72
|
width: "auto",
|
|
66
|
-
children:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
children: [
|
|
74
|
+
buttons && buttons.length > 0 && (buttons == null ? void 0 : buttons.map((buttonProps) => /* @__PURE__ */ jsx(Grid, {
|
|
75
|
+
item: true,
|
|
76
|
+
marginLeft: 2,
|
|
77
|
+
height: "100%",
|
|
78
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
79
|
+
...buttonProps,
|
|
80
|
+
size: "large",
|
|
81
|
+
color: "secondary"
|
|
82
|
+
})
|
|
83
|
+
}))),
|
|
84
|
+
feedback ? /* @__PURE__ */ jsx(Grid, {
|
|
85
|
+
item: true,
|
|
86
|
+
marginLeft: 2,
|
|
87
|
+
height: "100%",
|
|
88
|
+
children: /* @__PURE__ */ jsx(Feedback, {
|
|
89
|
+
appName: headerText
|
|
90
|
+
})
|
|
91
|
+
}) : null
|
|
92
|
+
]
|
|
76
93
|
})
|
|
77
94
|
]
|
|
78
95
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-page-header",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Availity MUI PageHeader Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"publish:canary": "yarn npm publish --access public --tag canary"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@availity/mui-breadcrumbs": "^0.1.
|
|
36
|
-
"@availity/mui-button": "^0.5.
|
|
35
|
+
"@availity/mui-breadcrumbs": "^0.1.9",
|
|
36
|
+
"@availity/mui-button": "^0.5.1",
|
|
37
37
|
"@availity/mui-divider": "^0.3.4",
|
|
38
|
-
"@availity/mui-link": "^0.2.
|
|
39
|
-
"@availity/mui-typography": "^0.1.
|
|
38
|
+
"@availity/mui-link": "^0.2.4",
|
|
39
|
+
"@availity/mui-typography": "^0.1.5",
|
|
40
40
|
"@mui/material": "^5.14.12",
|
|
41
41
|
"react": "18.2.0",
|
|
42
42
|
"react-dom": "18.2.0",
|
|
@@ -44,15 +44,18 @@
|
|
|
44
44
|
"typescript": "^4.6.4"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@availity/mui-breadcrumbs": "^0.1.
|
|
48
|
-
"@availity/mui-button": "^0.5.
|
|
47
|
+
"@availity/mui-breadcrumbs": "^0.1.9",
|
|
48
|
+
"@availity/mui-button": "^0.5.1",
|
|
49
49
|
"@availity/mui-divider": "^0.3.4",
|
|
50
|
-
"@availity/mui-link": "^0.2.
|
|
51
|
-
"@availity/mui-typography": "^0.1.
|
|
50
|
+
"@availity/mui-link": "^0.2.4",
|
|
51
|
+
"@availity/mui-typography": "^0.1.5",
|
|
52
52
|
"@mui/material": "^5.11.9",
|
|
53
53
|
"react": ">=16.3.0"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@availity/mui-feedback": "^0.1.0"
|
|
57
60
|
}
|
|
58
61
|
}
|
package/src/lib/PageHeader.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { Typography } from '@availity/mui-typography';
|
|
|
4
4
|
import { Breadcrumbs, BreadcrumbsProps } from '@availity/mui-breadcrumbs';
|
|
5
5
|
import { Link } from '@availity/mui-link';
|
|
6
6
|
import { Button, ButtonProps } from '@availity/mui-button';
|
|
7
|
+
import { Feedback } from '@availity/mui-feedback';
|
|
7
8
|
|
|
8
9
|
export interface ButtonsProps extends Omit<ButtonProps, 'size' | 'height' | 'color'> {
|
|
9
10
|
key: string;
|
|
@@ -12,11 +13,18 @@ export interface ButtonsProps extends Omit<ButtonProps, 'size' | 'height' | 'col
|
|
|
12
13
|
export interface PageHeaderProps {
|
|
13
14
|
breadcrumbs: BreadcrumbsProps;
|
|
14
15
|
buttons?: ButtonsProps[];
|
|
16
|
+
feedback?: boolean;
|
|
15
17
|
headerText: string;
|
|
16
18
|
helpLink?: string;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
export const PageHeader = ({
|
|
21
|
+
export const PageHeader = ({
|
|
22
|
+
breadcrumbs,
|
|
23
|
+
buttons,
|
|
24
|
+
feedback = false,
|
|
25
|
+
headerText,
|
|
26
|
+
helpLink,
|
|
27
|
+
}: PageHeaderProps): JSX.Element => {
|
|
20
28
|
return (
|
|
21
29
|
<Grid component={Container} container direction="column" marginTop="1rem" marginBottom="1.25rem">
|
|
22
30
|
{breadcrumbs || helpLink ? (
|
|
@@ -40,15 +48,20 @@ export const PageHeader = ({ breadcrumbs, buttons, headerText, helpLink }: PageH
|
|
|
40
48
|
<Grid item>
|
|
41
49
|
<Typography variant="h1" children={headerText} />
|
|
42
50
|
</Grid>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
51
|
+
<Grid item container width="auto">
|
|
52
|
+
{buttons &&
|
|
53
|
+
buttons.length > 0 &&
|
|
54
|
+
buttons?.map((buttonProps) => (
|
|
46
55
|
<Grid item marginLeft={2} height="100%">
|
|
47
56
|
<Button {...buttonProps} size="large" color="secondary" />
|
|
48
57
|
</Grid>
|
|
49
58
|
))}
|
|
50
|
-
|
|
51
|
-
|
|
59
|
+
{feedback ? (
|
|
60
|
+
<Grid item marginLeft={2} height="100%">
|
|
61
|
+
<Feedback appName={headerText} />
|
|
62
|
+
</Grid>
|
|
63
|
+
) : null}
|
|
64
|
+
</Grid>
|
|
52
65
|
</Grid>
|
|
53
66
|
<Divider />
|
|
54
67
|
</Grid>
|