@availity/mui-card 0.2.13 → 0.2.14

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,12 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.2.14](https://github.com/Availity/element/compare/@availity/mui-card@0.2.13...@availity/mui-card@0.2.14) (2024-04-19)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `mui-button` updated to version `0.2.13`
10
+ * `mui-icon` updated to version `0.2.13`
5
11
  ## [0.2.13](https://github.com/Availity/element/compare/@availity/mui-card@0.2.12...@availity/mui-card@0.2.13) (2024-04-15)
6
12
 
7
13
  ### Dependency Updates
@@ -0,0 +1,38 @@
1
+ import { CardProps as CardProps$1 } from '@mui/material/Card';
2
+ import { CardActionAreaProps as CardActionAreaProps$1 } from '@mui/material/CardActionArea';
3
+ import { CardActionsProps as CardActionsProps$1 } from '@mui/material/CardActions';
4
+ import { CardContentProps as CardContentProps$1 } from '@mui/material/CardContent';
5
+ import { CardHeaderProps as CardHeaderProps$1 } from '@mui/material/CardHeader';
6
+ import { CardMediaProps as CardMediaProps$1 } from '@mui/material/CardMedia';
7
+
8
+ interface CardProps extends Omit<CardProps$1, 'elevation' | 'variant' | 'raised' | 'square'> {
9
+ children?: React.ReactNode;
10
+ }
11
+ declare const Card: ({ children, ...rest }: CardProps) => JSX.Element;
12
+
13
+ interface CardActionAreaProps extends Omit<CardActionAreaProps$1, 'centerRipple' | 'disableRipple' | 'disableTouchRipple' | 'focusRipple' | 'TouchRippleProps' | 'touchRippleRef'> {
14
+ children?: React.ReactNode;
15
+ }
16
+ declare const CardActionArea: ({ children, ...rest }: CardActionAreaProps) => JSX.Element;
17
+
18
+ interface CardActionsProps extends CardActionsProps$1 {
19
+ children?: React.ReactNode;
20
+ }
21
+ declare const CardActions: ({ children, ...rest }: CardActionsProps) => JSX.Element;
22
+
23
+ interface CardContentProps extends CardContentProps$1 {
24
+ children?: React.ReactNode;
25
+ }
26
+ declare const CardContent: ({ children, ...rest }: CardContentProps) => JSX.Element;
27
+
28
+ interface CardHeaderProps extends Omit<CardHeaderProps$1, 'avatar'> {
29
+ children?: React.ReactNode;
30
+ }
31
+ declare const CardHeader: ({ titleTypographyProps, subheaderTypographyProps, ...rest }: CardHeaderProps) => JSX.Element;
32
+
33
+ interface CardMediaProps extends CardMediaProps$1 {
34
+ children?: React.ReactNode;
35
+ }
36
+ declare const CardMedia: ({ children, ...rest }: CardMediaProps) => JSX.Element;
37
+
38
+ export { Card, CardActionArea, type CardActionAreaProps, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps };
package/dist/index.d.ts CHANGED
@@ -35,4 +35,4 @@ interface CardMediaProps extends CardMediaProps$1 {
35
35
  }
36
36
  declare const CardMedia: ({ children, ...rest }: CardMediaProps) => JSX.Element;
37
37
 
38
- export { Card, CardActionArea, CardActionAreaProps, CardActions, CardActionsProps, CardContent, CardContentProps, CardHeader, CardHeaderProps, CardMedia, CardMediaProps, CardProps };
38
+ export { Card, CardActionArea, type CardActionAreaProps, CardActions, type CardActionsProps, CardContent, type CardContentProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps };
package/dist/index.js CHANGED
@@ -1,10 +1,39 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
9
  var __getProtoOf = Object.getPrototypeOf;
7
10
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
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
+ };
8
37
  var __export = (target, all) => {
9
38
  for (var name in all)
10
39
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -18,6 +47,10 @@ var __copyProps = (to, from, except, desc) => {
18
47
  return to;
19
48
  };
20
49
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
54
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
55
  mod
23
56
  ));
@@ -38,74 +71,67 @@ module.exports = __toCommonJS(src_exports);
38
71
  // src/lib/Card.tsx
39
72
  var import_Card = __toESM(require("@mui/material/Card"));
40
73
  var import_jsx_runtime = require("react/jsx-runtime");
41
- var Card = ({ children, ...rest }) => {
42
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Card.default, {
43
- ...rest,
44
- children
45
- });
74
+ var Card = (_a) => {
75
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
76
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Card.default, __spreadProps(__spreadValues({}, rest), { children }));
46
77
  };
