@availity/mui-page-header 0.2.32 → 0.2.34

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 CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.2.34](https://github.com/Availity/element/compare/@availity/mui-page-header@0.2.33...@availity/mui-page-header@0.2.34) (2024-06-12)
6
+
7
+ ## [0.2.33](https://github.com/Availity/element/compare/@availity/mui-page-header@0.2.32...@availity/mui-page-header@0.2.33) (2024-06-10)
8
+
9
+ ### Dependency Updates
10
+
11
+ * `mui-breadcrumbs` updated to version `0.2.32`
12
+ * `mui-link` updated to version `0.2.32`
5
13
  ## [0.2.32](https://github.com/Availity/element/compare/@availity/mui-page-header@0.2.31...@availity/mui-page-header@0.2.32) (2024-05-17)
6
14
 
7
15
  ### Dependency Updates
package/dist/index.js CHANGED
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
7
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __getProtoOf = Object.getPrototypeOf;
10
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
9
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
10
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -34,14 +32,6 @@ var __copyProps = (to, from, except, desc) => {
34
32
  }
35
33
  return to;
36
34
  };
37
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
38
- // If the importer is in node compatibility mode or this is not an ESM
39
- // file that has been converted to a CommonJS file using a Babel-
40
- // compatible transform (i.e. "__esModule" has not been set), then set
41
- // "default" to the CommonJS "module.exports" for node compatibility.
42
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
43
- mod
44
- ));
45
35
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
46
36
 
47
37
  // src/index.ts
@@ -52,14 +42,13 @@ __export(src_exports, {
52
42
  module.exports = __toCommonJS(src_exports);
53
43
 
54
44
  // src/lib/PageHeader.tsx
55
- var import_Container = __toESM(require("@mui/material/Container"));
56
- var import_Grid = __toESM(require("@mui/material/Grid"));
57
45
  var import_mui_divider = require("@availity/mui-divider");
58
46
  var import_mui_typography = require("@availity/mui-typography");
59
47
  var import_mui_breadcrumbs = require("@availity/mui-breadcrumbs");
60
48
  var import_mui_link = require("@availity/mui-link");
61
49
  var import_mui_button = require("@availity/mui-button");
62
50
  var import_mui_feedback = require("@availity/mui-feedback");
51
+ var import_mui_layout = require("@availity/mui-layout");
63
52
  var import_jsx_runtime = require("react/jsx-runtime");
64
53
  var PageHeader = ({
65
54
  breadcrumbs,
@@ -69,25 +58,37 @@ var PageHeader = ({
69
58
  helpAppName,
70
59
  helpLink
71
60
  }) => {
72
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Grid.default, { component: import_Container.default, container: true, direction: "column", marginTop: "1rem", marginBottom: "1.25rem", children: [
73
- breadcrumbs || helpLink ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Grid.default, { direction: "row", item: true, container: true, justifyContent: "space-between", marginBottom: 4, children: [
74
- breadcrumbs && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Grid.default, { item: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_breadcrumbs.Breadcrumbs, __spreadValues({}, breadcrumbs)) }),
75
- helpLink && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Grid.default, { item: true, marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_mui_typography.Typography, { variant: "body1", children: [
76
- "Need help? ",
77
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_link.Link, { href: helpLink, target: "_blank", children: "Watch a demo" }),
78
- " ",
79
- helpAppName ? `for ${helpAppName}` : null
80
- ] }) })
81
- ] }) : null,
82
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Grid.default, { direction: "row", item: true, container: true, marginBottom: 2, alignItems: "center", justifyContent: "space-between", children: [
83
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Grid.default, { item: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_typography.Typography, { variant: "h1", children: headerText }) }),
84
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Grid.default, { item: true, container: true, width: "auto", children: [
85
- buttons && buttons.length > 0 && (buttons == null ? void 0 : buttons.map((buttonProps) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Grid.default, { item: true, marginLeft: 2, height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_button.Button, __spreadProps(__spreadValues({}, buttonProps), { size: "large", color: "secondary" })) }))),
86
- feedback ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Grid.default, { item: true, marginLeft: 2, height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_feedback.Feedback, { appName: headerText }) }) : null
87
- ] })
88
- ] }),
89
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_divider.Divider, {})
90
- ] });
61
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
62
+ import_mui_layout.Grid,
63
+ {
64
+ component: import_mui_layout.Box,
65
+ container: true,
66
+ direction: "column",
67
+ marginTop: "1rem",
68
+ marginBottom: "1.25rem",
69
+ paddingLeft: 3,
70
+ paddingRight: 3,
71
+ children: [
72
+ breadcrumbs || helpLink ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_mui_layout.Grid, { direction: "row", container: true, justifyContent: "space-between", marginBottom: 4, children: [
73
+ breadcrumbs && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_layout.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_breadcrumbs.Breadcrumbs, __spreadValues({}, breadcrumbs)) }),
74
+ helpLink && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_layout.Grid, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_mui_typography.Typography, { variant: "body1", children: [
75
+ "Need help? ",
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_link.Link, { href: helpLink, target: "_blank", children: "Watch a demo" }),
77
+ " ",
78
+ helpAppName ? `for ${helpAppName}` : null
79
+ ] }) })
80
+ ] }) : null,
81
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_mui_layout.Grid, { direction: "row", container: true, marginBottom: 2, alignItems: "center", justifyContent: "space-between", children: [
82
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_layout.Grid, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_typography.Typography, { variant: "h1", children: headerText }) }),
83
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_mui_layout.Grid, { container: true, width: "auto", children: [
84
+ buttons && buttons.length > 0 && (buttons == null ? void 0 : buttons.map((buttonProps) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_layout.Grid, { marginLeft: 2, height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_button.Button, __spreadProps(__spreadValues({}, buttonProps), { size: "large", color: "secondary" })) }))),
85
+ feedback ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_layout.Grid, { marginLeft: 2, height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_feedback.Feedback, { appName: headerText }) }) : null
86
+ ] })
87
+ ] }),
88
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_mui_divider.Divider, {})
89
+ ]
90
+ }
91
+ );
91
92
  };
