diff --git a/.eslintignore b/.eslintignore
deleted file mode 100644
index ff1d5a2df1..0000000000
--- a/.eslintignore
+++ /dev/null
@@ -1,13 +0,0 @@
-node_modules
-.yarn
-!.storybook/
-
-docs/
-storybook-docs/
-coverage/
-static/
-
-/**/.docusaurus
-/**/build
-/**/dist
-dist/
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 399df369fe..0000000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,88 +0,0 @@
-{
- "root": true,
- "ignorePatterns": [],
- "plugins": [
- "@nx"
- ],
- "env": {
- "es2020": true
- },
- "overrides": [
- {
- "files": [
- "*.ts",
- "*.tsx",
- "*.js",
- "*.jsx"
- ],
- "rules": {
- "@nx/enforce-module-boundaries": [
- "error",
- {
- "enforceBuildableLibDependency": true,
- "allow": [],
- "depConstraints": [
- {
- "sourceTag": "*",
- "onlyDependOnLibsWithTags": [
- "*"
- ]
- }
- ]
- }
- ]
- }
- },
- {
- "files": [
- "*.ts",
- "*.tsx"
- ],
- "extends": [
- "plugin:@nx/typescript"
- ]
- },
- {
- "files": [
- "*.js",
- "*.jsx"
- ],
- "extends": [
- "plugin:@nx/javascript"
- ]
- },
- {
- "files": [
- "*.spec.ts",
- "*.spec.tsx",
- "*.spec.js",
- "*.spec.jsx",
- "*.test.ts",
- "*.test.tsx",
- "*.test.js",
- "*.test.jsx"
- ],
- "extends": [
- "plugin:@nx/typescript"
- ],
- "env": {}
- },
- {
- "files": "*.json",
- "parser": "jsonc-eslint-parser",
- "rules": {}
- },
- {
- "files": [
- "**/*.test.js",
- "**/*.test.jsx"
- ],
- "env": {
- "jest": true
- }
- }
- ],
- "extends": [
- "plugin:storybook/recommended"
- ]
-}
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index d07013f397..18e0ad1f51 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -51,10 +51,10 @@ yarn start:storybook
All new features should have a unit test added. The unit tests will run when you push your code. If you run the tests on your own the results will be cached. This means subsequent executions of `yarn test` will only run tests against code that has changed.
-Currently you cannot run all of the tests in watchmode. You can run watchmode for one package at a time. Here is an example for the `@availity/mui-alert` package
+You can run tests in watch mode for a specific package:
```bash
-yarn nx test mui-alert --watch
+yarn vitest packages/alert
```
It's always a good idea to make sure you didn't break anything else by running the unit test script
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 6cffb28e20..ae1e0e3764 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -1,21 +1,9 @@
-# For most projects, this workflow file will not need changing; you simply need
-# to commit it to your repository.
-#
-# You may wish to alter this file to override the set of languages analyzed,
-# or to provide custom queries or build logic.
-#
-# ******** NOTE ********
-# We have attempted to detect the languages in your repository. Please check
-# the `language` matrix defined below to confirm you have the correct set of
-# supported CodeQL languages.
-#
name: 'CodeQL'
on:
push:
branches: [main]
pull_request:
- # The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: '37 14 * * 5'
@@ -32,40 +20,19 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: ['javascript']
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
- # Learn more:
- # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
+ language: ['javascript-typescript']
steps:
- name: Checkout repository
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
with:
languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
- # ā¹ļø Command-line programs to run using the OS shell.
- # š https://git.io/JvXDl
-
- # āļø If the Autobuild fails above, remove it and uncomment the following three lines
- # and modify them (or add more) to build your code if your project
- # uses a compiled language
-
- #- run: |
- # make bootstrap
- # make release
-
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml
index ba2fae3a2b..b7a9e31eec 100644
--- a/.github/workflows/commitlint.yml
+++ b/.github/workflows/commitlint.yml
@@ -6,16 +6,22 @@ jobs:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
+ - name: Checkout Code
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
+ - name: Setup Node
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
- node-version: '24'
+ node-version: 24
+ cache: 'yarn'
+ cache-dependency-path: 'yarn.lock'
- - run: yarn install --immutable
+ - name: Install Dependencies
+ run: yarn install --immutable
- - uses: wagoid/commitlint-github-action@9763196e10f27aef304c9b8b660d31d97fce0f99 # v5.5.1
+ - name: Lint Commit Message
+ uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1
env:
NODE_PATH: ${{ github.workspace }}/node_modules
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 58d1de9eb9..ea57059f66 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -1,6 +1,3 @@
-# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
-# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
-
name: Publish Release
on:
@@ -13,43 +10,40 @@ jobs:
runs-on: ubuntu-latest
permissions:
actions: read
+
steps:
- name: Checkout Code
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
ref: 'main'
- name: Derive appropriate SHAs for base and head for `nx affected` commands
- uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
+ uses: nrwl/nx-set-shas@afb73a62d26e41464e9254689e1fd6122ee683c1 # v5.0.1
- name: Set Node Version
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
+ cache: 'yarn'
+ cache-dependency-path: 'yarn.lock'
- - name: Get yarn cache directory path
- id: yarn-cache-dir-path
- run: |
- echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
+ - name: Install Dependencies
+ run: yarn install --immutable
- - name: Restore yarn cache
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
- id: yarn-cache
+ - name: Restore Nx Cache
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
- path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
- key: ${{ runner.os }}-24-yarn-${{ hashFiles('**/yarn.lock') }}
+ path: .nx/cache
+ key: nx-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ github.sha }}
restore-keys: |
- ${{ runner.os }}-24-yarn-
-
- - name: Install Dependencies
- run: yarn install --immutable
+ nx-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-
- name: Lint Affected Code
run: yarn lint:affected
- name: Unit Test Affected Code
- run: yarn test:affected
+ run: yarn test:ci
publish:
if: "${{!contains(github.event.head_commit.message, 'skip ci') && !contains(github.event.head_commit.message, 'Release: Version Updates')}}"
@@ -58,44 +52,37 @@ jobs:
outputs:
has_changes: ${{ steps.changes.outputs.has_changes }}
permissions:
- contents: write # Required for git push and creating tags
- pull-requests: write # Required for creating pull requests
+ contents: write
+ pull-requests: write
id-token: write
steps:
- name: Checkout Code
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
ref: 'main'
- name: Derive appropriate SHAs for base and head for `nx affected` commands
- uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
+ uses: nrwl/nx-set-shas@afb73a62d26e41464e9254689e1fd6122ee683c1 # v5.0.1
- name: Set Node Version
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
+ cache: 'yarn'
+ cache-dependency-path: 'yarn.lock'
- - name: Install latest npm
- run: npm install -g npm@latest
-
- - name: Get yarn cache directory path
- id: yarn-cache-dir-path
- run: |
- echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
+ - name: Install Dependencies
+ run: yarn install --immutable
- - name: Restore yarn cache
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
- id: yarn-cache
+ - name: Restore Nx Cache
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
- path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
- key: ${{ runner.os }}-24-yarn-${{ hashFiles('**/yarn.lock') }}
+ path: .nx/cache
+ key: nx-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ github.sha }}
restore-keys: |
- ${{ runner.os }}-24-yarn-
-
- - name: Install Dependencies
- run: yarn install --immutable
+ nx-${{ runner.os }}-${{ hashFiles('yarn.lock') }}-
- name: Build Packages
run: yarn build
@@ -150,13 +137,14 @@ jobs:
permissions:
contents: write
steps:
- - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
+ - name: Checkout Code
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
ref: ${{ github.sha }}
- name: Set Node Version
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: 'yarn'
diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml
index 4ba8153f51..98f1b112e1 100644
--- a/.github/workflows/pr-build.yml
+++ b/.github/workflows/pr-build.yml
@@ -11,10 +11,6 @@ on:
branches: [main]
jobs:
- # This job will:
- # * build each package
- # * run unit tests
- # * run the linter
build:
runs-on: ${{ matrix.os }}
env:
@@ -22,42 +18,36 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
- node: [20, 22, 24]
+ node: [22, 24]
steps:
- name: Checkout Code
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
- uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
+ uses: nrwl/nx-set-shas@afb73a62d26e41464e9254689e1fd6122ee683c1 # v5.0.1
- name: Set Node Version
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node }}
+ cache: 'yarn'
+ cache-dependency-path: 'yarn.lock'
- - name: Get yarn cache directory path
- id: yarn-cache-dir-path
- run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
+ - name: Install Dependencies
+ run: yarn install --immutable
- - name: Restore yarn cache
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
- id: yarn-cache
+ - name: Restore Nx Cache
+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
- path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
- key: ${{ runner.os }}-${{ matrix.node }}-yarn-${{ hashFiles('yarn.lock') }}
+ path: .nx/cache
+ key: nx-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}-${{ github.sha }}
restore-keys: |
- ${{ runner.os }}-${{ matrix.node }}-yarn-
-
- # - name: Artifactory Check
- # run: yarn check:registry
+ nx-${{ runner.os }}-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}-
- - name: Install Dependencies
- run: yarn install --immutable
-
- - name: Build packages
+ - name: Build Packages
run: yarn build
- name: Build Docs
@@ -68,21 +58,8 @@ jobs:
run: yarn lint:affected
- name: Unit Test
- run: yarn test:affected
+ run: yarn test:ci
- - name: Version Bump Dry Run (only run for ubuntu-latest-24 matching deploy action)
+ - name: Version Bump Dry Run
if: ${{ matrix.node == 24 && matrix.os == 'ubuntu-latest' }}
run: yarn version:dry-run
-
- # - name: Upload coverage report
- # uses: codecov/codecov-action@v3 # FIXME: no CI provider detected
- # with:
- # file: ./coverage/coverage-final.json
- # token: ${{ secrets.CODECOV_TOKEN }}
-
- # - name: Build Docs (Node 16+ Only)
- # if: ${{matrix.node > 14}}
- # run: yarn build:docs
-
- # - name: Build Storybook
- # run: yarn build:storybook
diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml
index 40b95c858d..f119ff4845 100644
--- a/.github/workflows/preview.yml
+++ b/.github/workflows/preview.yml
@@ -1,4 +1,3 @@
-# .github/workflows/preview.yml
name: Deploy PR previews
on:
@@ -21,31 +20,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
- uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
+ uses: nrwl/nx-set-shas@afb73a62d26e41464e9254689e1fd6122ee683c1 # v5.0.1
- name: Set Node Version
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
-
- - name: Get yarn cache directory path
- id: yarn-cache-dir-path
- run: |
- echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
-
- - name: Restore yarn cache
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
- id: yarn-cache
- with:
- path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
- key: ${{ runner.os }}-24-yarn-${{ hashFiles('**/yarn.lock') }}
- restore-keys: |
- ${{ runner.os }}-24-yarn-
+ cache: 'yarn'
+ cache-dependency-path: 'yarn.lock'
- name: Install Dependencies
run: yarn install --immutable
@@ -69,11 +56,28 @@ jobs:
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
with:
script: |
- github.rest.issues.createComment({
+ const body = 'š **Preview deployed!**\n\nš [View Storybook Preview](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.number }}/)';
+ const { data: comments } = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
- body: 'š **Preview deployed!**\n\nš [View Storybook Preview](https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.number }}/)' })
+ });
+ const existing = comments.find(c => c.body.includes('View Storybook Preview'));
+ if (existing) {
+ await github.rest.issues.updateComment({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ comment_id: existing.id,
+ body,
+ });
+ } else {
+ await github.rest.issues.createComment({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ body,
+ });
+ }
cleanup-preview:
if: ${{ github.event.action == 'closed' && github.actor != 'dependabot[bot]' }}
@@ -82,7 +86,7 @@ jobs:
contents: write
steps:
- name: Checkout gh-pages
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
ref: gh-pages
diff --git a/.github/workflows/repo-metrics.yml b/.github/workflows/repo-metrics.yml
index 50ae12c0b5..bde0a8ed01 100644
--- a/.github/workflows/repo-metrics.yml
+++ b/.github/workflows/repo-metrics.yml
@@ -12,7 +12,7 @@ jobs:
REPO: ${{ github.event.repository.name }}
steps:
- name: Check out the repository to the runner
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
+ uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Install Dependencies
diff --git a/.husky/commit-msg b/.husky/commit-msg
index 0a4b97de53..00fe3c878a 100755
--- a/.husky/commit-msg
+++ b/.husky/commit-msg
@@ -1 +1 @@
-npx --no -- commitlint --edit $1
+yarn commitlint --edit "$1"
diff --git a/.husky/pre-commit b/.husky/pre-commit
index e146195eb4..8679759949 100755
--- a/.husky/pre-commit
+++ b/.husky/pre-commit
@@ -1 +1 @@
-yarn lint:affected
+yarn lint-staged --relative
diff --git a/.lintstagedrc.js b/.lintstagedrc.js
index 50987b893c..869772af85 100644
--- a/.lintstagedrc.js
+++ b/.lintstagedrc.js
@@ -1,5 +1,5 @@
-module.exports = {
- '*.{js,ts,tsx}': ['yarn nx affected --target=lint --fix --files', 'prettier --write'],
+export default {
+ '*.{js,jsx,ts,tsx}': ['eslint --fix', 'prettier --write'],
'*.json': ['prettier --write'],
- '*.{md, mdx}': ['prettier --write'],
+ '*.md': ['prettier --write'],
};
diff --git a/.prettierrc b/.prettierrc
deleted file mode 100644
index c523e2ff09..0000000000
--- a/.prettierrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "singleQuote": true,
- "trailingComma": "es5",
- "printWidth": 120,
- "tabWidth": 2
-}
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 0000000000..4f893e8b23
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,6 @@
+export default {
+ printWidth: 120,
+ singleQuote: true,
+ trailingComma: 'es5',
+ tabWidth: 2,
+};
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index 6a302fe536..af58af8740 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,8 +1,3 @@
{
- "recommendations": [
- "nrwl.angular-console",
- "esbenp.prettier-vscode",
- "dbaeumer.vscode-eslint",
- "firsttris.vscode-jest-runner"
- ]
+ "recommendations": ["nrwl.angular-console", "esbenp.prettier-vscode", "dbaeumer.vscode-eslint", "vitest.explorer"]
}
diff --git a/README.md b/README.md
index 6a123513f9..f9d58abdfc 100644
--- a/README.md
+++ b/README.md
@@ -42,15 +42,17 @@ const App = () => {
## Development
-The currently recommended version of node to use when developing in this repo is: `v20`. We recommend using [fnm](https://github.com/Schniz/fnm#readme) to have your node version automatically changed when you `cd` into the repo.
+The currently recommended version of node to use when developing in this repo is: `v24`. We recommend using [fnm](https://github.com/Schniz/fnm#readme) to have your node version automatically changed when you `cd` into the repo.
-We use `yarn berry` (aka yarn v3) to manage dependencies. Install `yarn` globally:
+> **Note:** This is an ESM-only monorepo. All packages are published as ES modules.
+
+We use `yarn berry` (aka yarn v4) to manage dependencies. Install `yarn` globally:
```sh
npm i -g yarn
```
-> This command will install yarn v1. When we run the next command then yarn v3 will be added.
+> This command will install yarn v1. When we run the next command then yarn v4 will be added.
Then install the dependencies:
diff --git a/apps/element-storybook/src/upgrading-to-v2.mdx b/apps/element-storybook/src/upgrading-to-v2.mdx
index 8bd37f68a9..3271d65530 100644
--- a/apps/element-storybook/src/upgrading-to-v2.mdx
+++ b/apps/element-storybook/src/upgrading-to-v2.mdx
@@ -46,9 +46,9 @@ We are cleaning up our exports to no longer include internal utils/components
- Form Utils: `InputPropOverrides`, `SearchByContainer`, `SelectDivider`, `SelectExpandIcon`, `SelectPropOverrides`, `SelectAccessibilityOverrides`
- Spaces: `INITIAL_STATE`
-#### Jest Testing in `@availity/workflow` Apps
+#### Testing in `@availity/workflow` Apps
-Depending on your configuration you may need to add `@availity` and `axios` to the ignore transform list
+Element v2 packages are now published as ESM-only. If your test runner does not support ESM natively, you may need to transform `@availity` packages:
```js
// workflow.js
@@ -59,6 +59,8 @@ Depending on your configuration you may need to add `@availity` and `axios` to t
}
```
+If using Vitest, no additional configuration is needed.
+
### Non-Impact Changes
The following changes should not require any action:
diff --git a/apps/element-storybook/src/upgrading-to-v3.mdx b/apps/element-storybook/src/upgrading-to-v3.mdx
new file mode 100644
index 0000000000..f2a3c41d5c
--- /dev/null
+++ b/apps/element-storybook/src/upgrading-to-v3.mdx
@@ -0,0 +1,73 @@
+import { Meta } from '@storybook/addon-docs/blocks';
+
+
+
+## Upgrading to Element v3
+
+Element v3 modernizes the build and development toolchain. Packages are now published as **ESM-only** and the minimum Node.js version has been raised.
+
+### Breaking Changes
+
+#### Node.js 22+ Required
+
+Node.js 20 is no longer supported. Update your project to Node.js 22 or 24.
+
+```bash
+# Check your version
+node --version
+
+# If using fnm
+fnm install 24
+fnm use 24
+```
+
+#### ESM-Only Packages
+
+All `@availity/element` and `@availity/mui-*` packages are now published as ES modules only. CommonJS `require()` is no longer supported.
+
+**If you're using standard `import` syntax, no changes are needed.**
+
+If you have any dynamic `require()` calls referencing these packages, switch to dynamic `import()`:
+
+```diff
+- const { Button } = require('@availity/element');
++ const { Button } = await import('@availity/element');
+```
+
+#### Test Configuration
+
+The internal test runner has moved from Jest to Vitest. This does **not** affect consumers unless you are importing test utilities from element packages.
+
+If your project uses Jest and encounters transform errors with `@availity` packages (because they are now ESM), add them to your transform ignore list:
+
+```js
+// jest.config.js
+module.exports = {
+ transformIgnorePatterns: [
+ 'node_modules/(?!(@availity|axios)/)'
+ ],
+};
+```
+
+Or in `@availity/workflow`:
+
+```js
+// workflow.js
+config.development.jestOverrides = {
+ transformIgnorePatterns: [
+ 'node_modules/(?!(@availity|axios)/)'
+ ],
+};
+```
+
+If using Vitest, no additional configuration is needed.
+
+### Non-Breaking Changes
+
+These changes are internal and should not require any action from consumers:
+
+- Build tooling migrated from Jest to Vitest
+- ESLint upgraded from v8 (legacy config) to v9 (flat config)
+- Internal build output changed from dual CJS/ESM to ESM-only
+- TypeScript target updated to ESNext
+- Dependency versions updated (React 19.2.7, MUI 7.3.11)
diff --git a/apps/nx-generator-e2e/jest.config.ts b/apps/nx-generator-e2e/jest.config.ts
index a731b1b96e..cb5338fe86 100644
--- a/apps/nx-generator-e2e/jest.config.ts
+++ b/apps/nx-generator-e2e/jest.config.ts
@@ -1,7 +1,5 @@
-/* eslint-disable */
export default {
displayName: 'nx-generator-e2e',
- preset: '../../jest.preset.js',
globals: {},
transform: {
'^.+\\.[tj]s$': [
diff --git a/apps/nx-generator-e2e/tsconfig.spec.json b/apps/nx-generator-e2e/tsconfig.spec.json
index f6d8ffcc9f..b506d384ed 100644
--- a/apps/nx-generator-e2e/tsconfig.spec.json
+++ b/apps/nx-generator-e2e/tsconfig.spec.json
@@ -5,5 +5,5 @@
"module": "commonjs",
"types": ["jest", "node"]
},
- "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"]
+ "include": ["jest.config.ts", "**/*.spec.ts"]
}
diff --git a/commitlint.config.js b/commitlint.config.js
index c3c593496d..22fc3018a4 100644
--- a/commitlint.config.js
+++ b/commitlint.config.js
@@ -1,4 +1,13 @@
-module.exports = {
+export default {
extends: ['@commitlint/config-conventional', '@commitlint/config-nx-scopes'],
- rules: {},
+ parserPreset: {
+ parserOpts: {
+ headerPattern: /^(\w*)(?:\((.*)\))?!?:\s(.*)$/,
+ headerCorrespondence: ['type', 'scope', 'subject'],
+ },
+ },
+ rules: {
+ 'header-max-length': [0, 'always', 85],
+ 'scope-empty': [0, 'never'],
+ },
};
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000000..4ddffe7693
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,94 @@
+import browser from 'eslint-config-availity/browser';
+import nxPlugin from '@nx/eslint-plugin';
+import storybook from 'eslint-plugin-storybook';
+
+export default [
+ ...browser,
+ ...storybook.configs['flat/recommended'],
+ {
+ plugins: { '@nx': nxPlugin },
+ rules: {
+ '@nx/enforce-module-boundaries': [
+ 'error',
+ {
+ enforceBuildableLibDependency: true,
+ allow: [],
+ depConstraints: [{ sourceTag: '*', onlyDependOnLibsWithTags: ['*'] }],
+ },
+ ],
+ // MUI wrapping pattern uses `import { default as MuiX }` intentionally
+ 'unicorn/no-named-default': 'off',
+ 'import/no-named-default': 'off',
+ // MUI component composition uses children prop pattern
+ 'react/no-children-prop': 'off',
+ // Design system components wrap props through without destructuring
+ 'react/destructuring-assignment': 'off',
+ // Circular deps are common in component re-exports (index.ts barrels)
+ 'import/no-cycle': 'off',
+ // MUI overrides use consistent-return patterns
+ 'consistent-return': 'off',
+ // MUI render prop patterns use nested components
+ 'react/no-unstable-nested-components': 'off',
+ // Fragments needed for TypeScript generics in JSX
+ 'react/jsx-no-useless-fragment': 'off',
+ // MUI default export re-export pattern
+ 'import/no-named-as-default': 'off',
+ // Design system context providers construct values in render
+ 'react/jsx-no-constructed-context-values': 'warn',
+ // MUI Link component wraps anchor
+ 'jsx-a11y/anchor-is-valid': 'warn',
+ // Ref assignment patterns in design system
+ 'no-return-assign': 'off',
+ // Design system uses array filtering patterns
+ 'unicorn/no-array-callback-reference': 'off',
+ 'unicorn/prefer-array-some': 'warn',
+ },
+ },
+ {
+ ignores: [
+ '.nx',
+ '.yarn',
+ '.storybook',
+ 'coverage',
+ '**/dist',
+ '**/node_modules',
+ '**/storybook-static',
+ '**/*.stories.@(js|jsx|ts|tsx|mdx)',
+ // nx-generator uses CJS patterns ā lint separately when modernized
+ 'packages/nx-generator/**',
+ ],
+ },
+ {
+ files: ['**/*.test.*', '**/*.spec.*'],
+ rules: {
+ // Test files commonly have button elements without explicit type
+ 'react/button-has-type': 'off',
+ 'jsx-a11y/label-has-associated-control': 'off',
+ // Test files may import across module boundaries for integration tests
+ '@nx/enforce-module-boundaries': 'warn',
+ // Some tests verify rendering without explicit assertions
+ 'vitest/expect-expect': 'off',
+ },
+ },
+ {
+ files: ['packages/icon/**'],
+ rules: {
+ // Pre-existing pattern in icon SVG parsing
+ 'unicorn/no-unreadable-array-destructuring': 'off',
+ },
+ },
+ {
+ files: ['packages/spaces/**'],
+ rules: {
+ // Pre-existing conditional hook pattern ā needs refactor (tracked)
+ 'react-hooks/rules-of-hooks': 'warn',
+ 'array-callback-return': 'warn',
+ },
+ },
+ {
+ files: ['packages/empty-state/**', '**/__mocks__/**'],
+ rules: {
+ 'unicorn/prefer-module': 'off',
+ },
+ },
+];
diff --git a/jest.config.global.js b/jest.config.global.js
deleted file mode 100644
index 5214aceebb..0000000000
--- a/jest.config.global.js
+++ /dev/null
@@ -1,27 +0,0 @@
-const { pathsToModuleNameMapper } = require('ts-jest');
-
-const { compilerOptions } = require('./tsconfig.base.json');
-
-module.exports = {
- setupFiles: ['../../jest.polyfills.global.js'],
- setupFilesAfterEnv: ['@testing-library/jest-dom'],
- globalSetup: '../../jest.setup.global.js',
- transform: {
- '^.+\\.(ts|tsx|js|html)$': ['ts-jest', { tsconfig: '/tsconfig.spec.json' }],
- },
- moduleFileExtensions: ['ts', 'js', 'tsx'],
- preset: '../../jest.preset.js',
- testEnvironment: 'jest-environment-jsdom-global',
- globals: {
- jsdom: true,
- },
- coverageReporters: ['json-summary'],
- moduleNameMapper: {
- uuid: require.resolve('uuid'),
- ...pathsToModuleNameMapper(compilerOptions.paths, { prefix: '/../../' }),
- '\\.(css|scss)$': 'identity-obj-proxy',
- },
- testEnvironmentOptions: {
- customExportConditions: [''],
- },
-};
diff --git a/jest.polyfills.global.js b/jest.polyfills.global.js
deleted file mode 100644
index 61839d252b..0000000000
--- a/jest.polyfills.global.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// jest.polyfills.js
-/**
- * @note The block below contains polyfills for Node.js globals
- * required for Jest to function when running JSDOM tests.
- * These HAVE to be require's and HAVE to be in this exact
- * order, since "undici" depends on the "TextEncoder" global API.
- *
- * Consider migrating to a more modern test runner if
- * you don't want to deal with this.
- *
- * The maintainers of msw have a package, `jest-fixed-jsdom`,
- * that handles this test environment setup. It's
- * currently only 2 months old and on v0.0.2 - but could
- * replace this file and the `undici` dependency.
- * https://github.com/mswjs/jest-fixed-jsdom#readme
- */
-
-const { TextDecoder, TextEncoder } = require('node:util');
-
-Object.defineProperties(globalThis, {
- TextDecoder: { value: TextDecoder },
- TextEncoder: { value: TextEncoder },
-});
-
-const { ReadableStream } = require('node:stream/web');
-
-Object.defineProperties(globalThis, {
- ReadableStream: { value: ReadableStream },
-});
-
-const { Blob, File } = require('node:buffer');
-const { fetch, Headers, FormData, Request, Response } = require('undici');
-
-Object.defineProperties(globalThis, {
- fetch: { value: fetch, writable: true },
- Blob: { value: Blob },
- File: { value: File },
- Headers: { value: Headers },
- FormData: { value: FormData },
- Request: { value: Request, configurable: true },
- Response: { value: Response, configurable: true },
-});
-
-const crypto = require('crypto');
-
-Object.defineProperty(globalThis, 'crypto', {
- value: {
- randomUUID: () => crypto.randomUUID(),
- },
-});
diff --git a/jest.preset.js b/jest.preset.js
deleted file mode 100644
index 0594a2921e..0000000000
--- a/jest.preset.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const nxPreset = require('@nx/jest/preset');
-
-module.exports = {
- ...nxPreset,
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: "nx affected --targets=test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/jest.setup.global.js b/jest.setup.global.js
deleted file mode 100644
index 6e1fbf41d0..0000000000
--- a/jest.setup.global.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = async () => {
- process.env.TZ = 'UTC';
-};
diff --git a/nx.json b/nx.json
index 65b3615135..1cc2178921 100644
--- a/nx.json
+++ b/nx.json
@@ -1,5 +1,13 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
+ "extends": "@nx/workspace/presets/npm.json",
+ "defaultBase": "main",
+ "useInferencePlugins": false,
+ "pluginsConfig": {
+ "@nx/js": {
+ "analyzeSourceFiles": true
+ }
+ },
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
@@ -10,36 +18,24 @@
"inputs": ["default", "^production", "{projectRoot}/.storybook/**/*", "{projectRoot}/tsconfig.storybook.json"],
"cache": true
},
- "@nx/jest:jest": {
+ "test": {
"cache": true,
- "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
- "options": {
- "passWithNoTests": true
- },
- "configurations": {
- "ci": {
- "ci": true,
- "codeCoverage": true
- }
- }
+ "inputs": ["default", "^production", "{workspaceRoot}/vitest.config.ts", "{workspaceRoot}/vitest.setup.ts"]
},
"@nx/eslint:lint": {
- "inputs": ["default", "{workspaceRoot}/.eslintrc.json"],
+ "inputs": ["default", "{workspaceRoot}/eslint.config.js"],
"cache": true
},
- "@nx/js:tsc": {
- "cache": true,
- "dependsOn": ["^build"],
- "inputs": ["production", "^production"]
+ "version": {
+ "dependsOn": ["^version"]
}
},
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"production": [
"default",
- "!{projectRoot}/.eslintrc.json",
+ "!{projectRoot}/eslint.config.js",
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
- "!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/vite.config.[jt]s",
"!{projectRoot}/.storybook/**/*",
"!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
@@ -54,21 +50,9 @@
},
"generators": {
"@nx/react": {
- "application": {
- "babel": true
- },
"library": {
- "unitTestRunner": "jest"
+ "unitTestRunner": "vitest"
}
}
- },
- "targetDependencies": {
- "version": [
- {
- "target": "version",
- "projects": "dependencies"
- }
- ]
- },
- "useInferencePlugins": false
+ }
}
diff --git a/package.json b/package.json
index 1e99845a9c..928d3cb5fd 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"name": "availity-element-monorepo",
"version": "0.0.0",
"private": true,
+ "type": "module",
"description": "React component library for the Availity design system",
"repository": "https://github.com/Availity/element.git",
"license": "MIT",
@@ -11,43 +12,42 @@
],
"engines": {
"yarn": "^4.0.0",
- "node": "^20.0.0 | ^22.0.0 | ^24.0.0"
+ "node": "^22.0.0 || ^24.0.0"
},
"scripts": {
- "build": "nx run-many --target=build --all",
+ "build": "nx run-many --target=build",
"build:storybook": "nx build-storybook element-storybook",
"build:storybook:ci": "nx run element-storybook:build-storybook:ci",
- "clean": "nx run-many --target=clean --all --exclude=nx-generator",
+ "clean": "nx run-many --target=clean --exclude=nx-generator",
"create:generator": "nx generate @nx/plugin:generator ${1} --project=${0}",
"create:package": "nx generate @availity/nx-generator:nx-generator ${0}",
"create:plugin": "nx g @nx/plugin:plugin ${0}",
- "lint": "nx run-many --target=lint --all --exclude=nx-generator",
+ "lint": "nx run-many --target=lint --exclude=nx-generator",
"lint:affected": "nx affected --target=lint --exclude=nx-generator",
- "postinstall": "is-ci || husky install",
+ "postinstall": "is-ci || husky",
"publish:affected": "nx affected --target=publish",
"publish:affected:canary": "nx affected --target=publish:canary",
"start": "yarn start:storybook",
"start:storybook": "nx storybook element-storybook",
- "test": "nx run-many --target=test --all --runInBand",
- "test:affected": "nx affected --target=test --runInBand",
- "test:coverage": "nx run-many --target=test --all --parallel=3 --runInBand --coverage --no-cache && node ./scripts/merge-coverage.js",
+ "test": "nx run-many --target=test",
+ "test:affected": "nx affected --target=test",
+ "test:ci": "vitest run --coverage",
+ "test:coverage": "nx run-many --target=test --parallel=3 --no-cache -- --coverage && node ./tools/scripts/merge-coverage.cjs",
"version:affected": "nx affected --target=version --parallel=1",
"version:affected:canary": "nx affected --target=version --parallel=1 --verbose --preid=alpha --releaseAs=prerelease ${*}",
- "version:dry-run": "nx affected --target version --dryRun --parallel=1 --verbose"
+ "version:dry-run": "nx affected --target version --dryRun --parallel=1 --verbose",
+ "prepare": "husky"
},
"devDependencies": {
- "@babel/core": "^7.27.1",
- "@babel/preset-react": "^7.27.1",
- "@commitlint/cli": "^18.6.1",
- "@commitlint/config-conventional": "^18.6.3",
- "@commitlint/config-nx-scopes": "^18.6.1",
- "@jscutlery/semver": "~5.7.0",
+ "@commitlint/cli": "^21.0.2",
+ "@commitlint/config-conventional": "^21.0.2",
+ "@commitlint/config-nx-scopes": "^21.0.2",
+ "@jscutlery/semver": "^5.8.1",
"@mui/lab": "7.0.1-beta.18",
- "@mui/x-data-grid": "^8.16.0",
+ "@mui/x-data-grid": "^8.29.1",
"@nx/devkit": "22.5.3",
"@nx/eslint": "22.5.3",
"@nx/eslint-plugin": "22.5.3",
- "@nx/jest": "22.5.3",
"@nx/js": "22.5.3",
"@nx/plugin": "22.5.3",
"@nx/react": "22.5.3",
@@ -59,49 +59,38 @@
"@storybook/addon-themes": "10.2.13",
"@storybook/react-vite": "10.2.13",
"@testing-library/dom": "^10.4.1",
- "@testing-library/jest-dom": "^6.6.3",
- "@testing-library/react": "16.1.0",
+ "@testing-library/jest-dom": "^6.9.1",
+ "@testing-library/react": "16.3.2",
"@testing-library/user-event": "^14.6.1",
- "@types/jest": "30.0.0",
- "@types/node": "24.10.0",
- "@types/qs": "^6.9.18",
- "@types/react": "19.2.2",
- "@types/react-dom": "19.2.2",
- "@typescript-eslint/eslint-plugin": "8.52.0",
- "@typescript-eslint/parser": "8.52.0",
- "babel-jest": "30.0.5",
- "eslint": "8.57.0",
- "eslint-config-prettier": "10.1.1",
- "eslint-plugin-import": "2.31.0",
- "eslint-plugin-jsx-a11y": "6.10.1",
- "eslint-plugin-react": "7.32.2",
- "eslint-plugin-react-hooks": "7.0.0",
- "eslint-plugin-storybook": "10.1.4",
+ "@types/node": "24.13.2",
+ "@types/qs": "^6.15.1",
+ "@types/react": "19.2.17",
+ "@types/react-dom": "19.2.3",
+ "@vitest/coverage-v8": "^4.1.9",
+ "eslint": "^9.39.4",
+ "eslint-config-availity": "^14.0.0",
+ "eslint-plugin-storybook": "10.4.5",
"glob": "^7.2.3",
"husky": "^9.1.7",
"is-ci": "^4.1.0",
- "jest": "30.0.5",
- "jest-environment-jsdom": "30.0.5",
- "jest-environment-jsdom-global": "^4.0.0",
- "jest-util": "30.0.5",
"jiti": "2.4.2",
- "jsdom": "^26.0.0",
+ "jsdom": "^29.1.1",
"jsonc-eslint-parser": "^2.4.0",
"libphonenumber-js": "1.11.4",
- "lint-staged": "^15.5.0",
+ "lint-staged": "^17.0.7",
"nx": "22.5.3",
- "prettier": "^3.5.3",
- "react-hook-form": "^7.55.0",
+ "prettier": "^3.8.4",
+ "react-hook-form": "^7.79.0",
"react-imask": "7.6.1",
"react-number-format": "5.4.4",
"remark-gfm": "^4.0.1",
- "ts-jest": "29.4.5",
- "ts-node": "10.9.1",
"tslib": "^2.8.1",
+ "tsup": "^8.5.1",
"typescript": "5.9.3",
- "undici": "^5.29.0",
- "vite": "7.2.6",
- "vite-plugin-node-polyfills": "^0.24.0"
+ "vite": "7.3.5",
+ "vite-plugin-node-polyfills": "^0.24.0",
+ "vite-tsconfig-paths": "^6.1.1",
+ "vitest": "^4.1.9"
},
"packageManager": "yarn@4.12.0",
"msw": {
diff --git a/packages/accordion/jest.config.js b/packages/accordion/jest.config.js
deleted file mode 100644
index 577cee5461..0000000000
--- a/packages/accordion/jest.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'accordion',
- coverageDirectory: '../../coverage/accordion',
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: From within the project directory, run "nx test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/packages/accordion/package.json b/packages/accordion/package.json
index f44f9cbb04..d8a12d2f36 100644
--- a/packages/accordion/package.json
+++ b/packages/accordion/package.json
@@ -21,19 +21,17 @@
"author": "Availity Developers ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
@@ -44,11 +42,11 @@
"@availity/mui-chip": "workspace:^",
"@availity/mui-layout": "workspace:^",
"@availity/mui-typography": "workspace:^",
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@availity/mui-icon": "workspace:^",
@@ -58,5 +56,6 @@
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/accordion/project.json b/packages/accordion/project.json
index 200c96b370..810515d35b 100644
--- a/packages/accordion/project.json
+++ b/packages/accordion/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/accordion/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/accordion"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/accordion/jest.config.js"
+ "command": "vitest run packages/accordion"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/accordion/src/lib/AccordionSummary.tsx b/packages/accordion/src/lib/AccordionSummary.tsx
index 52be7d0f62..f65f30b7c5 100644
--- a/packages/accordion/src/lib/AccordionSummary.tsx
+++ b/packages/accordion/src/lib/AccordionSummary.tsx
@@ -23,7 +23,7 @@ const SecondaryContent = styled(Typography, {
export type AccordionSummaryProps = {
/** The main content element. Aliased by the `children` prop. */
primary?: ReactNode;
- /** These props will be forwarded to the primary typography component. Update `component` to reflect the correct heading level for accessibility.*/
+ /** These props will be forwarded to the primary typography component. Update `component` to reflect the correct heading level for accessibility. */
primaryProps?: Omit;
/** The secondary content element. */
secondary?: ReactNode;
diff --git a/packages/accordion/tsconfig.spec.json b/packages/accordion/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/accordion/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/alert/jest.config.js b/packages/alert/jest.config.js
deleted file mode 100644
index 4cac26833c..0000000000
--- a/packages/alert/jest.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'alert',
- coverageDirectory: '../../coverage/alert',
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: From within the project directory, run "nx test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/packages/alert/package.json b/packages/alert/package.json
index 46ecc55180..0893c8df5f 100644
--- a/packages/alert/package.json
+++ b/packages/alert/package.json
@@ -22,19 +22,17 @@
"author": "Roxanne Young ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
@@ -45,11 +43,11 @@
"@availity/mui-icon": "workspace:*"
},
"devDependencies": {
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@mui/material": "^7.0.0",
@@ -58,5 +56,6 @@
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/alert/project.json b/packages/alert/project.json
index 142b11f918..1d78811a63 100644
--- a/packages/alert/project.json
+++ b/packages/alert/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/alert/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/alert"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/alert/jest.config.js"
+ "command": "vitest run packages/alert"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/alert/tsconfig.spec.json b/packages/alert/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/alert/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/authorize/jest.config.js b/packages/authorize/jest.config.js
deleted file mode 100644
index 4f51f1ea1b..0000000000
--- a/packages/authorize/jest.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'authorize',
- coverageDirectory: '../../coverage/authorize'
-};
diff --git a/packages/authorize/package.json b/packages/authorize/package.json
index b64d8c0091..4abafe6b94 100644
--- a/packages/authorize/package.json
+++ b/packages/authorize/package.json
@@ -21,42 +21,42 @@
"author": "Availity Developers ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
"publish:canary": "yarn npm publish --access public --tag canary"
},
"dependencies": {
- "@availity/authorize": "^5.0.6",
- "@availity/mui-block-ui": "workspace:^",
- "@tanstack/react-query": "^4.36.1"
+ "@availity/authorize": "^6.0.1",
+ "@availity/mui-block-ui": "workspace:^"
},
"devDependencies": {
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "@tanstack/react-query": "^5.101.0",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@mui/material": "^7.0.0",
+ "@tanstack/react-query": "^5.101.0",
"react": ">=17.0.0"
},
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/authorize/project.json b/packages/authorize/project.json
index bb057926d1..87b16e9044 100644
--- a/packages/authorize/project.json
+++ b/packages/authorize/project.json
@@ -8,25 +8,23 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
- "lintFilePatterns": ["packages/authorize/**/*.{js,ts}"],
+ "lintFilePatterns": [
+ "packages/authorize/**/*.{js,ts}"
+ ],
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/authorize/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/authorize"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/authorize/jest.config.js",
- "passWithNoTests": true
+ "command": "vitest run packages/authorize"
}
},
"version": {
@@ -36,7 +34,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/authorize/tsconfig.spec.json b/packages/authorize/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/authorize/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/autocomplete/jest.config.js b/packages/autocomplete/jest.config.js
deleted file mode 100644
index 3ec3efe49f..0000000000
--- a/packages/autocomplete/jest.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'autocomplete',
- coverageDirectory: '../../coverage/autocomplete',
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: From within the project directory, run "nx test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/packages/autocomplete/package.json b/packages/autocomplete/package.json
index aff29e1478..22bfae751f 100644
--- a/packages/autocomplete/package.json
+++ b/packages/autocomplete/package.json
@@ -21,19 +21,17 @@
"author": "Availity Developers ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"bundlesize": "bundlesize",
@@ -41,31 +39,32 @@
"publish:canary": "yarn npm publish --access public --tag canary"
},
"dependencies": {
- "@mui/types": "^7.4.7",
- "qs": "^6.15.0"
+ "@mui/types": "^7.4.12",
+ "qs": "^6.15.2"
},
"devDependencies": {
- "@availity/api-axios": "^12.2.1",
+ "@availity/api-axios": "^13.2.0",
"@availity/mui-form-utils": "workspace:^",
"@availity/mui-icon": "workspace:^",
"@availity/mui-textfield": "workspace:^",
- "@mui/material": "^7.3.4",
- "@tanstack/react-query": "^4.36.1",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "@tanstack/react-query": "^5.101.0",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@availity/api-axios": "^12.0.0",
"@availity/mui-form-utils": "workspace:^",
"@availity/mui-textfield": "workspace:^",
"@mui/material": "^7.0.0",
- "@tanstack/react-query": "^4.36.1",
+ "@tanstack/react-query": "^5.101.0",
"react": ">=17.0.0"
},
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/autocomplete/project.json b/packages/autocomplete/project.json
index 9db0bbc585..70421263b0 100644
--- a/packages/autocomplete/project.json
+++ b/packages/autocomplete/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/autocomplete/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/autocomplete"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/autocomplete/jest.config.js"
+ "command": "vitest run packages/autocomplete"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/autocomplete/src/lib/AsyncAutocomplete.test.tsx b/packages/autocomplete/src/lib/AsyncAutocomplete.test.tsx
index 31464a0940..878972cd31 100644
--- a/packages/autocomplete/src/lib/AsyncAutocomplete.test.tsx
+++ b/packages/autocomplete/src/lib/AsyncAutocomplete.test.tsx
@@ -1,11 +1,9 @@
-import { act, fireEvent, render, screen, waitFor } from '@testing-library/react';
+import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import AvApi, { ApiConfig } from '@availity/api-axios';
-/* eslint-disable @nx/enforce-module-boundaries */
import { server } from '@availity/mock/src/lib/server';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { AsyncAutocomplete } from './AsyncAutocomplete';
-import { mock } from 'node:test';
const api = new AvApi({ name: 'example' } as ApiConfig);
@@ -62,7 +60,7 @@ describe('AsyncAutocomplete', () => {
// Remove any handlers you may have added
// in individual tests (runtime handlers).
server.resetHandlers();
- jest.restoreAllMocks();
+ vi.restoreAllMocks();
});
// terminate the server
@@ -184,7 +182,7 @@ describe('AsyncAutocomplete', () => {
});
test('should call loadOptions when scroll to the bottom', async () => {
- const mockLoadOptions = jest.fn(loadOptions);
+ const mockLoadOptions = vi.fn(loadOptions);
const client = new QueryClient();
render(
@@ -221,7 +219,7 @@ describe('AsyncAutocomplete', () => {
});
test('should call loadOptions if more options available and not enough options for scroll', async () => {
- const mockLoadOptions = jest.fn(loadOptions);
+ const mockLoadOptions = vi.fn(loadOptions);
const client = new QueryClient();
render(
@@ -264,7 +262,7 @@ describe('AsyncAutocomplete', () => {
test('should search with input value', async () => {
- const mockLoadOptions = jest.fn(async () => ({ options: [{ label: 'Option 1' }], hasMore: false, offset: 50 }));
+ const mockLoadOptions = vi.fn(async () => ({ options: [{ label: 'Option 1' }], hasMore: false, offset: 50 }));
const client = new QueryClient();
render(
@@ -288,7 +286,7 @@ describe('AsyncAutocomplete', () => {
});
test('should make call when watchParams changes', async () => {
- const mockLoadOptions = jest.fn(async () => ({ options: [{ label: 'Option 1' }], hasMore: false, offset: 50 }));
+ const mockLoadOptions = vi.fn(async () => ({ options: [{ label: 'Option 1' }], hasMore: false, offset: 50 }));
const client = new QueryClient();
const watchParams = { foo: 'bar' };
diff --git a/packages/autocomplete/src/lib/AsyncAutocomplete.tsx b/packages/autocomplete/src/lib/AsyncAutocomplete.tsx
index a861ef9bcb..2ce97e5561 100644
--- a/packages/autocomplete/src/lib/AsyncAutocomplete.tsx
+++ b/packages/autocomplete/src/lib/AsyncAutocomplete.tsx
@@ -1,6 +1,6 @@
import { useState, useRef, useEffect, useCallback } from 'react';
import type { ChipTypeMap } from '@mui/material/Chip';
-import { useInfiniteQuery, UseInfiniteQueryOptions } from '@tanstack/react-query';
+import { useInfiniteQuery, type InfiniteData, type UseInfiniteQueryOptions } from '@tanstack/react-query';
import { AutocompleteInputChangeReason } from '@mui/material/Autocomplete';
import { Autocomplete, AutocompleteProps } from './Autocomplete';
@@ -28,7 +28,12 @@ export interface AsyncAutocompleteProps<
* @default 50 */
limit?: number;
/** Config options for the useInfiniteQuery hook */
- queryOptions?: UseInfiniteQueryOptions<{ options: Option[]; hasMore: boolean; offset: number }>;
+ queryOptions?: Partial<
+ Omit<
+ UseInfiniteQueryOptions<{ options: Option[]; hasMore: boolean; offset: number }, Error, InfiniteData<{ options: Option[]; hasMore: boolean; offset: number }>, readonly unknown[], number>,
+ 'queryKey' | 'queryFn' | 'initialPageParam' | 'getNextPageParam'
+ >
+ >;
/** Object of parameters used for the cacheKey. Options are re-refetched when a value in the object changes */
watchParams?: Record;
/** Time to wait before searching with the input value typed into the component */
@@ -72,13 +77,14 @@ export const AsyncAutocomplete = <
const { isLoading, isFetching, data, hasNextPage, fetchNextPage } = useInfiniteQuery({
queryKey: [queryKey, limit, debouncedInput, watchParams],
- queryFn: async ({ pageParam = 0 }) => loadOptions(pageParam, limit, debouncedInput),
+ queryFn: ({ pageParam }) => loadOptions(pageParam, limit, debouncedInput),
+ initialPageParam: 0,
staleTime: 10000,
getNextPageParam: (lastPage) => (lastPage.hasMore ? lastPage.offset + limit : undefined),
...queryOptions,
});
- const options = data?.pages ? data.pages.map((page) => page.options).flat() : [];
+ const options = data?.pages ? data.pages.flatMap((page) => page.options) : [];
const finalOptions =
prependOptions.length > 0
@@ -99,7 +105,7 @@ export const AsyncAutocomplete = <
reason: AutocompleteInputChangeReason
) => {
if (reason === 'clear') {
- setInputValue(event.target.value);
+ setInputValue(value);
} else if (reason === 'blur') {
setInputValue(value);
}
diff --git a/packages/autocomplete/src/lib/Autocomplete.stories.tsx b/packages/autocomplete/src/lib/Autocomplete.stories.tsx
index 33e62dcab8..2c22030b79 100644
--- a/packages/autocomplete/src/lib/Autocomplete.stories.tsx
+++ b/packages/autocomplete/src/lib/Autocomplete.stories.tsx
@@ -151,7 +151,7 @@ export const _FreeSolo: StoryObj = {
return filtered;
};
- const renderOption = (props: React.HTMLAttributes, option: Option) => {
+ const renderOption = (props: React.HTMLAttributes & { key?: string }, option: Option) => {
const { key, ...optionProps } = props;
return (
diff --git a/packages/autocomplete/src/lib/Autocomplete.tsx b/packages/autocomplete/src/lib/Autocomplete.tsx
index 160ed59e10..aeaee1cabb 100644
--- a/packages/autocomplete/src/lib/Autocomplete.tsx
+++ b/packages/autocomplete/src/lib/Autocomplete.tsx
@@ -96,9 +96,7 @@ export const Autocomplete = <
return (
{
- return ;
- }}
+ renderInput={(params: AutocompleteRenderInputParams) => }
popupIcon={}
slotProps={{ popupIndicator: { component: PopupIndicatorWrapper } }}
{...props}
diff --git a/packages/autocomplete/src/lib/CodesAutocomplete.test.tsx b/packages/autocomplete/src/lib/CodesAutocomplete.test.tsx
index b45e709da2..3aebf23299 100644
--- a/packages/autocomplete/src/lib/CodesAutocomplete.test.tsx
+++ b/packages/autocomplete/src/lib/CodesAutocomplete.test.tsx
@@ -1,5 +1,4 @@
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
-/* eslint-disable @nx/enforce-module-boundaries */
import { server } from '@availity/mock/src/lib/server';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
@@ -17,7 +16,7 @@ describe('CodesAutocomplete', () => {
// Remove any handlers you may have added
// in individual tests (runtime handlers).
server.resetHandlers();
- jest.restoreAllMocks();
+ vi.restoreAllMocks();
client.clear();
});
diff --git a/packages/autocomplete/src/lib/CodesAutocomplete.tsx b/packages/autocomplete/src/lib/CodesAutocomplete.tsx
index f006b63e79..0be863ae0e 100644
--- a/packages/autocomplete/src/lib/CodesAutocomplete.tsx
+++ b/packages/autocomplete/src/lib/CodesAutocomplete.tsx
@@ -1,4 +1,4 @@
-import { avCodesApi, ApiConfig } from '@availity/api-axios';
+import { avCodesApi, ApiConfig, type CodesResponse } from '@availity/api-axios';
import type { ChipTypeMap } from '@mui/material/Chip';
import { AsyncAutocomplete, AsyncAutocompleteProps } from './AsyncAutocomplete';
@@ -10,12 +10,12 @@ export type Code = {
};
export const fetchCodes = async (config: ApiConfig) => {
- const resp = await avCodesApi.query(config);
+ const resp = await avCodesApi.query(config);
return {
- options: resp.data.codes as Code[],
- hasMore: config.params.offset + config.params.limit < resp.data.totalCount,
- offset: config.params.offset,
+ options: resp.data.codes as unknown as Code[],
+ hasMore: (config.params!.offset as number) + (config.params!.limit as number) < resp.data.totalCount,
+ offset: config.params!.offset as number,
};
};
diff --git a/packages/autocomplete/src/lib/OrganizationAutocomplete.test.tsx b/packages/autocomplete/src/lib/OrganizationAutocomplete.test.tsx
index b5327b03e2..0d18aaf81d 100644
--- a/packages/autocomplete/src/lib/OrganizationAutocomplete.test.tsx
+++ b/packages/autocomplete/src/lib/OrganizationAutocomplete.test.tsx
@@ -1,5 +1,4 @@
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
-/* eslint-disable @nx/enforce-module-boundaries */
import { server } from '@availity/mock/src/lib/server';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
@@ -17,7 +16,7 @@ describe('OrganizationAutocomplete', () => {
// Remove any handlers you may have added
// in individual tests (runtime handlers).
server.resetHandlers();
- jest.restoreAllMocks();
+ vi.restoreAllMocks();
client.clear();
});
diff --git a/packages/autocomplete/src/lib/OrganizationAutocomplete.tsx b/packages/autocomplete/src/lib/OrganizationAutocomplete.tsx
index 45129ef994..2d9737b601 100644
--- a/packages/autocomplete/src/lib/OrganizationAutocomplete.tsx
+++ b/packages/autocomplete/src/lib/OrganizationAutocomplete.tsx
@@ -1,17 +1,11 @@
-import { avOrganizationsApi, ApiConfig } from '@availity/api-axios';
+import { avOrganizationsApi, ApiConfig, type OrganizationsResponse, type Organization } from '@availity/api-axios';
import type { ChipTypeMap } from '@mui/material/Chip';
import qs from 'qs';
import { AsyncAutocomplete, AsyncAutocompleteProps } from './AsyncAutocomplete';
import type { Optional } from './util';
-export type Organization = {
- customerId: string;
- name: string;
- id: string;
- createDate: string;
- links: Record>;
-};
+export type { Organization } from '@availity/api-axios';
export const fetchOrgs = async (
config: ApiConfig
@@ -24,12 +18,12 @@ export const fetchOrgs = async (
},
};
- const resp = await avOrganizationsApi.getOrganizations(configWithParamsSerializer);
+ const resp = await avOrganizationsApi.getOrganizations(configWithParamsSerializer);
return {
- options: resp.data.organizations as Organization[],
- hasMore: config.params.offset + config.params.limit < resp.data.totalCount,
- offset: config.params.offset,
+ options: resp.data.organizations,
+ hasMore: (config.params!.offset as number) + (config.params!.limit as number) < resp.data.totalCount,
+ offset: config.params!.offset as number,
};
};
diff --git a/packages/autocomplete/src/lib/ProviderAutocomplete.test.tsx b/packages/autocomplete/src/lib/ProviderAutocomplete.test.tsx
index 3d81ec9853..52848362dc 100644
--- a/packages/autocomplete/src/lib/ProviderAutocomplete.test.tsx
+++ b/packages/autocomplete/src/lib/ProviderAutocomplete.test.tsx
@@ -1,5 +1,4 @@
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
-/* eslint-disable @nx/enforce-module-boundaries */
import { server } from '@availity/mock/src/lib/server';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
@@ -17,7 +16,7 @@ describe('ProviderAutocomplete', () => {
// Remove any handlers you may have added
// in individual tests (runtime handlers).
server.resetHandlers();
- jest.restoreAllMocks();
+ vi.restoreAllMocks();
client.clear();
});
@@ -89,5 +88,5 @@ describe('ProviderAutocomplete', () => {
await waitFor(() => {
expect(screen.getByText('Provider 0')).toBeDefined();
});
- }, 10000000000);
+ }, 10000);
});
diff --git a/packages/autocomplete/src/lib/ProviderAutocomplete.tsx b/packages/autocomplete/src/lib/ProviderAutocomplete.tsx
index 4420561f6a..e63e59bee8 100644
--- a/packages/autocomplete/src/lib/ProviderAutocomplete.tsx
+++ b/packages/autocomplete/src/lib/ProviderAutocomplete.tsx
@@ -1,15 +1,12 @@
-import { avProvidersApi, ApiConfig } from '@availity/api-axios';
+import { avProvidersApi, ApiConfig, type ProvidersResponse, type Provider as BaseProvider } from '@availity/api-axios';
import type { ChipTypeMap } from '@mui/material/Chip';
import { AsyncAutocomplete, AsyncAutocompleteProps } from './AsyncAutocomplete';
import type { Optional } from './util';
-export type Provider = {
- id: string;
+export interface Provider extends BaseProvider {
businessName: string;
uiDisplayName: string;
- lastName?: string;
- firstName?: string;
payerAssignedIdentifiers?: { payerId: string; identifier: string }[];
atypical: boolean;
npi: string;
@@ -31,18 +28,18 @@ export type Provider = {
code: string;
value: string;
};
-};
+}
export const fetchProviders = async (
customerId: string,
config: ApiConfig
): Promise<{ options: Provider[]; hasMore: boolean; offset: number }> => {
- const resp = await avProvidersApi.getProviders(customerId, config);
+ const resp = await avProvidersApi.getProviders(customerId, config);
return {
options: resp.data.providers as Provider[],
- hasMore: config.params.offset + config.params.limit < resp.data.totalCount,
- offset: config.params.offset,
+ hasMore: (config.params!.offset as number) + (config.params!.limit as number) < resp.data.totalCount,
+ offset: config.params!.offset as number,
};
};
diff --git a/packages/autocomplete/tsconfig.spec.json b/packages/autocomplete/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/autocomplete/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/avatar/jest.config.js b/packages/avatar/jest.config.js
deleted file mode 100644
index 99f3879670..0000000000
--- a/packages/avatar/jest.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'avatar',
- coverageDirectory: '../../coverage/avatar',
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: From within the project directory, run "nx test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/packages/avatar/package.json b/packages/avatar/package.json
index 5ff4170fb9..f1e8870cfd 100644
--- a/packages/avatar/package.json
+++ b/packages/avatar/package.json
@@ -21,19 +21,17 @@
"author": "Availity Developers ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
@@ -41,11 +39,11 @@
},
"devDependencies": {
"@availity/mui-icon": "workspace:^",
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@availity/mui-icon": "workspace:^",
@@ -56,7 +54,8 @@
"access": "public"
},
"dependencies": {
- "@availity/api-axios": "^12.2.1"
+ "@availity/api-axios": "^13.2.0"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/avatar/project.json b/packages/avatar/project.json
index d43ce86f20..62cb5d92a7 100644
--- a/packages/avatar/project.json
+++ b/packages/avatar/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/avatar/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/avatar"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/avatar/jest.config.js"
+ "command": "vitest run packages/avatar"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/avatar/src/lib/Avatar.tsx b/packages/avatar/src/lib/Avatar.tsx
index cb50b79b92..662ebbae47 100644
--- a/packages/avatar/src/lib/Avatar.tsx
+++ b/packages/avatar/src/lib/Avatar.tsx
@@ -19,7 +19,7 @@ const sizeStyling = {
const getInitials = (name: string, size: 'xs' | 's' | 'm' | 'l' | 'xl'): string => {
if (name.split(' ').length > 1 && size !== 'xs') {
- return `${name.split(' ')[0][0]}${name.split(' ')[1][0]}`;
+ return `${name.split(' ', 1)[0][0]}${name.split(' ', 2)[1][0]}`;
}
return name.charAt(0);
@@ -41,7 +41,7 @@ export const Avatar = ({ children, size = 'xl', src, sx, ...rest }: AvatarProps)
if (src) {
setAvatar(src);
} else {
- const resp = await avSettingsApi.getApplication('AVATAR');
+ const resp = await avSettingsApi.getApplication<{ settings: { avatar: string }[] }>('AVATAR');
const avi = resp.data.settings[0].avatar;
@@ -49,8 +49,10 @@ export const Avatar = ({ children, size = 'xl', src, sx, ...rest }: AvatarProps)
}
};
- fetchAvatar();
- }, [src]);
+ if (!children) {
+ fetchAvatar();
+ }
+ }, [src, children]);
return (
",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
"publish:canary": "yarn npm publish --access public --tag canary"
},
"devDependencies": {
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@mui/material": "^7.0.0",
@@ -53,5 +51,6 @@
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/backdrop/project.json b/packages/backdrop/project.json
index 31295ca089..39efc3985b 100644
--- a/packages/backdrop/project.json
+++ b/packages/backdrop/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/backdrop/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/backdrop"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/backdrop/jest.config.js"
+ "command": "vitest run packages/backdrop"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/backdrop/src/lib/Backdrop.test.tsx b/packages/backdrop/src/lib/Backdrop.test.tsx
index 59e8d76ef9..3d22546cd1 100644
--- a/packages/backdrop/src/lib/Backdrop.test.tsx
+++ b/packages/backdrop/src/lib/Backdrop.test.tsx
@@ -3,7 +3,7 @@ import { Backdrop } from './Backdrop';
describe('Backdrop', () => {
test('should render successfully', () => {
- const { getByText } = render(Test);
+ const { getByText } = render(Test);
expect(getByText('Test')).toBeTruthy();
});
});
diff --git a/packages/backdrop/src/lib/Backdrop.tsx b/packages/backdrop/src/lib/Backdrop.tsx
index 266286b2ca..45bb05fdaf 100644
--- a/packages/backdrop/src/lib/Backdrop.tsx
+++ b/packages/backdrop/src/lib/Backdrop.tsx
@@ -4,6 +4,4 @@ export interface BackdropProps extends MuiBackdropProps {
children?: React.ReactNode;
}
-export const Backdrop = ({ children, ...rest }: BackdropProps): React.JSX.Element => {
- return {children};
-};
+export const Backdrop = ({ children, ...rest }: BackdropProps): React.JSX.Element => {children};
diff --git a/packages/backdrop/tsconfig.spec.json b/packages/backdrop/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/backdrop/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/badge/jest.config.js b/packages/badge/jest.config.js
deleted file mode 100644
index eb9a585aef..0000000000
--- a/packages/badge/jest.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'badge',
- coverageDirectory: '../../coverage/badge',
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: From within the project directory, run "nx test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/packages/badge/package.json b/packages/badge/package.json
index db10bd6b32..065c2b75ed 100644
--- a/packages/badge/package.json
+++ b/packages/badge/package.json
@@ -22,19 +22,17 @@
"author": "Roxanne Young ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
@@ -42,11 +40,11 @@
},
"devDependencies": {
"@availity/mui-icon": "workspace:^",
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@mui/material": "^7.0.0",
@@ -55,5 +53,6 @@
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/badge/project.json b/packages/badge/project.json
index 48c4ba7a8a..f718de56b0 100644
--- a/packages/badge/project.json
+++ b/packages/badge/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/badge/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/badge"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/badge/jest.config.js"
+ "command": "vitest run packages/badge"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/badge/src/lib/Badge.test.tsx b/packages/badge/src/lib/Badge.test.tsx
index e7f6072154..56de175d3b 100644
--- a/packages/badge/src/lib/Badge.test.tsx
+++ b/packages/badge/src/lib/Badge.test.tsx
@@ -1,13 +1,9 @@
import { render } from '@testing-library/react';
import { Badge } from './Badge';
-const findBadgeRoot = (container: any) => {
- return container.firstChild;
-};
+const findBadgeRoot = (container: any) => container.firstChild;
-const findBadge = (container: any) => {
- return findBadgeRoot(container)?.querySelector('span');
-};
+const findBadge = (container: any) => findBadgeRoot(container)?.querySelector('span');
describe('Badge', () => {
test('should render successfully', () => {
diff --git a/packages/badge/tsconfig.spec.json b/packages/badge/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/badge/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/block-ui/jest.config.js b/packages/block-ui/jest.config.js
deleted file mode 100644
index 0c8cce58a6..0000000000
--- a/packages/block-ui/jest.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'block-ui',
- coverageDirectory: '../../coverage/block-ui',
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: From within the project directory, run "nx test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/packages/block-ui/package.json b/packages/block-ui/package.json
index fb5371c483..2b4ae798ce 100644
--- a/packages/block-ui/package.json
+++ b/packages/block-ui/package.json
@@ -22,16 +22,15 @@
"main": "./src/index.ts",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
@@ -40,11 +39,11 @@
"devDependencies": {
"@availity/mui-button": "workspace:*",
"@availity/mui-paper": "workspace:*",
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@mui/material": "^7.0.0",
@@ -53,5 +52,6 @@
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/block-ui/project.json b/packages/block-ui/project.json
index 14afab96ce..01daa32dc0 100644
--- a/packages/block-ui/project.json
+++ b/packages/block-ui/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/block-ui/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/block-ui"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/block-ui/jest.config.js"
+ "command": "vitest run packages/block-ui"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/block-ui/src/lib/BlockUi.tsx b/packages/block-ui/src/lib/BlockUi.tsx
index 22256551fe..f943ca6804 100644
--- a/packages/block-ui/src/lib/BlockUi.tsx
+++ b/packages/block-ui/src/lib/BlockUi.tsx
@@ -3,9 +3,7 @@ import type { KeyboardEvent, KeyboardEventHandler, ReactNode } from 'react';
import CircularProgress from '@mui/material/CircularProgress';
import { styled } from '@mui/material/styles';
-const Loader = () => {
- return ;
-};
+const Loader = () => ;
const Block = styled('div')({
position: 'relative',
diff --git a/packages/block-ui/tsconfig.spec.json b/packages/block-ui/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/block-ui/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/breadcrumbs/jest.config.js b/packages/breadcrumbs/jest.config.js
deleted file mode 100644
index 12cfaf0b70..0000000000
--- a/packages/breadcrumbs/jest.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'breadcrumbs',
- coverageDirectory: '../../coverage/breadcrumbs',
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: From within the project directory, run "nx test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/packages/breadcrumbs/package.json b/packages/breadcrumbs/package.json
index b3120a99b8..f98d9f80eb 100644
--- a/packages/breadcrumbs/package.json
+++ b/packages/breadcrumbs/package.json
@@ -21,30 +21,28 @@
"author": "Availity Developers ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
"publish:canary": "yarn npm publish --access public --tag canary"
},
"devDependencies": {
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@mui/material": "^7.0.0",
@@ -57,5 +55,6 @@
"@availity/mui-icon": "workspace:^",
"@availity/mui-link": "workspace:^"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/breadcrumbs/project.json b/packages/breadcrumbs/project.json
index 5b342cf248..55015ea892 100644
--- a/packages/breadcrumbs/project.json
+++ b/packages/breadcrumbs/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/breadcrumbs/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/breadcrumbs"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/breadcrumbs/jest.config.js"
+ "command": "vitest run packages/breadcrumbs"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/breadcrumbs/src/lib/Breadcrumbs.test.tsx b/packages/breadcrumbs/src/lib/Breadcrumbs.test.tsx
index e814f299e6..9d525a79e6 100644
--- a/packages/breadcrumbs/src/lib/Breadcrumbs.test.tsx
+++ b/packages/breadcrumbs/src/lib/Breadcrumbs.test.tsx
@@ -1,6 +1,6 @@
import { render } from '@testing-library/react';
-import { Breadcrumbs } from './Breadcrumbs';
import { Link } from '@availity/mui-link';
+import { Breadcrumbs } from './Breadcrumbs';
describe('Breadcrumbs', () => {
describe('rending with crumbs', () => {
diff --git a/packages/breadcrumbs/src/lib/Breadcrumbs.tsx b/packages/breadcrumbs/src/lib/Breadcrumbs.tsx
index 344f17cf85..ad71c5d4b8 100644
--- a/packages/breadcrumbs/src/lib/Breadcrumbs.tsx
+++ b/packages/breadcrumbs/src/lib/Breadcrumbs.tsx
@@ -60,8 +60,7 @@ export const Breadcrumbs = ({
homeUrl = '/static/web/onb/onboarding-ui-apps/dashboard-ui/',
LinkProps,
...rest
-}: BreadcrumbsProps): React.JSX.Element => {
- return (
+}: BreadcrumbsProps): React.JSX.Element => (
}
@@ -81,4 +80,3 @@ export const Breadcrumbs = ({
{active || emptyState}
);
-};
diff --git a/packages/breadcrumbs/tsconfig.spec.json b/packages/breadcrumbs/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/breadcrumbs/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/button/jest.config.js b/packages/button/jest.config.js
deleted file mode 100644
index 70715af209..0000000000
--- a/packages/button/jest.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'button',
- coverageDirectory: '../../coverage/button',
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: From within the project directory, run "nx test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/packages/button/package.json b/packages/button/package.json
index 2249eed761..e6f015bb3e 100644
--- a/packages/button/package.json
+++ b/packages/button/package.json
@@ -22,30 +22,28 @@
"author": "Availity Developers ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
"publish:canary": "yarn npm publish --access public --tag canary"
},
"devDependencies": {
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@mui/material": "^7.0.0",
@@ -54,5 +52,6 @@
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/button/project.json b/packages/button/project.json
index 4490afd455..9db46edc62 100644
--- a/packages/button/project.json
+++ b/packages/button/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/button/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/button"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/button/jest.config.js"
+ "command": "vitest run packages/button"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/button/src/lib/Button.tsx b/packages/button/src/lib/Button.tsx
index 92eee7f262..d11f815a47 100644
--- a/packages/button/src/lib/Button.tsx
+++ b/packages/button/src/lib/Button.tsx
@@ -39,6 +39,4 @@ const overrideProps = {
disableTouchRipple: true,
};
-export const Button = forwardRef((props, ref) => {
- return ;
-});
+export const Button = forwardRef((props, ref) => );
diff --git a/packages/button/src/lib/ButtonGroup.tsx b/packages/button/src/lib/ButtonGroup.tsx
index 74f7521a6d..c9202e0f69 100644
--- a/packages/button/src/lib/ButtonGroup.tsx
+++ b/packages/button/src/lib/ButtonGroup.tsx
@@ -17,6 +17,4 @@ const overrideProps = {
disableRipple: true,
};
-export const ButtonGroup = (props: ButtonGroupProps) => {
- return ;
-};
+export const ButtonGroup = (props: ButtonGroupProps) => ;
diff --git a/packages/button/src/lib/LoadingButton.test.tsx b/packages/button/src/lib/LoadingButton.test.tsx
index e97bb57363..420156e3b7 100644
--- a/packages/button/src/lib/LoadingButton.test.tsx
+++ b/packages/button/src/lib/LoadingButton.test.tsx
@@ -1,5 +1,4 @@
import { render } from '@testing-library/react';
-import '@testing-library/jest-dom';
import { LoadingButton } from './LoadingButton';
describe('LoadingButton', () => {
diff --git a/packages/button/src/lib/LoadingButton.tsx b/packages/button/src/lib/LoadingButton.tsx
index e91cd133a9..d5d0c160ca 100644
--- a/packages/button/src/lib/LoadingButton.tsx
+++ b/packages/button/src/lib/LoadingButton.tsx
@@ -9,10 +9,10 @@ const LoadingIndicator = ((props, ref) => {
const { children, loading = false, ...rest } = props;
- //changing default loading button behavior to add end loading icon instead of replacing contents completely with icon
+ // changing default loading button behavior to add end loading icon instead of replacing contents completely with icon
const loadingPosition = rest.startIcon ? 'start' : 'end';
const nonLoadingStyling = rest.startIcon || rest.endIcon || loading ? {} : { padding: '0 .7rem' };
- const endIcon = rest.startIcon ? undefined : ;
+ const endIcon = rest.startIcon ? undefined : ;
return (
",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
@@ -42,11 +40,11 @@
"devDependencies": {
"@availity/mui-button": "workspace:^",
"@availity/mui-icon": "workspace:^",
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@mui/material": "^7.0.0",
@@ -55,5 +53,6 @@
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/card/project.json b/packages/card/project.json
index 823394ec41..13056ee6f7 100644
--- a/packages/card/project.json
+++ b/packages/card/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/card/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/card"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/card/jest.config.js"
+ "command": "vitest run packages/card"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/card/src/lib/Card.tsx b/packages/card/src/lib/Card.tsx
index caa7644fac..21f66dd3b0 100644
--- a/packages/card/src/lib/Card.tsx
+++ b/packages/card/src/lib/Card.tsx
@@ -4,6 +4,4 @@ export interface CardProps extends Omit {
- return {children};
-};
+export const Card = ({ children, ...rest }: CardProps): React.JSX.Element => {children};
diff --git a/packages/card/src/lib/CardActionArea.tsx b/packages/card/src/lib/CardActionArea.tsx
index cab1dfb645..d56aea11e0 100644
--- a/packages/card/src/lib/CardActionArea.tsx
+++ b/packages/card/src/lib/CardActionArea.tsx
@@ -11,10 +11,8 @@ export interface CardActionAreaProps
children?: React.ReactNode;
}
-export const CardActionArea = ({ children, ...rest }: CardActionAreaProps): React.JSX.Element => {
- return (
+export const CardActionArea = ({ children, ...rest }: CardActionAreaProps): React.JSX.Element => (
{children}
);
-};
diff --git a/packages/card/src/lib/CardActions.tsx b/packages/card/src/lib/CardActions.tsx
index a5e65538a5..19444c5225 100644
--- a/packages/card/src/lib/CardActions.tsx
+++ b/packages/card/src/lib/CardActions.tsx
@@ -4,6 +4,4 @@ export interface CardActionsProps extends MuiCardActionsProps {
children?: React.ReactNode;
}
-export const CardActions = ({ children, ...rest }: CardActionsProps): React.JSX.Element => {
- return {children};
-};
+export const CardActions = ({ children, ...rest }: CardActionsProps): React.JSX.Element => {children};
diff --git a/packages/card/src/lib/CardContent.tsx b/packages/card/src/lib/CardContent.tsx
index da82377e7d..62e321e5b0 100644
--- a/packages/card/src/lib/CardContent.tsx
+++ b/packages/card/src/lib/CardContent.tsx
@@ -4,6 +4,4 @@ export interface CardContentProps extends MuiCardContentProps {
children?: React.ReactNode;
}
-export const CardContent = ({ children, ...rest }: CardContentProps): React.JSX.Element => {
- return {children};
-};
+export const CardContent = ({ children, ...rest }: CardContentProps): React.JSX.Element => {children};
diff --git a/packages/card/src/lib/CardHeader.tsx b/packages/card/src/lib/CardHeader.tsx
index c454578675..673dd43c33 100644
--- a/packages/card/src/lib/CardHeader.tsx
+++ b/packages/card/src/lib/CardHeader.tsx
@@ -22,8 +22,7 @@ export const CardHeader = ({
title,
logo,
...rest
-}: CardHeaderProps): React.JSX.Element => {
- return (
+}: CardHeaderProps): React.JSX.Element => (
);
-};
diff --git a/packages/card/src/lib/CardMedia.tsx b/packages/card/src/lib/CardMedia.tsx
index 98aa731170..890bc16755 100644
--- a/packages/card/src/lib/CardMedia.tsx
+++ b/packages/card/src/lib/CardMedia.tsx
@@ -4,6 +4,4 @@ export interface CardMediaProps extends MuiCardMediaProps {
children?: React.ReactNode;
}
-export const CardMedia = ({ children, ...rest }: CardMediaProps): React.JSX.Element => {
- return {children};
-};
+export const CardMedia = ({ children, ...rest }: CardMediaProps): React.JSX.Element => {children};
diff --git a/packages/card/tsconfig.spec.json b/packages/card/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/card/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/checkbox/jest.config.js b/packages/checkbox/jest.config.js
deleted file mode 100644
index fe46feca83..0000000000
--- a/packages/checkbox/jest.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'checkbox',
- coverageDirectory: '../../coverage/checkbox',
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: From within the project directory, run "nx test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/packages/checkbox/package.json b/packages/checkbox/package.json
index 8e8b926217..176e3bc65f 100644
--- a/packages/checkbox/package.json
+++ b/packages/checkbox/package.json
@@ -21,19 +21,17 @@
"author": "Availity Developers ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
@@ -42,11 +40,11 @@
"devDependencies": {
"@availity/mui-icon": "workspace:^",
"@availity/mui-typography": "workspace:^",
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@mui/material": "^7.0.0",
@@ -55,5 +53,6 @@
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/checkbox/project.json b/packages/checkbox/project.json
index 19d153314a..08be41ccba 100644
--- a/packages/checkbox/project.json
+++ b/packages/checkbox/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/checkbox/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/checkbox"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/checkbox/jest.config.js"
+ "command": "vitest run packages/checkbox"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/checkbox/src/lib/Checkbox.tsx b/packages/checkbox/src/lib/Checkbox.tsx
index 051c544c49..0c18e09ea6 100644
--- a/packages/checkbox/src/lib/Checkbox.tsx
+++ b/packages/checkbox/src/lib/Checkbox.tsx
@@ -16,6 +16,4 @@ export interface CheckboxProps
color?: 'primary' | 'error';
}
-export const Checkbox = forwardRef((props, ref) => {
- return ;
-});
+export const Checkbox = forwardRef((props, ref) => );
diff --git a/packages/checkbox/tsconfig.spec.json b/packages/checkbox/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/checkbox/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/chip/jest.config.js b/packages/chip/jest.config.js
deleted file mode 100644
index ffe9c8a3fa..0000000000
--- a/packages/chip/jest.config.js
+++ /dev/null
@@ -1,17 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'chip',
- coverageDirectory: '../../coverage/chip',
- /* TODO: Update to latest Jest snapshotFormat
- * By default Nx has kept the older style of Jest Snapshot formats
- * to prevent breaking of any existing tests with snapshots.
- * It's recommend you update to the latest format.
- * You can do this by removing snapshotFormat property
- * and running tests with --update-snapshot flag.
- * Example: From within the project directory, run "nx test --update-snapshot"
- * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
- */
- snapshotFormat: { escapeString: true, printBasicPrototype: true },
-};
diff --git a/packages/chip/package.json b/packages/chip/package.json
index f3cccd61ce..2aac4d8098 100644
--- a/packages/chip/package.json
+++ b/packages/chip/package.json
@@ -21,19 +21,17 @@
"author": "Availity Developers ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
@@ -41,11 +39,11 @@
},
"devDependencies": {
"@availity/mui-avatar": "workspace:^",
- "@mui/material": "^7.3.4",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "@mui/material": "^7.3.11",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"peerDependencies": {
"@mui/material": "^7.0.0",
@@ -54,5 +52,6 @@
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/chip/project.json b/packages/chip/project.json
index c52f5bedd0..447495eb59 100644
--- a/packages/chip/project.json
+++ b/packages/chip/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/chip/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/chip"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/chip/jest.config.js"
+ "command": "vitest run packages/chip"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/chip/src/lib/Chip.tsx b/packages/chip/src/lib/Chip.tsx
index 43bee3712b..b7158443f1 100644
--- a/packages/chip/src/lib/Chip.tsx
+++ b/packages/chip/src/lib/Chip.tsx
@@ -5,6 +5,4 @@ export type ChipProps = Omit<
'children' | 'color' | 'variant' | 'skipFocusWhenDisabled' | 'disabled' | 'size' | 'icon' | 'clickable' | 'color'
>;
-export const Chip = (props: ChipProps): React.JSX.Element => {
- return ;
-};
+export const Chip = (props: ChipProps): React.JSX.Element => ;
diff --git a/packages/chip/src/lib/StatusChip.tsx b/packages/chip/src/lib/StatusChip.tsx
index 082d6808d7..fb57832510 100644
--- a/packages/chip/src/lib/StatusChip.tsx
+++ b/packages/chip/src/lib/StatusChip.tsx
@@ -19,6 +19,4 @@ export type StatusChipProps = {
| 'onDelete'
>;
-export const StatusChip = ({ color = 'default', ...rest }: StatusChipProps): React.JSX.Element => {
- return ;
-};
+export const StatusChip = ({ color = 'default', ...rest }: StatusChipProps): React.JSX.Element => ;
diff --git a/packages/chip/tsconfig.spec.json b/packages/chip/tsconfig.spec.json
deleted file mode 100644
index 1ac39ccc87..0000000000
--- a/packages/chip/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./tsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["jest.config.ts", "**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/codemod/jest.config.js b/packages/codemod/jest.config.js
deleted file mode 100644
index 33c38028ec..0000000000
--- a/packages/codemod/jest.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'codemod',
- coverageDirectory: '../../coverage/codemod',
-};
diff --git a/packages/codemod/package.json b/packages/codemod/package.json
index d7dbbc5c1a..7c3f0ea9a4 100644
--- a/packages/codemod/package.json
+++ b/packages/codemod/package.json
@@ -24,16 +24,16 @@
"node": ">=18.0.0"
},
"scripts": {
- "build": "tsup src/codemod.js --format esm,cjs --dts",
- "dev": "tsup src/codemod.js --format esm,cjs --watch --dts",
+ "build": "tsup src/codemod.js --format esm --dts",
+ "dev": "tsup src/codemod.js --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
"publish:canary": "yarn npm publish --access public --tag canary"
},
"devDependencies": {
- "tsup": "^8.4.0",
- "typescript": "^5.4.5"
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3"
},
"publishConfig": {
"access": "public"
@@ -43,5 +43,13 @@
"jscodeshift": "^17.3.0",
"postcss-cli": "^11.0.1",
"yargs": "^17.7.2"
+ },
+ "type": "module",
+ "exports": {
+ ".": {
+ "types": "./dist/index.d.ts",
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
}
}
diff --git a/packages/codemod/project.json b/packages/codemod/project.json
index 86b9773017..feeecb83ff 100644
--- a/packages/codemod/project.json
+++ b/packages/codemod/project.json
@@ -6,10 +6,9 @@
"tags": [],
"targets": {
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/codemod"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/codemod/jest.config.js"
+ "command": "vitest run packages/codemod"
}
},
"version": {
@@ -19,7 +18,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/codemod/tsconfig.spec.json b/packages/codemod/tsconfig.spec.json
deleted file mode 100644
index faeba72eea..0000000000
--- a/packages/codemod/tsconfig.spec.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "./jsconfig.json",
- "compilerOptions": {
- "outDir": "../../dist/out-tsc",
- "module": "commonjs",
- "types": ["jest", "node", "@testing-library/jest-dom"],
- "allowJs": true
- },
- "include": ["**/*.test.js", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
-}
diff --git a/packages/controlled-form/jest.config.js b/packages/controlled-form/jest.config.js
deleted file mode 100644
index 99d0df9579..0000000000
--- a/packages/controlled-form/jest.config.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const global = require('../../jest.config.global');
-
-module.exports = {
- ...global,
- displayName: 'controlled-form',
- coverageDirectory: '../../coverage/controlled-form',
-};
diff --git a/packages/controlled-form/package.json b/packages/controlled-form/package.json
index c5238b70a2..a1b434f22a 100644
--- a/packages/controlled-form/package.json
+++ b/packages/controlled-form/package.json
@@ -21,19 +21,17 @@
"author": "Availity Developers ",
"browser": "./dist/index.js",
"main": "./dist/index.js",
- "module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
- "./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.js"
- }
+ "import": "./dist/index.js"
+ },
+ "./package.json": "./package.json"
},
"scripts": {
- "build": "tsup src/index.ts --format esm,cjs --dts",
- "dev": "tsup src/index.ts --format esm,cjs --watch --dts",
+ "build": "tsup src/index.ts --format esm --dts",
+ "dev": "tsup src/index.ts --format esm --watch --dts",
"clean": "rm -rf dist",
"clean:nm": "rm -rf node_modules",
"publish": "yarn npm publish --tolerate-republish --access public",
@@ -45,32 +43,34 @@
"@availity/mui-datepicker": "workspace:^",
"@availity/mui-form-utils": "workspace:^",
"@availity/mui-textfield": "workspace:^",
- "react-hook-form": "^7.55.0"
+ "react-hook-form": "^7.79.0"
},
"devDependencies": {
- "@availity/api-axios": "^12.2.1",
+ "@availity/api-axios": "^13.2.0",
"@availity/mui-button": "workspace:^",
"@availity/mui-layout": "workspace:^",
"@availity/mui-menu": "workspace:^",
"@availity/mui-paper": "workspace:^",
"@availity/mui-typography": "workspace:^",
"@hookform/resolvers": "^4.1.3",
- "@mui/material": "^7.3.4",
- "@tanstack/react-query": "^4.36.1",
- "dayjs": "^1.11.13",
- "react": "19.2.0",
- "react-dom": "19.2.0",
- "tsup": "^8.4.0",
- "typescript": "^5.4.5",
+ "@mui/material": "^7.3.11",
+ "@tanstack/react-query": "^5.101.0",
+ "dayjs": "^1.11.21",
+ "react": "19.2.7",
+ "react-dom": "19.2.7",
+ "tsup": "^8.5.1",
+ "typescript": "^5.9.3",
"yup": "^1.6.1"
},
"peerDependencies": {
- "@availity/api-axios": "^12.0.0",
+ "@availity/api-axios": "^13.0.2",
"@mui/material": "^7.0.0",
+ "@tanstack/react-query": "^5.101.0",
"react": ">=17.0.0"
},
"publishConfig": {
"access": "public"
},
- "sideEffects": false
+ "sideEffects": false,
+ "type": "module"
}
diff --git a/packages/controlled-form/project.json b/packages/controlled-form/project.json
index d6065df20b..6386d8dddf 100644
--- a/packages/controlled-form/project.json
+++ b/packages/controlled-form/project.json
@@ -8,23 +8,20 @@
"lint": {
"executor": "@nx/eslint:lint",
"options": {
- "eslintConfig": ".eslintrc.json",
"silent": false,
"fix": false,
"cache": true,
"cacheLocation": "./node_modules/.cache/controlled-form/.eslintcache",
"maxWarnings": -1,
"quiet": false,
- "noEslintrc": false,
"hasTypeAwareRules": true,
"cacheStrategy": "metadata"
}
},
"test": {
- "executor": "@nx/jest:jest",
- "outputs": ["{workspaceRoot}/coverage/controlled-form"],
+ "executor": "nx:run-commands",
"options": {
- "jestConfig": "packages/controlled-form/jest.config.js"
+ "command": "vitest run packages/controlled-form"
}
},
"version": {
@@ -34,7 +31,9 @@
"commitMessageFormat": "chore({projectName}): release version ${version} [skip ci]",
"tagPrefix": "@availity/{projectName}@",
"trackDeps": true,
- "skipCommitTypes": ["docs"]
+ "skipCommitTypes": [
+ "docs"
+ ]
}
}
}
diff --git a/packages/controlled-form/src/index.ts b/packages/controlled-form/src/index.ts
index 6bea8c4698..8648630df1 100644
--- a/packages/controlled-form/src/index.ts
+++ b/packages/controlled-form/src/index.ts
@@ -1,4 +1,4 @@
-export * from './/lib/AsyncAutocomplete';
+export * from "./lib/AsyncAutocomplete";
export * from './lib/Autocomplete';
export * from './lib/Checkbox';
export * from './lib/CodesAutocomplete';
diff --git a/packages/controlled-form/src/lib/AsyncAutocomplete.test.tsx b/packages/controlled-form/src/lib/AsyncAutocomplete.test.tsx
index 1128bc58ca..90e6f3db85 100644
--- a/packages/controlled-form/src/lib/AsyncAutocomplete.test.tsx
+++ b/packages/controlled-form/src/lib/AsyncAutocomplete.test.tsx
@@ -42,7 +42,7 @@ const loadOptions = async (offset: number, limit: number) => {
};
};
-const onSubmit = jest.fn();
+const onSubmit = vi.fn();
describe('ControlledAsyncAutocomplete', () => {
beforeAll(() => {
@@ -54,7 +54,7 @@ describe('ControlledAsyncAutocomplete', () => {
// Remove any handlers you may have added
// in individual tests (runtime handlers).
server.resetHandlers();
- jest.restoreAllMocks();
+ vi.restoreAllMocks();
});
// terminate the server
diff --git a/packages/controlled-form/src/lib/Autocomplete.test.tsx b/packages/controlled-form/src/lib/Autocomplete.test.tsx
index a17c2bb0c7..6497f9570b 100644
--- a/packages/controlled-form/src/lib/Autocomplete.test.tsx
+++ b/packages/controlled-form/src/lib/Autocomplete.test.tsx
@@ -2,13 +2,13 @@ import { fireEvent, render, waitFor } from '@testing-library/react';
import { ControlledAutocomplete } from './Autocomplete';
import { TestForm } from './UtilComponents';
-const onSubmit = jest.fn();
+const onSubmit = vi.fn();
describe('ControlledAutocomplete', () => {
afterEach(() => {
// Remove any handlers you may have added
// in individual tests (runtime handlers).
- jest.restoreAllMocks();
+ vi.restoreAllMocks();
});
test('should set the value and submit the form', async () => {
diff --git a/packages/controlled-form/src/lib/Checkbox.test.tsx b/packages/controlled-form/src/lib/Checkbox.test.tsx
index c0795a30d4..cf432c2a1a 100644
--- a/packages/controlled-form/src/lib/Checkbox.test.tsx
+++ b/packages/controlled-form/src/lib/Checkbox.test.tsx
@@ -3,7 +3,7 @@ import { FormControl, FormLabel, FormControlLabel, FormGroup } from '@availity/m
import { ControlledCheckbox } from './Checkbox';
import { TestForm } from './UtilComponents';
-const onSubmit = jest.fn();
+const onSubmit = vi.fn();
describe('ControlledCheckbox', () => {
test('should set the value and submit the form data', async () => {
diff --git a/packages/controlled-form/src/lib/Checkbox.tsx b/packages/controlled-form/src/lib/Checkbox.tsx
index 69fadc8697..394c9384eb 100644
--- a/packages/controlled-form/src/lib/Checkbox.tsx
+++ b/packages/controlled-form/src/lib/Checkbox.tsx
@@ -17,8 +17,7 @@ export const ControlledCheckbox =