@availity/mui-page-header 1.0.16 → 1.0.17

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,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.0.17](https://github.com/Availity/element/compare/@availity/mui-page-header@1.0.16...@availity/mui-page-header@1.0.17) (2025-02-03)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **mui-page-header:** pass key in map ([b1491b2](https://github.com/Availity/element/commit/b1491b2126e4820ff06151dab48f77d79015cac7))
11
+
5
12
  ## [1.0.16](https://github.com/Availity/element/compare/@availity/mui-page-header@1.0.15...@availity/mui-page-header@1.0.16) (2025-01-27)
6
13
 
7
14
  ### Dependency Updates
package/dist/index.js CHANGED
@@ -22,6 +22,18 @@ var __spreadValues = (a, b) => {
22
22
  return a;
23
23
  };
24
24
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
25
37
  var __export = (target, all) => {
26
38
  for (var name in all)
27
39
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -119,7 +131,10 @@ var PageHeader = ({
119
131
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_mui_layout.Grid, { direction: "row", container: true, marginBottom: 2, alignItems: "center", justifyContent: "space-between", children: [
120
132
  /* @__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 }) }),
121
133
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_mui_layout.Grid, { container: true, width: "auto", children: [
122
- 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" })) }))),
134
+ buttons && buttons.length > 0 && (buttons == null ? void 0 : buttons.map((_a) => {
135
+ var _b = _a, { key } = _b, buttonProps = __objRest(_b, ["key"]);
136
+ return /* @__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" })) }, key);
137
+ })),
123
138
  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
124
139
  ] })
125
140
  ] }),
package/dist/index.mjs CHANGED
@@ -17,6 +17,18 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
20
32
 
21
33
  // src/lib/PageHeader.tsx
22
34
  import { Divider } from "@availity/mui-divider";
@@ -86,7 +98,10 @@ var PageHeader = ({
86
98
  /* @__PURE__ */ jsxs(Grid, { direction: "row", container: true, marginBottom: 2, alignItems: "center", justifyContent: "space-between", children: [
87
99
  /* @__PURE__ */ jsx(Grid, { children: /* @__PURE__ */ jsx(Typography, { variant: "h1", children: headerText }) }),
88
100
  /* @__PURE__ */ jsxs(Grid, { container: true, width: "auto", children: [
89
- 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" })) }))),
101
+ buttons && buttons.length > 0 && (buttons == null ? void 0 : buttons.map((_a) => {
102
+ var _b = _a, { key } = _b, buttonProps = __objRest(_b, ["key"]);
103
+ return /* @__PURE__ */ jsx(Grid, { marginLeft: 2, height: "100%", children: /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, buttonProps), { size: "large", color: "secondary" })) }, key);
104
+ })),
90
105
  feedback ? /* @__PURE__ */ jsx(Grid, { marginLeft: 2, height: "100%", children: /* @__PURE__ */ jsx(Feedback, { appName: headerText }) }) : null
91
106
  ] })
92
107
  ] }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-page-header",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Availity MUI PageHeader Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -126,8 +126,8 @@ export const PageHeader = ({
126
126
  <Grid container width="auto">
127
127
  {buttons &&
128
128
  buttons.length > 0 &&
129
- buttons?.map((buttonProps) => (
130
- <Grid marginLeft={2} height="100%">
129
+ buttons?.map(({ key, ...buttonProps }) => (
130
+ <Grid key={key} marginLeft={2} height="100%">
131
131
  <Button {...buttonProps} size="large" color="secondary" />
132
132
  </Grid>
133
133
  ))}