@heroui/avatar 2.2.22 → 2.2.24
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/dist/avatar-group.js +4 -4
- package/dist/avatar-group.mjs +4 -4
- package/dist/avatar.js +2 -2
- package/dist/avatar.mjs +2 -2
- package/dist/{chunk-5OQ5EBOM.mjs → chunk-4WIG5FTT.mjs} +2 -2
- package/dist/{chunk-VWM2HFFA.mjs → chunk-7IUJUTXK.mjs} +4 -4
- package/dist/{chunk-DPUNBZPN.mjs → chunk-CV4BWJDJ.mjs} +1 -1
- package/dist/{chunk-QH65JCLF.mjs → chunk-R5FIEVLT.mjs} +4 -4
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/use-avatar-group.js +2 -2
- package/dist/use-avatar-group.mjs +1 -1
- package/dist/use-avatar.js +2 -2
- package/dist/use-avatar.mjs +1 -1
- package/package.json +4 -4
package/dist/avatar-group.js
CHANGED
|
@@ -78,7 +78,7 @@ function useAvatarGroup(props = {}) {
|
|
|
78
78
|
const isFirstAvatar = index === 0;
|
|
79
79
|
const isLastAvatar = index === childrenWithinMax.length - 1;
|
|
80
80
|
const childProps = {
|
|
81
|
-
className: (0,
|
|
81
|
+
className: (0, import_theme.cn)(
|
|
82
82
|
isFirstAvatar ? "ms-0" : !isGrid ? "-ms-2" : "",
|
|
83
83
|
isLastAvatar && remainingCount < 1 ? "hover:-translate-x-0" : ""
|
|
84
84
|
)
|
|
@@ -89,7 +89,7 @@ function useAvatarGroup(props = {}) {
|
|
|
89
89
|
return {
|
|
90
90
|
ref: domRef,
|
|
91
91
|
className: slots.base({
|
|
92
|
-
class: (0,
|
|
92
|
+
class: (0, import_theme.cn)(classNames == null ? void 0 : classNames.base, className)
|
|
93
93
|
}),
|
|
94
94
|
role: "group",
|
|
95
95
|
...otherProps
|
|
@@ -228,7 +228,7 @@ function useAvatar(originalProps = {}) {
|
|
|
228
228
|
groupContext == null ? void 0 : groupContext.isGrid
|
|
229
229
|
]
|
|
230
230
|
);
|
|
231
|
-
const baseStyles = (0,
|
|
231
|
+
const baseStyles = (0, import_theme2.cn)(classNames == null ? void 0 : classNames.base, className);
|
|
232
232
|
const canBeFocused = (0, import_react2.useMemo)(() => {
|
|
233
233
|
return isFocusable || as === "button";
|
|
234
234
|
}, [isFocusable, as]);
|
|
@@ -240,7 +240,7 @@ function useAvatar(originalProps = {}) {
|
|
|
240
240
|
"data-focus": (0, import_shared_utils2.dataAttr)(isFocused),
|
|
241
241
|
"data-focus-visible": (0, import_shared_utils2.dataAttr)(isFocusVisible),
|
|
242
242
|
className: slots.base({
|
|
243
|
-
class: (0,
|
|
243
|
+
class: (0, import_theme2.cn)(baseStyles, props == null ? void 0 : props.className)
|
|
244
244
|
}),
|
|
245
245
|
...(0, import_shared_utils2.mergeProps)(otherProps, hoverProps, canBeFocused ? focusProps : {})
|
|
246
246
|
}),
|
package/dist/avatar-group.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
avatar_group_default
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-4WIG5FTT.mjs";
|
|
5
|
+
import "./chunk-CV4BWJDJ.mjs";
|
|
6
6
|
import "./chunk-25E6VDTZ.mjs";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-R5FIEVLT.mjs";
|
|
8
|
+
import "./chunk-7IUJUTXK.mjs";
|
|
9
9
|
import "./chunk-JUJ53SJZ.mjs";
|
|
10
10
|
export {
|
|
11
11
|
avatar_group_default as default
|
package/dist/avatar.js
CHANGED
|
@@ -147,7 +147,7 @@ function useAvatar(originalProps = {}) {
|
|
|
147
147
|
groupContext == null ? void 0 : groupContext.isGrid
|
|
148
148
|
]
|
|
149
149
|
);
|
|
150
|
-
const baseStyles = (0,
|
|
150
|
+
const baseStyles = (0, import_theme.cn)(classNames == null ? void 0 : classNames.base, className);
|
|
151
151
|
const canBeFocused = (0, import_react.useMemo)(() => {
|
|
152
152
|
return isFocusable || as === "button";
|
|
153
153
|
}, [isFocusable, as]);
|
|
@@ -159,7 +159,7 @@ function useAvatar(originalProps = {}) {
|
|
|
159
159
|
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
|
|
160
160
|
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
|
|
161
161
|
className: slots.base({
|
|
162
|
-
class: (0,
|
|
162
|
+
class: (0, import_theme.cn)(baseStyles, props == null ? void 0 : props.className)
|
|
163
163
|
}),
|
|
164
164
|
...(0, import_shared_utils.mergeProps)(otherProps, hoverProps, canBeFocused ? focusProps : {})
|
|
165
165
|
}),
|
package/dist/avatar.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
avatar_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CV4BWJDJ.mjs";
|
|
5
5
|
import "./chunk-25E6VDTZ.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-7IUJUTXK.mjs";
|
|
7
7
|
import "./chunk-JUJ53SJZ.mjs";
|
|
8
8
|
export {
|
|
9
9
|
avatar_default as default
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
avatar_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CV4BWJDJ.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useAvatarGroup
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-R5FIEVLT.mjs";
|
|
8
8
|
import {
|
|
9
9
|
AvatarGroupProvider
|
|
10
10
|
} from "./chunk-JUJ53SJZ.mjs";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-JUJ53SJZ.mjs";
|
|
5
5
|
|
|
6
6
|
// src/use-avatar.ts
|
|
7
|
-
import { avatar } from "@heroui/theme";
|
|
7
|
+
import { avatar, cn } from "@heroui/theme";
|
|
8
8
|
import { useProviderContext } from "@heroui/system";
|
|
9
9
|
import { useDOMRef, filterDOMProps } from "@heroui/react-utils";
|
|
10
|
-
import {
|
|
10
|
+
import { dataAttr, mergeProps, safeInitials } from "@heroui/shared-utils";
|
|
11
11
|
import { useFocusRing } from "@react-aria/focus";
|
|
12
12
|
import { useMemo, useCallback } from "react";
|
|
13
13
|
import { useImage } from "@heroui/use-image";
|
|
@@ -84,7 +84,7 @@ function useAvatar(originalProps = {}) {
|
|
|
84
84
|
groupContext == null ? void 0 : groupContext.isGrid
|
|
85
85
|
]
|
|
86
86
|
);
|
|
87
|
-
const baseStyles =
|
|
87
|
+
const baseStyles = cn(classNames == null ? void 0 : classNames.base, className);
|
|
88
88
|
const canBeFocused = useMemo(() => {
|
|
89
89
|
return isFocusable || as === "button";
|
|
90
90
|
}, [isFocusable, as]);
|
|
@@ -96,7 +96,7 @@ function useAvatar(originalProps = {}) {
|
|
|
96
96
|
"data-focus": dataAttr(isFocused),
|
|
97
97
|
"data-focus-visible": dataAttr(isFocusVisible),
|
|
98
98
|
className: slots.base({
|
|
99
|
-
class:
|
|
99
|
+
class: cn(baseStyles, props == null ? void 0 : props.className)
|
|
100
100
|
}),
|
|
101
101
|
...mergeProps(otherProps, hoverProps, canBeFocused ? focusProps : {})
|
|
102
102
|
}),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/use-avatar-group.ts
|
|
4
|
-
import { avatarGroup } from "@heroui/theme";
|
|
4
|
+
import { avatarGroup, cn } from "@heroui/theme";
|
|
5
5
|
import { useDOMRef } from "@heroui/react-utils";
|
|
6
|
-
import {
|
|
6
|
+
import { compact } from "@heroui/shared-utils";
|
|
7
7
|
import { getValidChildren } from "@heroui/react-utils";
|
|
8
8
|
import { cloneElement, useMemo } from "react";
|
|
9
9
|
function useAvatarGroup(props = {}) {
|
|
@@ -45,7 +45,7 @@ function useAvatarGroup(props = {}) {
|
|
|
45
45
|
const isFirstAvatar = index === 0;
|
|
46
46
|
const isLastAvatar = index === childrenWithinMax.length - 1;
|
|
47
47
|
const childProps = {
|
|
48
|
-
className:
|
|
48
|
+
className: cn(
|
|
49
49
|
isFirstAvatar ? "ms-0" : !isGrid ? "-ms-2" : "",
|
|
50
50
|
isLastAvatar && remainingCount < 1 ? "hover:-translate-x-0" : ""
|
|
51
51
|
)
|
|
@@ -56,7 +56,7 @@ function useAvatarGroup(props = {}) {
|
|
|
56
56
|
return {
|
|
57
57
|
ref: domRef,
|
|
58
58
|
className: slots.base({
|
|
59
|
-
class:
|
|
59
|
+
class: cn(classNames == null ? void 0 : classNames.base, className)
|
|
60
60
|
}),
|
|
61
61
|
role: "group",
|
|
62
62
|
...otherProps
|
package/dist/index.js
CHANGED
|
@@ -155,7 +155,7 @@ function useAvatar(originalProps = {}) {
|
|
|
155
155
|
groupContext == null ? void 0 : groupContext.isGrid
|
|
156
156
|
]
|
|
157
157
|
);
|
|
158
|
-
const baseStyles = (0,
|
|
158
|
+
const baseStyles = (0, import_theme.cn)(classNames == null ? void 0 : classNames.base, className);
|
|
159
159
|
const canBeFocused = (0, import_react.useMemo)(() => {
|
|
160
160
|
return isFocusable || as === "button";
|
|
161
161
|
}, [isFocusable, as]);
|
|
@@ -167,7 +167,7 @@ function useAvatar(originalProps = {}) {
|
|
|
167
167
|
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
|
|
168
168
|
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
|
|
169
169
|
className: slots.base({
|
|
170
|
-
class: (0,
|
|
170
|
+
class: (0, import_theme.cn)(baseStyles, props == null ? void 0 : props.className)
|
|
171
171
|
}),
|
|
172
172
|
...(0, import_shared_utils.mergeProps)(otherProps, hoverProps, canBeFocused ? focusProps : {})
|
|
173
173
|
}),
|
|
@@ -293,7 +293,7 @@ function useAvatarGroup(props = {}) {
|
|
|
293
293
|
const isFirstAvatar = index === 0;
|
|
294
294
|
const isLastAvatar = index === childrenWithinMax.length - 1;
|
|
295
295
|
const childProps = {
|
|
296
|
-
className: (0,
|
|
296
|
+
className: (0, import_theme2.cn)(
|
|
297
297
|
isFirstAvatar ? "ms-0" : !isGrid ? "-ms-2" : "",
|
|
298
298
|
isLastAvatar && remainingCount < 1 ? "hover:-translate-x-0" : ""
|
|
299
299
|
)
|
|
@@ -304,7 +304,7 @@ function useAvatarGroup(props = {}) {
|
|
|
304
304
|
return {
|
|
305
305
|
ref: domRef,
|
|
306
306
|
className: slots.base({
|
|
307
|
-
class: (0,
|
|
307
|
+
class: (0, import_theme2.cn)(classNames == null ? void 0 : classNames.base, className)
|
|
308
308
|
}),
|
|
309
309
|
role: "group",
|
|
310
310
|
...otherProps
|
package/dist/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
avatar_group_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4WIG5FTT.mjs";
|
|
5
5
|
import {
|
|
6
6
|
avatar_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CV4BWJDJ.mjs";
|
|
8
8
|
import {
|
|
9
9
|
AvatarIcon
|
|
10
10
|
} from "./chunk-25E6VDTZ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
useAvatarGroup
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-R5FIEVLT.mjs";
|
|
14
14
|
import {
|
|
15
15
|
useAvatar
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7IUJUTXK.mjs";
|
|
17
17
|
import {
|
|
18
18
|
AvatarGroupProvider,
|
|
19
19
|
useAvatarGroupContext
|
package/dist/use-avatar-group.js
CHANGED
|
@@ -68,7 +68,7 @@ function useAvatarGroup(props = {}) {
|
|
|
68
68
|
const isFirstAvatar = index === 0;
|
|
69
69
|
const isLastAvatar = index === childrenWithinMax.length - 1;
|
|
70
70
|
const childProps = {
|
|
71
|
-
className: (0,
|
|
71
|
+
className: (0, import_theme.cn)(
|
|
72
72
|
isFirstAvatar ? "ms-0" : !isGrid ? "-ms-2" : "",
|
|
73
73
|
isLastAvatar && remainingCount < 1 ? "hover:-translate-x-0" : ""
|
|
74
74
|
)
|
|
@@ -79,7 +79,7 @@ function useAvatarGroup(props = {}) {
|
|
|
79
79
|
return {
|
|
80
80
|
ref: domRef,
|
|
81
81
|
className: slots.base({
|
|
82
|
-
class: (0,
|
|
82
|
+
class: (0, import_theme.cn)(classNames == null ? void 0 : classNames.base, className)
|
|
83
83
|
}),
|
|
84
84
|
role: "group",
|
|
85
85
|
...otherProps
|
package/dist/use-avatar.js
CHANGED
|
@@ -113,7 +113,7 @@ function useAvatar(originalProps = {}) {
|
|
|
113
113
|
groupContext == null ? void 0 : groupContext.isGrid
|
|
114
114
|
]
|
|
115
115
|
);
|
|
116
|
-
const baseStyles = (0,
|
|
116
|
+
const baseStyles = (0, import_theme.cn)(classNames == null ? void 0 : classNames.base, className);
|
|
117
117
|
const canBeFocused = (0, import_react.useMemo)(() => {
|
|
118
118
|
return isFocusable || as === "button";
|
|
119
119
|
}, [isFocusable, as]);
|
|
@@ -125,7 +125,7 @@ function useAvatar(originalProps = {}) {
|
|
|
125
125
|
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
|
|
126
126
|
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
|
|
127
127
|
className: slots.base({
|
|
128
|
-
class: (0,
|
|
128
|
+
class: (0, import_theme.cn)(baseStyles, props == null ? void 0 : props.className)
|
|
129
129
|
}),
|
|
130
130
|
...(0, import_shared_utils.mergeProps)(otherProps, hoverProps, canBeFocused ? focusProps : {})
|
|
131
131
|
}),
|
package/dist/use-avatar.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroui/avatar",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.24",
|
|
4
4
|
"description": "The Avatar component is used to represent a user, and displays the profile picture, initials or fallback icon.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"avatar"
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"react": ">=18 || >=19.0.0-rc.0",
|
|
29
29
|
"react-dom": ">=18 || >=19.0.0-rc.0",
|
|
30
|
-
"@heroui/theme": ">=2.4.
|
|
30
|
+
"@heroui/theme": ">=2.4.24",
|
|
31
31
|
"@heroui/system": ">=2.4.18"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@react-aria/interactions": "3.
|
|
35
|
-
"@react-aria/focus": "3.21.
|
|
34
|
+
"@react-aria/interactions": "3.26.0",
|
|
35
|
+
"@react-aria/focus": "3.21.3",
|
|
36
36
|
"@heroui/shared-utils": "2.1.12",
|
|
37
37
|
"@heroui/react-utils": "2.1.14",
|
|
38
38
|
"@heroui/use-image": "2.1.13"
|