47
78
 
48
79
  // src/lib/CardActionArea.tsx
49
80
  var import_CardActionArea = __toESM(require("@mui/material/CardActionArea"));
50
- var import_jsx_runtime = require("react/jsx-runtime");
51
- var CardActionArea = ({ children, ...rest }) => {
52
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CardActionArea.default, {
53
- ...rest,
54
- disableRipple: true,
55
- children
56
- });
81
+ var import_jsx_runtime2 = require("react/jsx-runtime");
82
+ var CardActionArea = (_a) => {
83
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
84
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_CardActionArea.default, __spreadProps(__spreadValues({}, rest), { disableRipple: true, children }));
57
85
  };
58
86
 
59
87
  // src/lib/CardActions.tsx
60
88
  var import_CardActions = __toESM(require("@mui/material/CardActions"));
61
- var import_jsx_runtime = require("react/jsx-runtime");
62
- var CardActions = ({ children, ...rest }) => {
63
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CardActions.default, {
64
- ...rest,
65
- children
66
- });
89
+ var import_jsx_runtime3 = require("react/jsx-runtime");
90
+ var CardActions = (_a) => {
91
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
92
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_CardActions.default, __spreadProps(__spreadValues({}, rest), { children }));
67
93
  };
68
94
 
69
95
  // src/lib/CardContent.tsx
70
96
  var import_CardContent = __toESM(require("@mui/material/CardContent"));
71
- var import_jsx_runtime = require("react/jsx-runtime");
72
- var CardContent = ({ children, ...rest }) => {
73
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CardContent.default, {
74
- ...rest,
75
- children
76
- });
97
+ var import_jsx_runtime4 = require("react/jsx-runtime");
98
+ var CardContent = (_a) => {
99
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
100
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_CardContent.default, __spreadProps(__spreadValues({}, rest), { children }));
77
101
  };
78
102
 
79
103
  // src/lib/CardHeader.tsx
80
104
  var import_styles = require("@mui/material/styles");
81
105
  var import_CardHeader = __toESM(require("@mui/material/CardHeader"));
82
- var import_jsx_runtime = require("react/jsx-runtime");
83
- var CardHeader = ({
84
- titleTypographyProps,
85
- subheaderTypographyProps,
86
- ...rest
87
- }) => {
88
- var _a, _b, _c, _d;
106
+ var import_jsx_runtime5 = require("react/jsx-runtime");
107
+ var CardHeader = (_a) => {
108
+ var _b = _a, {
109
+ titleTypographyProps,
110
+ subheaderTypographyProps
111
+ } = _b, rest = __objRest(_b, [
112
+ "titleTypographyProps",
113
+ "subheaderTypographyProps"
114
+ ]);
115
+ var _a2, _b2, _c, _d;
89
116
  const theme = (0, import_styles.useTheme)();
90
- const titleVariant = (_d = (_c = (_b = (_a = theme.components) == null ? void 0 : _a.MuiCardHeader) == null ? void 0 : _b.defaultProps) == null ? void 0 : _c.titleTypographyProps) == null ? void 0 : _d.variant;
91
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CardHeader.default, {
92
- ...rest,
93
- titleTypographyProps: {
94
- variant: titleVariant,
95
- ...titleTypographyProps
96
- },
97
- subheaderTypographyProps: { variant: "subtitle2", ...subheaderTypographyProps }
98
- });
117
+ const titleVariant = (_d = (_c = (_b2 = (_a2 = theme.components) == null ? void 0 : _a2.MuiCardHeader) == null ? void 0 : _b2.defaultProps) == null ? void 0 : _c.titleTypographyProps) == null ? void 0 : _d.variant;
118
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
119
+ import_CardHeader.default,
120
+ __spreadProps(__spreadValues({}, rest), {
121
+ titleTypographyProps: __spreadValues({
122
+ variant: titleVariant
123
+ }, titleTypographyProps),
124
+ subheaderTypographyProps: __spreadValues({ variant: "subtitle2" }, subheaderTypographyProps)
125
+ })
126
+ );
99
127
  };
100
128
 
101
129
  // src/lib/CardMedia.tsx
102
130
  var import_CardMedia = __toESM(require("@mui/material/CardMedia"));
