@availity/mui-accordion 2.2.4 → 3.0.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 CHANGED
@@ -2,6 +2,42 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [3.0.0](https://github.com/Availity/element/compare/@availity/mui-accordion@2.2.5...@availity/mui-accordion@3.0.0) (2026-06-16)
6
+
7
+ ### Dependency Updates
8
+
9
+ * `mui-icon` updated to version `2.2.5`
10
+ * `mui-button` updated to version `2.2.5`
11
+ * `mui-chip` updated to version `2.2.5`
12
+ * `mui-layout` updated to version `2.2.5`
13
+ * `mui-typography` updated to version `2.2.5`
14
+
15
+ ### ⚠ BREAKING CHANGES
16
+
17
+ * CJS builds removed, packages are ESM-only.
18
+
19
+ - Convert all packages to ESM (type: module)
20
+ - Replace Jest with Vitest for all test targets
21
+ - Migrate ESLint to v9 flat config (eslint.config.js)
22
+ - Build output ESM-only (removed CJS dist/index.js require path)
23
+ - Upgrade @tanstack/react-query from v4 to v5
24
+ - Upgrade @availity/api-axios to v13
25
+ - Drop Node 20 support (engines: ^22.0.0 || ^24.0.0)
26
+ - Bump React to 19.2.7, MUI to 7.3.11, TypeScript to 5.9.3
27
+ - Simplify CI caching with built-in yarn cache action + Nx cache
28
+ - Modernize nx.json configuration
29
+ - Update husky hooks to use yarn directly
30
+ - Replace lint-staged nx affected with direct eslint
31
+
32
+ ### Features
33
+
34
+ * migrate to ESM, Vitest, and ESLint 9 flat config ([cc22bb4](https://github.com/Availity/element/commit/cc22bb4a230bc1f3b190f187c4e61249d015b25b))
35
+
36
+ ## [2.2.5](https://github.com/Availity/element/compare/@availity/mui-accordion@2.2.4...@availity/mui-accordion@2.2.5) (2026-05-27)
37
+
38
+ ### Dependency Updates
39
+
40
+ * `mui-chip` updated to version `2.2.4`
5
41
  ## [2.2.4](https://github.com/Availity/element/compare/@availity/mui-accordion@2.2.3...@availity/mui-accordion@2.2.4) (2026-03-03)
6
42
 
7
43
  ### Dependency Updates
package/dist/index.d.ts CHANGED
@@ -44,7 +44,7 @@ interface TypographyProps extends TypographyProps$1 {
44
44
  type AccordionSummaryProps = {
45
45
  /** The main content element. Aliased by the `children` prop. */
46
46
  primary?: ReactNode;
47
- /** These props will be forwarded to the primary typography component. Update `component` to reflect the correct heading level for accessibility.*/
47
+ /** These props will be forwarded to the primary typography component. Update `component` to reflect the correct heading level for accessibility. */
48
48
  primaryProps?: Omit<TypographyProps, 'className'>;
49
49
  /** The secondary content element. */
50
50
  secondary?: ReactNode;
package/dist/index.js CHANGED
@@ -1,77 +1,9 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __getProtoOf = Object.getPrototypeOf;
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
- };
37
- var __export = (target, all) => {
38
- for (var name in all)
39
- __defProp(target, name, { get: all[name], enumerable: true });
40
- };
41
- var __copyProps = (to, from, except, desc) => {
42
- if (from && typeof from === "object" || typeof from === "function") {
43
- for (let key of __getOwnPropNames(from))
44
- if (!__hasOwnProp.call(to, key) && key !== except)
45
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
- }
47
- return to;
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
- ));
57
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
-
59
- // src/index.ts
60
- var index_exports = {};
61
- __export(index_exports, {
62
- Accordion: () => Accordion,
63
- AccordionActions: () => AccordionActions,
64
- AccordionDetails: () => AccordionDetails,
65
- AccordionSummary: () => AccordionSummary
66
- });
67
- module.exports = __toCommonJS(index_exports);
68
-
69
1
  // src/lib/Accordion.tsx
70
- var import_Accordion = __toESM(require("@mui/material/Accordion"));
71
- var import_styles = require("@mui/material/styles");
72
- var import_react = require("react");
73
- var import_jsx_runtime = require("react/jsx-runtime");
74
- var FilledAccordion = (0, import_styles.styled)(import_Accordion.default, {
2
+ import MuiAccordion from "@mui/material/Accordion";
3
+ import { styled } from "@mui/material/styles";
4
+ import { forwardRef } from "react";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var FilledAccordion = styled(MuiAccordion, {
75
7
  name: "MuiAccordion",
76
8
  slot: "AvFilled",
77
9
  overridesResolver: (props, styles) => styles.avFilled
@@ -81,7 +13,7 @@ var FilledAccordion = (0, import_styles.styled)(import_Accordion.default, {
81
13
  backgroundColor: theme.palette.grey[100]
82
14
  }
83
15
  }));
84
- var OutlinedAccordion = (0, import_styles.styled)(import_Accordion.default, {
16
+ var OutlinedAccordion = styled(MuiAccordion, {
85
17
  name: "MuiAccordion",
86
18
  slot: "AvOutlined",
87
19
  overridesResolver: (props, styles) => styles.avOutlined
@@ -94,7 +26,7 @@ var OutlinedAccordion = (0, import_styles.styled)(import_Accordion.default, {
94
26
  borderTop: `1px solid ${theme.palette.divider}`
95
27
  }
96
28
  }));
97
- var FlushAccordion = (0, import_styles.styled)(import_Accordion.default, {
29
+ var FlushAccordion = styled(MuiAccordion, {
98
30
  name: "MuiAccordion",
99
31
  slot: "AvFlush",
100
32
  overridesResolver: (props, styles) => styles.avFlush
@@ -126,45 +58,42 @@ var VariantComponent = {
126
58
  outlined: OutlinedAccordion,
127
59
  flush: FlushAccordion
128
60
  };
129
- var Accordion = (0, import_react.forwardRef)((allProps, ref) => {
130
- const _a = allProps, { variant = "filled", disableNestedStyling = false, className } = _a, props = __objRest(_a, ["variant", "disableNestedStyling", "className"]);
61
+ var Accordion = forwardRef((allProps, ref) => {
62
+ const { variant = "filled", disableNestedStyling = false, className, ...props } = allProps;
131
63
  const Variant = VariantComponent[variant];
132
64
  const classnames = `MuiAccordion-av${variant.charAt(0).toUpperCase() + variant.slice(1)}${disableNestedStyling ? " Av-disableNested" : ""} ${className || ""}`;
133
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Variant, __spreadProps(__spreadValues({ className: classnames }, props), { ref }));
65
+ return /* @__PURE__ */ jsx(Variant, { className: classnames, ...props, ref });
134
66
  });
135
67
 
136
68
  // src/lib/AccordionActions.tsx
137
- var import_AccordionActions = __toESM(require("@mui/material/AccordionActions"));
138
- var import_react2 = require("react");
139
- var import_jsx_runtime2 = require("react/jsx-runtime");
140
- var AccordionActions = (0, import_react2.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_AccordionActions.default, __spreadProps(__spreadValues({}, props), { ref })));
69
+ import MuiAccordionActions from "@mui/material/AccordionActions";
70
+ import { forwardRef as forwardRef2 } from "react";
71
+ import { jsx as jsx2 } from "react/jsx-runtime";
72
+ var AccordionActions = forwardRef2((props, ref) => /* @__PURE__ */ jsx2(MuiAccordionActions, { ...props, ref }));
141
73
 
142
74
  // src/lib/AccordionDetails.tsx
143
- var import_AccordionDetails = __toESM(require("@mui/material/AccordionDetails"));
144
- var import_react3 = require("react");
145
- var import_jsx_runtime3 = require("react/jsx-runtime");
146
- var AccordionDetails = (0, import_react3.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_AccordionDetails.default, __spreadProps(__spreadValues({}, props), { ref })));
75
+ import MuiAccordionDetails from "@mui/material/AccordionDetails";
76
+ import { forwardRef as forwardRef3 } from "react";
77
+ import { jsx as jsx3 } from "react/jsx-runtime";
78
+ var AccordionDetails = forwardRef3((props, ref) => /* @__PURE__ */ jsx3(MuiAccordionDetails, { ...props, ref }));
147
79
 
148
80
  // src/lib/AccordionSummary.tsx
149
- var import_AccordionSummary = __toESM(require("@mui/material/AccordionSummary"));
150
- var import_mui_icon = require("@availity/mui-icon");
81
+ import MuiAccordionSummary from "@mui/material/AccordionSummary";
82
+ import { TriangleExpandIcon } from "@availity/mui-icon";
151
83
 
152
84
  // ../typography/src/lib/Typography.tsx
153
- var import_react4 = require("react");
154
- var import_Typography = __toESM(require("@mui/material/Typography"));
155
- var import_jsx_runtime4 = require("react/jsx-runtime");
156
- var Typography = (0, import_react4.forwardRef)(
157
- (_a, ref) => {
158
- var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
159
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Typography.default, __spreadProps(__spreadValues({}, rest), { ref, children }));
160
- }
85
+ import { forwardRef as forwardRef4 } from "react";
86
+ import { default as MuiTypography } from "@mui/material/Typography";
87
+ import { jsx as jsx4 } from "react/jsx-runtime";
88
+ var Typography = forwardRef4(
89
+ ({ children, ...rest }, ref) => /* @__PURE__ */ jsx4(MuiTypography, { ...rest, ref, children })
161
90
  );
162
91
 
163
92
  // src/lib/AccordionSummary.tsx
164
- var import_react5 = require("react");
165
- var import_styles2 = require("@mui/material/styles");
166
- var import_jsx_runtime5 = require("react/jsx-runtime");
167
- var PrimaryContent = (0, import_styles2.styled)(Typography, {
93
+ import { forwardRef as forwardRef5 } from "react";
94
+ import { styled as styled2 } from "@mui/material/styles";
95
+ import { jsx as jsx5, jsxs } from "react/jsx-runtime";
96
+ var PrimaryContent = styled2(Typography, {
168
97
  name: "MuiAccordionSummary",
169
98
  slot: "AvPrimaryContent",
170
99
  overridesResolver: (props, styles) => styles.avPrimaryContent
@@ -173,34 +102,35 @@ var PrimaryContent = (0, import_styles2.styled)(Typography, {
173
102
  paddingRight: theme.spacing(1),
174
103
  lineHeight: "1.5rem"
175
104
  }));
176
- var SecondaryContent = (0, import_styles2.styled)(Typography, {
105
+ var SecondaryContent = styled2(Typography, {
177
106
  name: "MuiAccordionSummary",
178
107
  slot: "AvSecondaryContent",
179
108
  overridesResolver: (props, styles) => styles.avSecondaryContent
180
109
  })({});
181
- var AccordionSummary = (0, import_react5.forwardRef)((allProps, ref) => {
182
- const _a = allProps, { children, primary: primaryProp, primaryProps, secondary: secondaryProp, secondaryProps } = _a, props = __objRest(_a, ["children", "primary", "primaryProps", "secondary", "secondaryProps"]);
183
- const combinedPrimaryProps = __spreadValues({
110
+ var AccordionSummary = forwardRef5((allProps, ref) => {
111
+ const { children, primary: primaryProp, primaryProps, secondary: secondaryProp, secondaryProps, ...props } = allProps;
112
+ const combinedPrimaryProps = {
184
113
  className: "MuiAccordionSummary-avPrimaryContent",
185
114
  variant: "h6",
186
- component: "div"
187
- }, primaryProps);
188
- const combinedSecondaryProps = __spreadValues({
115
+ component: "div",
116
+ ...primaryProps
117
+ };
118
+ const combinedSecondaryProps = {
189
119
  className: "MuiAccordionSummary-avSecondaryContent",
190
120
  variant: "body1",
191
- component: "div"
192
- }, secondaryProps);
193
- const Primary = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PrimaryContent, __spreadProps(__spreadValues({}, combinedPrimaryProps), { children: primaryProp || children }));
194
- const Secondary = secondaryProp ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SecondaryContent, __spreadProps(__spreadValues({}, combinedSecondaryProps), { children: secondaryProp })) : null;
195
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_AccordionSummary.default, __spreadProps(__spreadValues({}, props), { expandIcon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_mui_icon.TriangleExpandIcon, {}), ref, children: [
121
+ component: "div",
122
+ ...secondaryProps
123
+ };
124
+ const Primary = /* @__PURE__ */ jsx5(PrimaryContent, { ...combinedPrimaryProps, children: primaryProp || children });
125
+ const Secondary = secondaryProp ? /* @__PURE__ */ jsx5(SecondaryContent, { ...combinedSecondaryProps, children: secondaryProp }) : null;
126
+ return /* @__PURE__ */ jsxs(MuiAccordionSummary, { ...props, expandIcon: /* @__PURE__ */ jsx5(TriangleExpandIcon, {}), ref, children: [
196
127
  Primary,
197
128
  Secondary
198
- ] }));
129
+ ] });
199
130
  });
200
- // Annotate the CommonJS export names for ESM import in node:
201
- 0 && (module.exports = {
131
+ export {
202
132
  Accordion,
203
133
  AccordionActions,
204
134
  AccordionDetails,
205
135
  AccordionSummary
206
- });
136
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@availity/mui-accordion",
3
- "version": "2.2.4",
3
+ "version": "3.0.0",
4
4
  "description": "Availity MUI Accordion Component - part of the @availity/element design system",
5
5
  "keywords": [
6
6
  "react",
@@ -21,42 +21,41 @@
21
21
  "author": "Availity Developers <AVOSS@availity.com>",
22
22
  "browser": "./dist/index.js",
23
23
  "main": "./dist/index.js",
24
- "module": "./dist/index.mjs",
25
24
  "types": "./dist/index.d.ts",
26
25
  "exports": {
27
- "./package.json": "./package.json",
28
26
  ".": {
29
27
  "types": "./dist/index.d.ts",
30
- "import": "./dist/index.mjs",
31
- "require": "./dist/index.js"
32
- }
28
+ "import": "./dist/index.js"
29
+ },
30
+ "./package.json": "./package.json"
33
31
  },
34
32
  "scripts": {
35
- "build": "tsup src/index.ts --format esm,cjs --dts",
36
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
33
+ "build": "tsup src/index.ts --format esm --dts",
34
+ "dev": "tsup src/index.ts --format esm --watch --dts",
37
35
  "clean": "rm -rf dist",
38
36
  "clean:nm": "rm -rf node_modules",
39
37
  "publish": "yarn npm publish --tolerate-republish --access public",
40
38
  "publish:canary": "yarn npm publish --access public --tag canary"
41
39
  },
42
40
  "devDependencies": {
43
- "@availity/mui-button": "^2.0.2",
44
- "@availity/mui-chip": "^2.0.5",
45
- "@availity/mui-layout": "^2.0.1",
46
- "@availity/mui-typography": "^2.0.1",
47
- "@mui/material": "^7.3.4",
48
- "react": "19.2.0",
49
- "react-dom": "19.2.0",
50
- "tsup": "^8.4.0",
51
- "typescript": "^5.4.5"
41
+ "@availity/mui-button": "^3.0.0",
42
+ "@availity/mui-chip": "^3.0.0",
43
+ "@availity/mui-layout": "^3.0.0",
44
+ "@availity/mui-typography": "^3.0.0",
45
+ "@mui/material": "^7.3.11",
46
+ "react": "19.2.7",
47
+ "react-dom": "19.2.7",
48
+ "tsup": "^8.5.1",
49
+ "typescript": "^5.9.3"
52
50
  },
53
51
  "peerDependencies": {
54
- "@availity/mui-icon": "^2.1.0",
52
+ "@availity/mui-icon": "^3.0.0",
55
53
  "@mui/material": "^7.0.0",
56
54
  "react": ">=17.0.0"
57
55
  },
58
56
  "publishConfig": {
59
57
  "access": "public"
60
58
  },
61
- "sideEffects": false
59
+ "sideEffects": false,
60
+ "type": "module"
62
61
  }
package/project.json CHANGED
@@ -8,23 +8,20 @@
8
8
  "lint": {
9
9
  "executor": "@nx/eslint:lint",
10
10
  "options": {
11
- "eslintConfig": ".eslintrc.json",
12
11
  "silent": false,
13
12
  "fix": false,
14
13
  "cache": true,
15
14
  "cacheLocation": "./node_modules/.cache/accordion/.eslintcache",
16
15
  "maxWarnings": -1,
17
16
  "quiet": false,
18
- "noEslintrc": false,
19
17
  "hasTypeAwareRules": true,
20
18
  "cacheStrategy": "metadata"
21
19
  }
22
20
  },
23
21
  "test": {
24
- "executor": "@nx/jest:jest",
25
- "outputs": ["{workspaceRoot}/coverage/accordion"],
22
+ "executor": "nx:run-commands",
26
23
  "options": {
27
- "jestConfig": "packages/accordion/jest.config.js"
24
+ "command": "vitest run packages/accordion"
28
25
  }
29
26
  },
30
27
  "version": {
@@ -34,7 +31,9 @@
34
31
  "commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
35
32
  "tagPrefix": "@availity/{projectName}@",
36
33
  "trackDeps": true,
37
- "skipCommitTypes": ["docs"]
34
+ "skipCommitTypes": [
35
+ "docs"
36
+ ]
38
37
  }
39
38
  }
40
39
  }
@@ -23,7 +23,7 @@ const SecondaryContent = styled(Typography, {
23
23
  export type AccordionSummaryProps = {
24
24
  /** The main content element. Aliased by the `children` prop. */
25
25
  primary?: ReactNode;
26
- /** These props will be forwarded to the primary typography component. Update `component` to reflect the correct heading level for accessibility.*/
26
+ /** These props will be forwarded to the primary typography component. Update `component` to reflect the correct heading level for accessibility. */
27
27
  primaryProps?: Omit<TypographyProps, 'className'>;
28
28
  /** The secondary content element. */
29
29
  secondary?: ReactNode;
package/dist/index.d.mts DELETED
@@ -1,56 +0,0 @@
1
- import * as react from 'react';
2
- import { ReactNode } from 'react';
3
- import { AccordionProps as AccordionProps$1 } from '@mui/material/Accordion';
4
- import { AccordionActionsProps as AccordionActionsProps$1 } from '@mui/material/AccordionActions';
5
- import { AccordionDetailsProps as AccordionDetailsProps$1 } from '@mui/material/AccordionDetails';
6
- import { AccordionSummaryProps as AccordionSummaryProps$1 } from '@mui/material/AccordionSummary';
7
- import { TypographyProps as TypographyProps$1 } from '@mui/material/Typography';
8
-
9
- type Variant = 'filled' | 'outlined' | 'flush';
10
- type AccordionProps = {
11
- /** @default "filled" */
12
- variant?: Variant;
13
- /**
14
- * Disable nested styling for child `Accordions`
15
- * @default false
16
- */
17
- disableNestedStyling?: boolean;
18
- } & Omit<AccordionProps$1, 'component' | 'elevation' | 'TransitionComponent' | 'TransitionProps' | 'variant'>;
19
- declare const Accordion: react.ForwardRefExoticComponent<Omit<AccordionProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
20
-
21
- type AccordionActionsProps = AccordionActionsProps$1;
22
- declare const AccordionActions: react.ForwardRefExoticComponent<Omit<AccordionActionsProps$1, "ref"> & react.RefAttributes<unknown>>;
23
-
24
- type AccordionDetailsProps = AccordionDetailsProps$1;
25
- declare const AccordionDetails: react.ForwardRefExoticComponent<Omit<AccordionDetailsProps$1, "ref"> & react.RefAttributes<unknown>>;
26
-
27
- declare module '@mui/material/styles' {
28
- interface TypographyVariants {
29
- agreement: React.CSSProperties;
30
- }
31
- interface TypographyVariantsOptions {
32
- agreement?: React.CSSProperties;
33
- }
34
- }
35
- declare module '@mui/material/Typography' {
36
- interface TypographyPropsVariantOverrides {
37
- agreement: true;
38
- }
39
- }
40
- interface TypographyProps extends TypographyProps$1 {
41
- children?: React.ReactNode;
42
- }
43
-
44
- type AccordionSummaryProps = {
45
- /** The main content element. Aliased by the `children` prop. */
46
- primary?: ReactNode;
47
- /** These props will be forwarded to the primary typography component. Update `component` to reflect the correct heading level for accessibility.*/
48
- primaryProps?: Omit<TypographyProps, 'className'>;
49
- /** The secondary content element. */
50
- secondary?: ReactNode;
51
- /** These props will be forwarded to the secondary typography component. */
52
- secondaryProps?: Omit<TypographyProps, 'className'>;
53
- } & Omit<AccordionSummaryProps$1, 'centerRipple' | 'component' | 'disableRipple' | 'disableTouchRipple' | 'expandIcon' | 'focusRipple' | 'focusVisibleClassname' | 'onFocusVisible' | 'TouchRippleProps' | 'touchRippleRef'>;
54
- declare const AccordionSummary: react.ForwardRefExoticComponent<Omit<AccordionSummaryProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
55
-
56
- export { Accordion, AccordionActions, type AccordionActionsProps, AccordionDetails, type AccordionDetailsProps, type AccordionProps, AccordionSummary, type AccordionSummaryProps };
package/dist/index.mjs DELETED
@@ -1,169 +0,0 @@
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
-
33
- // src/lib/Accordion.tsx
34
- import MuiAccordion from "@mui/material/Accordion";
35
- import { styled } from "@mui/material/styles";
36
- import { forwardRef } from "react";
37
- import { jsx } from "react/jsx-runtime";
38
- var FilledAccordion = styled(MuiAccordion, {
39
- name: "MuiAccordion",
40
- slot: "AvFilled",
41
- overridesResolver: (props, styles) => styles.avFilled
42
- })(({ theme }) => ({
43
- borderColor: theme.palette.grey[100],
44
- "> .MuiAccordion-heading .MuiAccordionSummary-root": {
45
- backgroundColor: theme.palette.grey[100]
46
- }
47
- }));
48
- var OutlinedAccordion = styled(MuiAccordion, {
49
- name: "MuiAccordion",
50
- slot: "AvOutlined",
51
- overridesResolver: (props, styles) => styles.avOutlined
52
- })(({ theme }) => ({
53
- borderColor: theme.palette.divider,
54
- "> .MuiAccordion-heading .MuiAccordionSummary-root:not(.Mui-focusVisible, :hover, :active)": {
55
- backgroundColor: theme.palette.background.paper
56
- },
57
- "> .MuiCollapse-root > .MuiCollapse-wrapper > .MuiCollapse-wrapperInner > .MuiAccordion-region > .MuiAccordionDetails-root:first-of-type": {
58
- borderTop: `1px solid ${theme.palette.divider}`
59
- }
60
- }));
61
- var FlushAccordion = styled(MuiAccordion, {
62
- name: "MuiAccordion",
63
- slot: "AvFlush",
64
- overridesResolver: (props, styles) => styles.avFlush
65
- })(({ theme }) => ({
66
- border: 0,
67
- borderBottom: `1px solid ${theme.palette.divider}`,
68
- "&&": {
69
- borderRadius: 0
70
- },
71
- "&:first-of-type": {
72
- borderTop: `1px solid ${theme.palette.divider}`
73
- },
74
- "> .MuiAccordion-heading .MuiAccordionSummary-root:not(.Mui-focusVisible, :hover, :active)": {
75
- backgroundColor: "transparent"
76
- },
77
- "> .MuiAccordion-heading .MuiAccordionSummary-root": {
78
- padding: 8,
79
- minHeight: 40
80
- },
81
- "> .MuiAccordion-heading .MuiAccordionSummary-root .MuiAccordionSummary-content": {
82
- margin: 0
83
- },
84
- "& .MuiAccordionDetails-root .MuiAccordion-heading": {
85
- borderRadius: 4
86
- }
87
- }));
88
- var VariantComponent = {
89
- filled: FilledAccordion,
90
- outlined: OutlinedAccordion,
91
- flush: FlushAccordion
92
- };
93
- var Accordion = forwardRef((allProps, ref) => {
94
- const _a = allProps, { variant = "filled", disableNestedStyling = false, className } = _a, props = __objRest(_a, ["variant", "disableNestedStyling", "className"]);
95
- const Variant = VariantComponent[variant];
96
- const classnames = `MuiAccordion-av${variant.charAt(0).toUpperCase() + variant.slice(1)}${disableNestedStyling ? " Av-disableNested" : ""} ${className || ""}`;
97
- return /* @__PURE__ */ jsx(Variant, __spreadProps(__spreadValues({ className: classnames }, props), { ref }));
98
- });
99
-
100
- // src/lib/AccordionActions.tsx
101
- import MuiAccordionActions from "@mui/material/AccordionActions";
102
- import { forwardRef as forwardRef2 } from "react";
103
- import { jsx as jsx2 } from "react/jsx-runtime";
104
- var AccordionActions = forwardRef2((props, ref) => /* @__PURE__ */ jsx2(MuiAccordionActions, __spreadProps(__spreadValues({}, props), { ref })));
105
-
106
- // src/lib/AccordionDetails.tsx
107
- import MuiAccordionDetails from "@mui/material/AccordionDetails";
108
- import { forwardRef as forwardRef3 } from "react";
109
- import { jsx as jsx3 } from "react/jsx-runtime";
110
- var AccordionDetails = forwardRef3((props, ref) => /* @__PURE__ */ jsx3(MuiAccordionDetails, __spreadProps(__spreadValues({}, props), { ref })));
111
-
112
- // src/lib/AccordionSummary.tsx
113
- import MuiAccordionSummary from "@mui/material/AccordionSummary";
114
- import { TriangleExpandIcon } from "@availity/mui-icon";
115
-
116
- // ../typography/src/lib/Typography.tsx
117
- import { forwardRef as forwardRef4 } from "react";
118
- import { default as MuiTypography } from "@mui/material/Typography";
119
- import { jsx as jsx4 } from "react/jsx-runtime";
120
- var Typography = forwardRef4(
121
- (_a, ref) => {
122
- var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
123
- return /* @__PURE__ */ jsx4(MuiTypography, __spreadProps(__spreadValues({}, rest), { ref, children }));
124
- }
125
- );
126
-
127
- // src/lib/AccordionSummary.tsx
128
- import { forwardRef as forwardRef5 } from "react";
129
- import { styled as styled2 } from "@mui/material/styles";
130
- import { jsx as jsx5, jsxs } from "react/jsx-runtime";
131
- var PrimaryContent = styled2(Typography, {
132
- name: "MuiAccordionSummary",
133
- slot: "AvPrimaryContent",
134
- overridesResolver: (props, styles) => styles.avPrimaryContent
135
- })(({ theme }) => ({
136
- marginRight: "auto",
137
- paddingRight: theme.spacing(1),
138
- lineHeight: "1.5rem"
139
- }));
140
- var SecondaryContent = styled2(Typography, {
141
- name: "MuiAccordionSummary",
142
- slot: "AvSecondaryContent",
143
- overridesResolver: (props, styles) => styles.avSecondaryContent
144
- })({});
145
- var AccordionSummary = forwardRef5((allProps, ref) => {
146
- const _a = allProps, { children, primary: primaryProp, primaryProps, secondary: secondaryProp, secondaryProps } = _a, props = __objRest(_a, ["children", "primary", "primaryProps", "secondary", "secondaryProps"]);
147
- const combinedPrimaryProps = __spreadValues({
148
- className: "MuiAccordionSummary-avPrimaryContent",
149
- variant: "h6",
150
- component: "div"
151
- }, primaryProps);
152
- const combinedSecondaryProps = __spreadValues({
153
- className: "MuiAccordionSummary-avSecondaryContent",
154
- variant: "body1",
155
- component: "div"
156
- }, secondaryProps);
157
- const Primary = /* @__PURE__ */ jsx5(PrimaryContent, __spreadProps(__spreadValues({}, combinedPrimaryProps), { children: primaryProp || children }));
158
- const Secondary = secondaryProp ? /* @__PURE__ */ jsx5(SecondaryContent, __spreadProps(__spreadValues({}, combinedSecondaryProps), { children: secondaryProp })) : null;
159
- return /* @__PURE__ */ jsxs(MuiAccordionSummary, __spreadProps(__spreadValues({}, props), { expandIcon: /* @__PURE__ */ jsx5(TriangleExpandIcon, {}), ref, children: [
160
- Primary,
161
- Secondary
162
- ] }));
163
- });
164
- export {
165
- Accordion,
166
- AccordionActions,
167
- AccordionDetails,
168
- AccordionSummary
169
- };
package/jest.config.js DELETED
@@ -1,17 +0,0 @@
1
- const global = require('../../jest.config.global');
2
-
3
- module.exports = {
4
- ...global,
5
- displayName: 'accordion',
6
- coverageDirectory: '../../coverage/accordion',
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 },
17
- };
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../dist/out-tsc",
5
- "module": "commonjs",
6
- "types": ["jest", "node", "@testing-library/jest-dom"],
7
- "allowJs": true
8
- },
9
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
10
- }