@availity/mui-avatar 0.1.16 → 0.1.18

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,22 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.1.18](https://github.com/Availity/element/compare/@availity/mui-avatar@0.1.17...@availity/mui-avatar@0.1.18) (2024-04-19)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `design-tokens` updated to version `0.1.17`
10
+ * `mui-icon` updated to version `0.1.17`
11
+ ## [0.1.17](https://github.com/Availity/element/compare/@availity/mui-avatar@0.1.16...@availity/mui-avatar@0.1.17) (2024-04-04)
12
+
13
+ ### Dependency Updates
14
+
15
+ * `mui-icon` updated to version `0.8.1`
16
+
17
+ ### Performance Improvements
18
+
19
+ * **mui-avatar:** use path imports for material deps ([b73a531](https://github.com/Availity/element/commit/b73a53146678ce7aa61247878d3573999496cbee))
20
+
5
21
  ## [0.1.16](https://github.com/Availity/element/compare/@availity/mui-avatar@0.1.15...@availity/mui-avatar@0.1.16) (2024-03-15)
6
22
 
7
23
  ### Dependency Updates
@@ -0,0 +1,10 @@
1
+ import { AvatarProps as AvatarProps$1 } from '@mui/material/Avatar';
2
+
3
+ interface AvatarProps extends Omit<AvatarProps$1, 'variant'> {
4
+ /** The size of the component.
5
+ * @default xl */
6
+ size?: 'xs' | 's' | 'm' | 'l' | 'xl';
7
+ }
8
+ declare const Avatar: ({ children, size, sx, ...rest }: AvatarProps) => JSX.Element;
9
+
10
+ export { Avatar, type AvatarProps };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AvatarProps as AvatarProps$1 } from '@mui/material';
1
+ import { AvatarProps as AvatarProps$1 } from '@mui/material/Avatar';
2
2
 
3
3
  interface AvatarProps extends Omit<AvatarProps$1, 'variant'> {
4
4
  /** The size of the component.
@@ -7,4 +7,4 @@ interface AvatarProps extends Omit<AvatarProps$1, 'variant'> {
7
7
  }
8
8
  declare const Avatar: ({ children, size, sx, ...rest }: AvatarProps) => JSX.Element;
9
9
 
10
- export { Avatar, AvatarProps };
10
+ export { Avatar, type AvatarProps };
package/dist/index.js CHANGED
@@ -1,8 +1,39 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
3
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
5
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
+ };
6
37
  var __export = (target, all) => {
7
38
  for (var name in all)
8
39
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,6 +46,14 @@ var __copyProps = (to, from, except, desc) => {
15
46
  }
16
47
  return to;
17
48
  };
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.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
18
57
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
58
 
20
59
  // src/index.ts
@@ -25,7 +64,7 @@ __export(src_exports, {
25
64
  module.exports = __toCommonJS(src_exports);
26
65
 
27
66
  // src/lib/Avatar.tsx
28
- var import_material = require("@mui/material");
67
+ var import_Avatar = __toESM(require("@mui/material/Avatar"));
29
68
  var import_design_tokens = require("@availity/design-tokens");
30
69
  var import_jsx_runtime = require("react/jsx-runtime");
31
70
  var sizeStyling = {
@@ -47,16 +86,16 @@ var formatChildren = (children, size) => {
47
86
  }
48
87
  return children;
49
88
  };
50
- var Avatar = ({ children, size = "xl", sx, ...rest }) => {
51
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Avatar, {
52
- ...rest,
53
- variant: "circular",
54
- sx: {
55
- ...sx,
56
- ...sizeStyling[size] || sizeStyling.xl
57
- },
58
- children: formatChildren(children, size)
59
- });
89
+ var Avatar = (_a) => {
90
+ var _b = _a, { children, size = "xl", sx } = _b, rest = __objRest(_b, ["children", "size", "sx"]);
91
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
+ import_Avatar.default,
93
+ __spreadProps(__spreadValues({}, rest), {
94
+ variant: "circular",
95
+ sx: __spreadValues(__spreadValues({}, sx), sizeStyling[size] || sizeStyling.xl),
96
+ children: formatChildren(children, size)
97
+ })
98
+ );
60
99
  };
61
100
  // Annotate the CommonJS export names for ESM import in node:
62
101
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -1,5 +1,37 @@
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/Avatar.tsx
2
- import { Avatar as MuiAvatar } from "@mui/material";
34
+ import { default as MuiAvatar } from "@mui/material/Avatar";
3
35
  import { tokens } from "@availity/design-tokens";
4
36
  import { jsx } from "react/jsx-runtime";
5
37
  var sizeStyling = {
@@ -21,16 +53,16 @@ var formatChildren = (children, size) => {
21
53
  }
22
54
  return children;
23
55
  };
24
- var Avatar = ({ children, size = "xl", sx, ...rest }) => {
25
- return /* @__PURE__ */ jsx(MuiAvatar, {
26
- ...rest,
27
- variant: "circular",
28
- sx: {
29
- ...sx,
30
- ...sizeStyling[size] || sizeStyling.xl
31
- },
32
- children: formatChildren(children, size)
33
- });
56
+ var Avatar = (_a) => {
57
+ var _b = _a, { children, size = "xl", sx } = _b, rest = __objRest(_b, ["children", "size", "sx"]);
58
+ return /* @__PURE__ */ jsx(
59
+ MuiAvatar,
60
+ __spreadProps(__spreadValues({}, rest), {
61
+ variant: "circular",
62
+ sx: __spreadValues(__spreadValues({}, sx), sizeStyling[size] || sizeStyling.xl),
63
+ children: formatChildren(children, size)
64
+ })
65
+ );
34
66
  };
35
67
  export {
36
68
  Avatar
package/jest.config.js CHANGED
@@ -4,4 +4,14 @@ module.exports = {
4
4
  ...global,
5
5
  displayName: 'avatar',
6
6
  coverageDirectory: '../../coverage/avatar',
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-avatar",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "description": "Availity MUI Avatar Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -32,12 +32,12 @@
32
32
  "publish:canary": "yarn npm publish --access public --tag canary"
33
33
  },
34
34
  "devDependencies": {
35
- "@availity/mui-icon": "^0.8.0",
36
- "@mui/material": "^5.14.12",
35
+ "@availity/mui-icon": "^0.8.2",
36
+ "@mui/material": "^5.15.15",
37
37
  "react": "18.2.0",
38
38
  "react-dom": "18.2.0",
39
- "tsup": "^5.12.7",
40
- "typescript": "^4.6.4"
39
+ "tsup": "^8.0.2",
40
+ "typescript": "^5.4.5"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@mui/material": "^5.11.9",
@@ -47,6 +47,6 @@
47
47
  "access": "public"
48
48
  },
49
49
  "dependencies": {
50
- "@availity/design-tokens": "^0.13.1"
50
+ "@availity/design-tokens": "^0.13.2"
51
51
  }
52
52
  }
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/avatar/**/*.{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/avatar"],
24
+ "executor": "@nx/jest:jest",
25
+ "outputs": ["{workspaceRoot}/coverage/avatar"],
27
26
  "options": {
28
- "jestConfig": "packages/avatar/jest.config.js",
29
- "passWithNoTests": true
27
+ "jestConfig": "packages/avatar/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
  }
@@ -1,4 +1,4 @@
1
- import { Avatar as MuiAvatar, AvatarProps as MuiAvatarProps } from '@mui/material';
1
+ import { default as MuiAvatar, AvatarProps as MuiAvatarProps } from '@mui/material/Avatar';
2
2
  import React from 'react';
3
3
  import { tokens } from '@availity/design-tokens';
4
4