103
- var import_jsx_runtime = require("react/jsx-runtime");
104
- var CardMedia = ({ children, ...rest }) => {
105
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_CardMedia.default, {
106
- ...rest,
107
- children
108
- });
131
+ var import_jsx_runtime6 = require("react/jsx-runtime");
132
+ var CardMedia = (_a) => {
133
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
134
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_CardMedia.default, __spreadProps(__spreadValues({}, rest), { children }));
109
135
  };
110
136
  // Annotate the CommonJS export names for ESM import in node:
111
137
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -1,11 +1,41 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
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
+ };
32
+
1
33
  // src/lib/Card.tsx
2
34
  import { default as MuiCard } from "@mui/material/Card";
3
35
  import { jsx } from "react/jsx-runtime";
4
- var Card = ({ children, ...rest }) => {
5
- return /* @__PURE__ */ jsx(MuiCard, {
6
- ...rest,
7
- children
8
- });
36
+ var Card = (_a) => {
37
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
38
+ return /* @__PURE__ */ jsx(MuiCard, __spreadProps(__spreadValues({}, rest), { children }));
9
39
  };
10
40
 
11
41
  // src/lib/CardActionArea.tsx
@@ -13,64 +43,59 @@ import {
13
43
  default as MuiCardActionArea
14
44
  } from "@mui/material/CardActionArea";
15
45
  import { jsx as jsx2 } from "react/jsx-runtime";
16
- var CardActionArea = ({ children, ...rest }) => {
17
- return /* @__PURE__ */ jsx2(MuiCardActionArea, {
18
- ...rest,
19
- disableRipple: true,
20
- children
21
- });
46
+ var CardActionArea = (_a) => {
47
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
48
+ return /* @__PURE__ */ jsx2(MuiCardActionArea, __spreadProps(__spreadValues({}, rest), { disableRipple: true, children }));
22
49
  };
23
50
 
24
51
  // src/lib/CardActions.tsx
25
52
  import { default as MuiCardActions } from "@mui/material/CardActions";
26
53
  import { jsx as jsx3 } from "react/jsx-runtime";
27
- var CardActions = ({ children, ...rest }) => {
28
- return /* @__PURE__ */ jsx3(MuiCardActions, {
29
- ...rest,
30
- children
31
- });
54
+ var CardActions = (_a) => {
55
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
56
+ return /* @__PURE__ */ jsx3(MuiCardActions, __spreadProps(__spreadValues({}, rest), { children }));
32
57
  };
33
58
 
34
59
  // src/lib/CardContent.tsx
35
60
  import { default as MuiCardContent } from "@mui/material/CardContent";
36
61
  import { jsx as jsx4 } from "react/jsx-runtime";
37
- var CardContent = ({ children, ...rest }) => {
38
- return /* @__PURE__ */ jsx4(MuiCardContent, {
39
- ...rest,
40
- children
41
- });
62
+ var CardContent = (_a) => {
63
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
64
+ return /* @__PURE__ */ jsx4(MuiCardContent, __spreadProps(__spreadValues({}, rest), { children }));
42
65
  };
43
66
 
44
67
  // src/lib/CardHeader.tsx
45
68
  import { useTheme } from "@mui/material/styles";
46
69
  import { default as MuiCardHeader } from "@mui/material/CardHeader";
47
70
  import { jsx as jsx5 } from "react/jsx-runtime";
48
- var CardHeader = ({
49
- titleTypographyProps,
50
- subheaderTypographyProps,
51
- ...rest
52
- }) => {
53
- var _a, _b, _c, _d;
71
+ var CardHeader = (_a) => {
72
+ var _b = _a, {
73
+ titleTypographyProps,
74
+ subheaderTypographyProps
75
+ } = _b, rest = __objRest(_b, [
76
+ "titleTypographyProps",
77
+ "subheaderTypographyProps"
78
+ ]);
79
+ var _a2, _b2, _c, _d;
54
80
  const theme = useTheme();
55
- const titleVariant = (_d = (_c = (_b = (_a = theme.components) == null ? void 0 : _a.MuiCardHeader) == null ? void 0 : _b.defaultProps) == null ? void 0 : _c.titleTypographyProps) == null ? void 0 : _d.variant;
56
- return /* @__PURE__ */ jsx5(MuiCardHeader, {
57
- ...rest,
58
- titleTypographyProps: {
59
- variant: titleVariant,
60
- ...titleTypographyProps
61
- },
62
- subheaderTypographyProps: { variant: "subtitle2", ...subheaderTypographyProps }
63
- });
81
+ const titleVariant = (_d = (_c = (_b2 = (_a2 = theme.components) == null ? void 0 : _a2.MuiCardHeader) == null ? void 0 : _b2.defaultProps) == null ? void 0 : _c.titleTypographyProps) == null ? void 0 : _d.variant;
82
+ return /* @__PURE__ */ jsx5(
83
+ MuiCardHeader,
84
+ __spreadProps(__spreadValues({}, rest), {
85
+ titleTypographyProps: __spreadValues({
86
+ variant: titleVariant
87
+ }, titleTypographyProps),
88
+ subheaderTypographyProps: __spreadValues({ variant: "subtitle2" }, subheaderTypographyProps)
89
+ })
90
+ );
64
91
  };
65
92
 
66
93
  // src/lib/CardMedia.tsx
67
94
  import { default as MuiCardMedia } from "@mui/material/CardMedia";
68
95
  import { jsx as jsx6 } from "react/jsx-runtime";
69
- var CardMedia = ({ children, ...rest }) => {
70
- return /* @__PURE__ */ jsx6(MuiCardMedia, {
71
- ...rest,
72
- children
73
- });
96
+ var CardMedia = (_a) => {
97
+ var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
98
+ return /* @__PURE__ */ jsx6(MuiCardMedia, __spreadProps(__spreadValues({}, rest), { children }));
74
99
  };
75
100
  export {
76
101
  Card,
package/jest.config.js CHANGED
@@ -4,4 +4,14 @@ module.exports = {
4
4
  ...global,
5
5
  displayName: 'card',
6
6
  coverageDirectory: '../../coverage/card',
7
+ /* TODO: Update to latest Jest snapshotFormat
8
+ * By default Nx has kept the older style of Jest Snapshot formats
9
+ * to prevent breaking of any existing tests with snapshots.
10
+ * It's recommend you update to the latest format.
11
+ * You can do this by removing snapshotFormat property
12
+ * and running tests with --update-snapshot flag.
13
+ * Example: From within the project directory, run "nx test --update-snapshot"
14
+ * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
15
+ */
16
+ snapshotFormat: { escapeString: true, printBasicPrototype: true },
7
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-card",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "Availity MUI Card Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -32,13 +32,13 @@
32
32
  "publish:canary": "yarn npm publish --access public --tag canary"
33
33
  },
34
34
  "devDependencies": {
35
- "@availity/mui-button": "^0.6.6",
36
- "@availity/mui-icon": "^0.8.1",
37
- "@mui/material": "^5.14.12",
35
+ "@availity/mui-button": "^0.6.7",
36
+ "@availity/mui-icon": "^0.8.2",
37
+ "@mui/material": "^5.15.15",
38
38
  "react": "18.2.0",
39
39
  "react-dom": "18.2.0",
40
- "tsup": "^5.12.7",
41
- "typescript": "^4.6.4"
40
+ "tsup": "^8.0.2",
41
+ "typescript": "^5.4.5"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@mui/material": "^5.11.9",
package/project.json CHANGED
@@ -6,10 +6,9 @@
6
6
  "tags": [],
7
7
  "targets": {
8
8
  "lint": {
9
- "executor": "@nrwl/linter:eslint",
9
+ "executor": "@nx/eslint:lint",
10
10
  "options": {
11
11
  "eslintConfig": ".eslintrc.json",
12
- "lintFilePatterns": ["packages/card/**/*.{js,ts}"],
13
12
  "silent": false,
14
13
  "fix": false,
15
14
  "cache": true,
@@ -22,20 +21,20 @@
22
21
  }
23
22
  },
24
23
  "test": {
25
- "executor": "@nrwl/jest:jest",
26
- "outputs": ["coverage/card"],
24
+ "executor": "@nx/jest:jest",
25
+ "outputs": ["{workspaceRoot}/coverage/card"],
27
26
  "options": {
28
- "jestConfig": "packages/card/jest.config.js",
29
- "passWithNoTests": true
27
+ "jestConfig": "packages/card/jest.config.js"
30
28
  }
31
29
  },
32
30
  "version": {
33
31
  "executor": "@jscutlery/semver:version",
34
32
  "options": {
35
33
  "preset": "conventional",
36
- "commitMessageFormat": "chore(${projectName}): release version ${version} [skip ci]",
37
- "tagPrefix": "@availity/${projectName}@",
38
- "trackDeps": true
34
+ "commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
35
+ "tagPrefix": "@availity/{projectName}@",
36
+ "trackDeps": true,
37
+ "skipCommitTypes": ["docs"]
39
38
  }
40
39
  }
41
40
  }