92
93
  // Annotate the CommonJS export names for ESM import in node:
93
94
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -19,14 +19,13 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
 
21
21
  // src/lib/PageHeader.tsx
22
- import Container from "@mui/material/Container";
23
- import Grid from "@mui/material/Grid";
24
22
  import { Divider } from "@availity/mui-divider";
25
23
  import { Typography } from "@availity/mui-typography";
26
24
  import { Breadcrumbs } from "@availity/mui-breadcrumbs";
27
25
  import { Link } from "@availity/mui-link";
28
26
  import { Button } from "@availity/mui-button";
29
27
  import { Feedback } from "@availity/mui-feedback";
28
+ import { Box, Grid } from "@availity/mui-layout";
30
29
  import { jsx, jsxs } from "react/jsx-runtime";
31
30
  var PageHeader = ({
32
31
  breadcrumbs,
@@ -36,25 +35,37 @@ var PageHeader = ({
36
35
  helpAppName,
37
36
  helpLink
38
37
  }) => {
39
- return /* @__PURE__ */ jsxs(Grid, { component: Container, container: true, direction: "column", marginTop: "1rem", marginBottom: "1.25rem", children: [
40
- breadcrumbs || helpLink ? /* @__PURE__ */ jsxs(Grid, { direction: "row", item: true, container: true, justifyContent: "space-between", marginBottom: 4, children: [
41
- breadcrumbs && /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Breadcrumbs, __spreadValues({}, breadcrumbs)) }),
42
- helpLink && /* @__PURE__ */ jsx(Grid, { item: true, marginLeft: 2, children: /* @__PURE__ */ jsxs(Typography, { variant: "body1", children: [
43
- "Need help? ",
44
- /* @__PURE__ */ jsx(Link, { href: helpLink, target: "_blank", children: "Watch a demo" }),
45
- " ",
46
- helpAppName ? `for ${helpAppName}` : null
47
- ] }) })
48
- ] }) : null,
49
- /* @__PURE__ */ jsxs(Grid, { direction: "row", item: true, container: true, marginBottom: 2, alignItems: "center", justifyContent: "space-between", children: [
50
- /* @__PURE__ */ jsx(Grid, { item: true, children: /* @__PURE__ */ jsx(Typography, { variant: "h1", children: headerText }) }),
51
- /* @__PURE__ */ jsxs(Grid, { item: true, container: true, width: "auto", children: [
52
- buttons && buttons.length > 0 && (buttons == null ? void 0 : buttons.map((buttonProps) => /* @__PURE__ */ jsx(Grid, { item: true, marginLeft: 2, height: "100%", children: /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, buttonProps), { size: "large", color: "secondary" })) }))),
53
- feedback ? /* @__PURE__ */ jsx(Grid, { item: true, marginLeft: 2, height: "100%", children: /* @__PURE__ */ jsx(Feedback, { appName: headerText }) }) : null
54
- ] })
55
- ] }),
56
- /* @__PURE__ */ jsx(Divider, {})
57
- ] });
38
+ return /* @__PURE__ */ jsxs(
39
+ Grid,
40
+ {
41
+ component: Box,
42
+ container: true,
43
+ direction: "column",
44
+ marginTop: "1rem",
45
+ marginBottom: "1.25rem",
46
+ paddingLeft: 3,
47
+ paddingRight: 3,
48
+ children: [
49
+ breadcrumbs || helpLink ? /* @__PURE__ */ jsxs(Grid, { direction: "row", container: true, justifyContent: "space-between", marginBottom: 4, children: [
50
+ breadcrumbs && /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Breadcrumbs, __spreadValues({}, breadcrumbs)) }),
51
+ helpLink && /* @__PURE__ */ jsx(Grid, { marginLeft: 2, children: /* @__PURE__ */ jsxs(Typography, { variant: "body1", children: [
52
+ "Need help? ",
53
+ /* @__PURE__ */ jsx(Link, { href: helpLink, target: "_blank", children: "Watch a demo" }),
54
+ " ",
55
+ helpAppName ? `for ${helpAppName}` : null
56
+ ] }) })
57
+ ] }) : null,
58
+ /* @__PURE__ */ jsxs(Grid, { direction: "row", container: true, marginBottom: 2, alignItems: "center", justifyContent: "space-between", children: [
59
+ /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Typography, { variant: "h1", children: headerText }) }),
60
+ /* @__PURE__ */ jsxs(Grid, { container: true, width: "auto", children: [
61
+ buttons && buttons.length > 0 && (buttons == null ? void 0 : buttons.map((buttonProps) => /* @__PURE__ */ jsx(Grid, { marginLeft: 2, height: "100%", children: /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, buttonProps), { size: "large", color: "secondary" })) }))),
62
+ feedback ? /* @__PURE__ */ jsx(Grid, { marginLeft: 2, height: "100%", children: /* @__PURE__ */ jsx(Feedback, { appName: headerText }) }) : null
63
+ ] })
64
+ ] }),
65
+ /* @__PURE__ */ jsx(Divider, {})
66
+ ]
67
+ }
68
+ );
58
69
  };
