@availity/mui-favorites 1.1.8 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/introduction.mdx +1 -2
- package/package.json +12 -12
- package/src/lib/FavoriteHeart.tsx +1 -1
- package/src/lib/Favorites.stories.tsx +1 -1
- package/src/lib/Favorites.test.tsx +4 -0
- package/src/lib/Favorites.tsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [2.0.1](https://github.com/Availity/element/compare/@availity/mui-favorites@2.0.0...@availity/mui-favorites@2.0.1) (2025-12-03)
|
|
6
|
+
|
|
7
|
+
### Dependency Updates
|
|
8
|
+
|
|
9
|
+
* `mui-icon` updated to version `2.0.0`
|
|
10
|
+
* `mui-progress` updated to version `2.0.0`
|
|
11
|
+
* `mui-tooltip` updated to version `2.0.0`
|
|
12
|
+
## [2.0.0](https://github.com/Availity/element/compare/@availity/mui-favorites@1.1.8...@availity/mui-favorites@2.0.0) (2025-11-17)
|
|
13
|
+
|
|
14
|
+
### Dependency Updates
|
|
15
|
+
|
|
16
|
+
* `mui-icon` updated to version `1.1.8`
|
|
17
|
+
* `mui-progress` updated to version `1.1.8`
|
|
18
|
+
* `mui-tooltip` updated to version `1.1.8`
|
|
19
|
+
|
|
20
|
+
### ⚠ BREAKING CHANGES
|
|
21
|
+
|
|
22
|
+
* @mui/material upgraded to v7
|
|
23
|
+
* @mui/x-* upgraded to v8
|
|
24
|
+
* react upgraded to v19
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* upgrade material and react dependencies ([51602a4](https://github.com/Availity/element/commit/51602a48c5304db6f61e2c7e772c9a3a4aa3f65c))
|
|
29
|
+
|
|
5
30
|
## [1.1.8](https://github.com/Availity/element/compare/@availity/mui-favorites@1.1.7...@availity/mui-favorites@1.1.8) (2025-10-30)
|
|
6
31
|
|
|
7
32
|
### Dependency Updates
|
package/dist/index.d.mts
CHANGED
|
@@ -14,7 +14,7 @@ declare const FavoritesProvider: ({ children, onFavoritesChange, onMaxFavoritesR
|
|
|
14
14
|
settingsStatus?: StatusUnion;
|
|
15
15
|
applicationId?: string;
|
|
16
16
|
maxFavorites?: number;
|
|
17
|
-
}) => JSX.Element;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
18
|
type MergedStatusUnion = 'initLoading' | 'reloading' | 'error' | 'success';
|
|
19
19
|
declare const useFavorites: (id: string) => {
|
|
20
20
|
isFavorited: boolean;
|
|
@@ -39,6 +39,6 @@ type FavoriteHeartProps = {
|
|
|
39
39
|
/** The size of the icon in rem or px, minimum size is 1.5rem / 24px */
|
|
40
40
|
customSize?: string;
|
|
41
41
|
};
|
|
42
|
-
declare const FavoriteHeart: ({ id, name, onChange, onMouseDown, disabled, customSize, }: FavoriteHeartProps) => JSX.Element;
|
|
42
|
+
declare const FavoriteHeart: ({ id, name, onChange, onMouseDown, disabled, customSize, }: FavoriteHeartProps) => React$1.JSX.Element;
|
|
43
43
|
|
|
44
44
|
export { FavoriteHeart, FavoritesProvider, useFavorites };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ declare const FavoritesProvider: ({ children, onFavoritesChange, onMaxFavoritesR
|
|
|
14
14
|
settingsStatus?: StatusUnion;
|
|
15
15
|
applicationId?: string;
|
|
16
16
|
maxFavorites?: number;
|
|
17
|
-
}) => JSX.Element;
|
|
17
|
+
}) => React.JSX.Element;
|
|
18
18
|
type MergedStatusUnion = 'initLoading' | 'reloading' | 'error' | 'success';
|
|
19
19
|
declare const useFavorites: (id: string) => {
|
|
20
20
|
isFavorited: boolean;
|
|
@@ -39,6 +39,6 @@ type FavoriteHeartProps = {
|
|
|
39
39
|
/** The size of the icon in rem or px, minimum size is 1.5rem / 24px */
|
|
40
40
|
customSize?: string;
|
|
41
41
|
};
|
|
42
|
-
declare const FavoriteHeart: ({ id, name, onChange, onMouseDown, disabled, customSize, }: FavoriteHeartProps) => JSX.Element;
|
|
42
|
+
declare const FavoriteHeart: ({ id, name, onChange, onMouseDown, disabled, customSize, }: FavoriteHeartProps) => React$1.JSX.Element;
|
|
43
43
|
|
|
44
44
|
export { FavoriteHeart, FavoritesProvider, useFavorites };
|
package/introduction.mdx
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@availity/mui-favorites",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "Availity MUI Favorites Component - part of the @availity/element design system",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -45,21 +45,21 @@
|
|
|
45
45
|
"@tanstack/react-query": "^4.36.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@availity/mui-icon": "^
|
|
49
|
-
"@availity/mui-progress": "^
|
|
50
|
-
"@availity/mui-tooltip": "^
|
|
51
|
-
"@mui/material": "^
|
|
52
|
-
"react": "
|
|
53
|
-
"react-dom": "
|
|
48
|
+
"@availity/mui-icon": "^2.0.1",
|
|
49
|
+
"@availity/mui-progress": "^2.0.1",
|
|
50
|
+
"@availity/mui-tooltip": "^2.0.1",
|
|
51
|
+
"@mui/material": "^7.3.4",
|
|
52
|
+
"react": "19.2.0",
|
|
53
|
+
"react-dom": "19.2.0",
|
|
54
54
|
"tsup": "^8.4.0",
|
|
55
55
|
"typescript": "^5.4.5"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@availity/mui-icon": "^
|
|
59
|
-
"@availity/mui-progress": "^
|
|
60
|
-
"@availity/mui-tooltip": "^
|
|
61
|
-
"@mui/material": "^
|
|
62
|
-
"react": ">=
|
|
58
|
+
"@availity/mui-icon": "^2.0.1",
|
|
59
|
+
"@availity/mui-progress": "^2.0.1",
|
|
60
|
+
"@availity/mui-tooltip": "^2.0.1",
|
|
61
|
+
"@mui/material": "^7.0.0",
|
|
62
|
+
"react": ">=17.0.0"
|
|
63
63
|
},
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
@@ -109,7 +109,7 @@ export const FavoriteHeart = ({
|
|
|
109
109
|
onMouseDown,
|
|
110
110
|
disabled = false,
|
|
111
111
|
customSize = DEFAULT_SIZE,
|
|
112
|
-
}: FavoriteHeartProps): JSX.Element => {
|
|
112
|
+
}: FavoriteHeartProps): React.JSX.Element => {
|
|
113
113
|
const { isFavorited, isLastClickedFavorite, status, toggleFavorite } = useFavorites(id);
|
|
114
114
|
|
|
115
115
|
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
|
@@ -71,6 +71,10 @@ describe('Favorites', () => {
|
|
|
71
71
|
jest.clearAllMocks();
|
|
72
72
|
queryClient.clear();
|
|
73
73
|
});
|
|
74
|
+
|
|
75
|
+
// terminate the server
|
|
76
|
+
afterAll(() => server.close());
|
|
77
|
+
|
|
74
78
|
it('should render favorited', async () => {
|
|
75
79
|
const { container } = render(
|
|
76
80
|
<QueryClientProvider client={queryClient}>
|
package/src/lib/Favorites.tsx
CHANGED
|
@@ -34,7 +34,7 @@ export const FavoritesProvider = ({
|
|
|
34
34
|
settingsStatus?: StatusUnion;
|
|
35
35
|
applicationId?: string;
|
|
36
36
|
maxFavorites?: number;
|
|
37
|
-
}): JSX.Element => {
|
|
37
|
+
}): React.JSX.Element => {
|
|
38
38
|
const [lastClickedFavoriteId, setLastClickedFavoriteId] = useState<string>('');
|
|
39
39
|
|
|
40
40
|
const queryClient = useQueryClient();
|