59
70
  export {
60
71
  PageHeader
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-page-header",
3
- "version": "0.2.32",
3
+ "version": "0.2.34",
4
4
  "description": "Availity MUI PageHeader Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -32,10 +32,11 @@
32
32
  "publish:canary": "yarn npm publish --access public --tag canary"
33
33
  },
34
34
  "devDependencies": {
35
- "@availity/mui-breadcrumbs": "^0.2.7",
35
+ "@availity/mui-breadcrumbs": "^0.2.8",
36
36
  "@availity/mui-button": "^0.6.7",
37
37
  "@availity/mui-divider": "^0.3.7",
38
- "@availity/mui-link": "^0.3.0",
38
+ "@availity/mui-layout": "^0.1.6",
39
+ "@availity/mui-link": "^0.4.0",
39
40
  "@availity/mui-typography": "^0.1.8",
40
41
  "@mui/material": "^5.15.15",
41
42
  "react": "18.2.0",
@@ -44,10 +45,11 @@
44
45
  "typescript": "^5.4.5"
45
46
  },
46
47
  "peerDependencies": {
47
- "@availity/mui-breadcrumbs": "^0.2.7",
48
+ "@availity/mui-breadcrumbs": "^0.2.8",
48
49
  "@availity/mui-button": "^0.6.7",
49
50
  "@availity/mui-divider": "^0.3.7",
50
- "@availity/mui-link": "^0.3.0",
51
+ "@availity/mui-layout": "^0.1.6",
52
+ "@availity/mui-link": "^0.4.0",
51
53
  "@availity/mui-typography": "^0.1.8",
52
54
  "@mui/material": "^5.11.9",
53
55
  "react": ">=16.3.0"
@@ -1,11 +1,10 @@
1
- import Container from '@mui/material/Container';
2
- import Grid from '@mui/material/Grid';
3
1
  import { Divider } from '@availity/mui-divider';
4
2
  import { Typography } from '@availity/mui-typography';
5
3
  import { Breadcrumbs, BreadcrumbsProps } from '@availity/mui-breadcrumbs';
6
4
  import { Link } from '@availity/mui-link';
7
5
  import { Button, ButtonProps } from '@availity/mui-button';
8
6
  import { Feedback } from '@availity/mui-feedback';
7
+ import { Box, Grid } from '@availity/mui-layout';
9
8
 
10
9
  export interface ButtonsProps extends Omit<ButtonProps, 'size' | 'height' | 'color'> {
11
10
  key: string;
@@ -40,16 +39,24 @@ export const PageHeader = ({
40
39
  helpLink,
41
40
  }: PageHeaderProps): JSX.Element => {
42
41
  return (
43
- <Grid component={Container} container direction="column" marginTop="1rem" marginBottom="1.25rem">
42
+ <Grid
43
+ component={Box}
44
+ container
45
+ direction="column"
46
+ marginTop="1rem"
47
+ marginBottom="1.25rem"
48
+ paddingLeft={3}
49
+ paddingRight={3}
50
+ >
44
51
  {breadcrumbs || helpLink ? (
45
- <Grid direction="row" item container justifyContent="space-between" marginBottom={4}>
52
+ <Grid direction="row" container justifyContent="space-between" marginBottom={4}>
46
53
  {breadcrumbs && (
47
- <Grid item>
54
+ <Grid>
48
55
  <Breadcrumbs {...breadcrumbs} />
49
56
  </Grid>
50
57
  )}
51
58
  {helpLink && (
52
- <Grid item marginLeft={2}>
59
+ <Grid marginLeft={2}>
53
60
  <Typography variant="body1">
54
61
  Need help? <Link href={helpLink} target="_blank" children="Watch a demo" />{' '}
55
62
  {helpAppName ? `for ${helpAppName}` : null}
@@ -59,20 +66,20 @@ export const PageHeader = ({
59
66
  </Grid>
60
67
  ) : null}
61
68
 
62
- <Grid direction="row" item container marginBottom={2} alignItems="center" justifyContent="space-between">
63
- <Grid item>
69
+ <Grid direction="row" container marginBottom={2} alignItems="center" justifyContent="space-between">
70
+ <Grid>
64
71
  <Typography variant="h1" children={headerText} />
65
72
  </Grid>
66
- <Grid item container width="auto">
73
+ <Grid container width="auto">
67
74
  {buttons &&
68
75
  buttons.length > 0 &&
69
76
  buttons?.map((buttonProps) => (
70
- <Grid item marginLeft={2} height="100%">
77
+ <Grid marginLeft={2} height="100%">
71
78
  <Button {...buttonProps} size="large" color="secondary" />
72
79
  </Grid>
73
80
  ))}
74
81
  {feedback ? (
75
- <Grid item marginLeft={2} height="100%">
82
+ <Grid marginLeft={2} height="100%">
76
83
  <Feedback appName={headerText} />
77
84
  </Grid>
78
85
  ) : null}