@heroui/avatar 2.2.18-beta.2 → 2.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avatar-group.js +3 -2
- package/dist/avatar-group.mjs +3 -3
- package/dist/avatar.js +3 -2
- package/dist/avatar.mjs +2 -2
- package/dist/{chunk-3FFVP3PC.mjs → chunk-A6PX3NG3.mjs} +1 -1
- package/dist/{chunk-224FR5UN.mjs → chunk-H44CU6UA.mjs} +1 -1
- package/dist/{chunk-URUA6GTV.mjs → chunk-LTC67JRI.mjs} +2 -1
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -3
- package/dist/use-avatar-group.d.mts +2 -2
- package/dist/use-avatar-group.d.ts +2 -2
- package/dist/use-avatar.d.mts +22 -22
- package/dist/use-avatar.d.ts +22 -22
- package/dist/use-avatar.js +3 -2
- package/dist/use-avatar.mjs +1 -1
- package/package.json +7 -6
package/dist/avatar-group.js
CHANGED
|
@@ -150,6 +150,7 @@ var AvatarIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
|
150
150
|
// src/use-avatar.ts
|
|
151
151
|
var import_theme2 = require("@heroui/theme");
|
|
152
152
|
var import_system = require("@heroui/system");
|
|
153
|
+
var import_utils = require("@react-aria/utils");
|
|
153
154
|
var import_react_utils4 = require("@heroui/react-utils");
|
|
154
155
|
var import_shared_utils2 = require("@heroui/shared-utils");
|
|
155
156
|
var import_focus = require("@react-aria/focus");
|
|
@@ -236,7 +237,7 @@ function useAvatar(originalProps = {}) {
|
|
|
236
237
|
className: slots.base({
|
|
237
238
|
class: (0, import_shared_utils2.clsx)(baseStyles, props == null ? void 0 : props.className)
|
|
238
239
|
}),
|
|
239
|
-
...(0,
|
|
240
|
+
...(0, import_utils.mergeProps)(otherProps, hoverProps, canBeFocused ? focusProps : {})
|
|
240
241
|
}),
|
|
241
242
|
[canBeFocused, slots, baseStyles, focusProps, otherProps]
|
|
242
243
|
);
|
|
@@ -246,7 +247,7 @@ function useAvatar(originalProps = {}) {
|
|
|
246
247
|
src,
|
|
247
248
|
"data-loaded": (0, import_shared_utils2.dataAttr)(isImgLoaded),
|
|
248
249
|
className: slots.img({ class: classNames == null ? void 0 : classNames.img }),
|
|
249
|
-
...(0,
|
|
250
|
+
...(0, import_utils.mergeProps)(
|
|
250
251
|
imgProps,
|
|
251
252
|
props,
|
|
252
253
|
(0, import_react_utils4.filterDOMProps)({ disableAnimation }, {
|
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-H44CU6UA.mjs";
|
|
5
|
+
import "./chunk-A6PX3NG3.mjs";
|
|
6
6
|
import "./chunk-25E6VDTZ.mjs";
|
|
7
7
|
import "./chunk-QH65JCLF.mjs";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-LTC67JRI.mjs";
|
|
9
9
|
import "./chunk-JUJ53SJZ.mjs";
|
|
10
10
|
export {
|
|
11
11
|
avatar_group_default as default
|
package/dist/avatar.js
CHANGED
|
@@ -60,6 +60,7 @@ var AvatarIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
|
60
60
|
// src/use-avatar.ts
|
|
61
61
|
var import_theme = require("@heroui/theme");
|
|
62
62
|
var import_system = require("@heroui/system");
|
|
63
|
+
var import_utils = require("@react-aria/utils");
|
|
63
64
|
var import_react_utils2 = require("@heroui/react-utils");
|
|
64
65
|
var import_shared_utils = require("@heroui/shared-utils");
|
|
65
66
|
var import_focus = require("@react-aria/focus");
|
|
@@ -155,7 +156,7 @@ function useAvatar(originalProps = {}) {
|
|
|
155
156
|
className: slots.base({
|
|
156
157
|
class: (0, import_shared_utils.clsx)(baseStyles, props == null ? void 0 : props.className)
|
|
157
158
|
}),
|
|
158
|
-
...(0,
|
|
159
|
+
...(0, import_utils.mergeProps)(otherProps, hoverProps, canBeFocused ? focusProps : {})
|
|
159
160
|
}),
|
|
160
161
|
[canBeFocused, slots, baseStyles, focusProps, otherProps]
|
|
161
162
|
);
|
|
@@ -165,7 +166,7 @@ function useAvatar(originalProps = {}) {
|
|
|
165
166
|
src,
|
|
166
167
|
"data-loaded": (0, import_shared_utils.dataAttr)(isImgLoaded),
|
|
167
168
|
className: slots.img({ class: classNames == null ? void 0 : classNames.img }),
|
|
168
|
-
...(0,
|
|
169
|
+
...(0, import_utils.mergeProps)(
|
|
169
170
|
imgProps,
|
|
170
171
|
props,
|
|
171
172
|
(0, import_react_utils2.filterDOMProps)({ disableAnimation }, {
|
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-A6PX3NG3.mjs";
|
|
5
5
|
import "./chunk-25E6VDTZ.mjs";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-LTC67JRI.mjs";
|
|
7
7
|
import "./chunk-JUJ53SJZ.mjs";
|
|
8
8
|
export {
|
|
9
9
|
avatar_default as default
|
|
@@ -6,8 +6,9 @@ import {
|
|
|
6
6
|
// src/use-avatar.ts
|
|
7
7
|
import { avatar } from "@heroui/theme";
|
|
8
8
|
import { useProviderContext } from "@heroui/system";
|
|
9
|
+
import { mergeProps } from "@react-aria/utils";
|
|
9
10
|
import { useDOMRef, filterDOMProps } from "@heroui/react-utils";
|
|
10
|
-
import { clsx, safeText, dataAttr
|
|
11
|
+
import { clsx, safeText, dataAttr } from "@heroui/shared-utils";
|
|
11
12
|
import { useFocusRing } from "@react-aria/focus";
|
|
12
13
|
import { useMemo, useCallback } from "react";
|
|
13
14
|
import { useImage } from "@heroui/use-image";
|
package/dist/index.js
CHANGED
|
@@ -68,6 +68,7 @@ var AvatarIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
|
68
68
|
// src/use-avatar.ts
|
|
69
69
|
var import_theme = require("@heroui/theme");
|
|
70
70
|
var import_system = require("@heroui/system");
|
|
71
|
+
var import_utils = require("@react-aria/utils");
|
|
71
72
|
var import_react_utils2 = require("@heroui/react-utils");
|
|
72
73
|
var import_shared_utils = require("@heroui/shared-utils");
|
|
73
74
|
var import_focus = require("@react-aria/focus");
|
|
@@ -163,7 +164,7 @@ function useAvatar(originalProps = {}) {
|
|
|
163
164
|
className: slots.base({
|
|
164
165
|
class: (0, import_shared_utils.clsx)(baseStyles, props == null ? void 0 : props.className)
|
|
165
166
|
}),
|
|
166
|
-
...(0,
|
|
167
|
+
...(0, import_utils.mergeProps)(otherProps, hoverProps, canBeFocused ? focusProps : {})
|
|
167
168
|
}),
|
|
168
169
|
[canBeFocused, slots, baseStyles, focusProps, otherProps]
|
|
169
170
|
);
|
|
@@ -173,7 +174,7 @@ function useAvatar(originalProps = {}) {
|
|
|
173
174
|
src,
|
|
174
175
|
"data-loaded": (0, import_shared_utils.dataAttr)(isImgLoaded),
|
|
175
176
|
className: slots.img({ class: classNames == null ? void 0 : classNames.img }),
|
|
176
|
-
...(0,
|
|
177
|
+
...(0, import_utils.mergeProps)(
|
|
177
178
|
imgProps,
|
|
178
179
|
props,
|
|
179
180
|
(0, import_react_utils2.filterDOMProps)({ disableAnimation }, {
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
avatar_group_default
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-H44CU6UA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
avatar_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-A6PX3NG3.mjs";
|
|
8
8
|
import {
|
|
9
9
|
AvatarIcon
|
|
10
10
|
} from "./chunk-25E6VDTZ.mjs";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "./chunk-QH65JCLF.mjs";
|
|
14
14
|
import {
|
|
15
15
|
useAvatar
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-LTC67JRI.mjs";
|
|
17
17
|
import {
|
|
18
18
|
AvatarGroupProvider,
|
|
19
19
|
useAvatarGroupContext
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import * as _heroui_system from '@heroui/system';
|
|
4
|
-
import {
|
|
5
|
-
import { SlotsToClasses, AvatarGroupSlots
|
|
4
|
+
import { PropGetter, HTMLHeroUIProps } from '@heroui/system';
|
|
5
|
+
import { AvatarGroupVariantProps, SlotsToClasses, AvatarGroupSlots } from '@heroui/theme';
|
|
6
6
|
import { ReactRef } from '@heroui/react-utils';
|
|
7
7
|
import { AvatarProps } from './avatar.mjs';
|
|
8
8
|
import './use-avatar.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import * as _heroui_system from '@heroui/system';
|
|
4
|
-
import {
|
|
5
|
-
import { SlotsToClasses, AvatarGroupSlots
|
|
4
|
+
import { PropGetter, HTMLHeroUIProps } from '@heroui/system';
|
|
5
|
+
import { AvatarGroupVariantProps, SlotsToClasses, AvatarGroupSlots } from '@heroui/theme';
|
|
6
6
|
import { ReactRef } from '@heroui/react-utils';
|
|
7
7
|
import { AvatarProps } from './avatar.js';
|
|
8
8
|
import './use-avatar.js';
|
package/dist/use-avatar.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as tailwind_variants from 'tailwind-variants';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import * as _heroui_system from '@heroui/system';
|
|
4
|
-
import {
|
|
5
|
-
import { SlotsToClasses, AvatarSlots
|
|
4
|
+
import { PropGetter, HTMLHeroUIProps } from '@heroui/system';
|
|
5
|
+
import { AvatarVariantProps, SlotsToClasses, AvatarSlots } from '@heroui/theme';
|
|
6
6
|
import { ReactRef } from '@heroui/react-utils';
|
|
7
7
|
|
|
8
8
|
interface Props extends HTMLHeroUIProps<"span"> {
|
|
@@ -92,9 +92,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
92
92
|
imgRef: react.RefObject<HTMLImageElement>;
|
|
93
93
|
slots: {
|
|
94
94
|
base: (slotProps?: ({
|
|
95
|
-
size?: "
|
|
95
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
96
96
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
97
|
-
radius?: "
|
|
97
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
98
98
|
isBordered?: boolean | undefined;
|
|
99
99
|
isDisabled?: boolean | undefined;
|
|
100
100
|
isInGroup?: boolean | undefined;
|
|
@@ -102,9 +102,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
102
102
|
disableAnimation?: boolean | undefined;
|
|
103
103
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
104
104
|
img: (slotProps?: ({
|
|
105
|
-
size?: "
|
|
105
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
106
106
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
107
|
-
radius?: "
|
|
107
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
108
108
|
isBordered?: boolean | undefined;
|
|
109
109
|
isDisabled?: boolean | undefined;
|
|
110
110
|
isInGroup?: boolean | undefined;
|
|
@@ -112,9 +112,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
112
112
|
disableAnimation?: boolean | undefined;
|
|
113
113
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
114
114
|
fallback: (slotProps?: ({
|
|
115
|
-
size?: "
|
|
115
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
116
116
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
117
|
-
radius?: "
|
|
117
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
118
118
|
isBordered?: boolean | undefined;
|
|
119
119
|
isDisabled?: boolean | undefined;
|
|
120
120
|
isInGroup?: boolean | undefined;
|
|
@@ -122,9 +122,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
122
122
|
disableAnimation?: boolean | undefined;
|
|
123
123
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
124
124
|
name: (slotProps?: ({
|
|
125
|
-
size?: "
|
|
125
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
126
126
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
127
|
-
radius?: "
|
|
127
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
128
128
|
isBordered?: boolean | undefined;
|
|
129
129
|
isDisabled?: boolean | undefined;
|
|
130
130
|
isInGroup?: boolean | undefined;
|
|
@@ -132,9 +132,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
132
132
|
disableAnimation?: boolean | undefined;
|
|
133
133
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
134
134
|
icon: (slotProps?: ({
|
|
135
|
-
size?: "
|
|
135
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
136
136
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
137
|
-
radius?: "
|
|
137
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
138
138
|
isBordered?: boolean | undefined;
|
|
139
139
|
isDisabled?: boolean | undefined;
|
|
140
140
|
isInGroup?: boolean | undefined;
|
|
@@ -143,9 +143,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
143
143
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
144
144
|
} & {
|
|
145
145
|
base: (slotProps?: ({
|
|
146
|
-
size?: "
|
|
146
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
147
147
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
148
|
-
radius?: "
|
|
148
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
149
149
|
isBordered?: boolean | undefined;
|
|
150
150
|
isDisabled?: boolean | undefined;
|
|
151
151
|
isInGroup?: boolean | undefined;
|
|
@@ -153,9 +153,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
153
153
|
disableAnimation?: boolean | undefined;
|
|
154
154
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
155
155
|
img: (slotProps?: ({
|
|
156
|
-
size?: "
|
|
156
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
157
157
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
158
|
-
radius?: "
|
|
158
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
159
159
|
isBordered?: boolean | undefined;
|
|
160
160
|
isDisabled?: boolean | undefined;
|
|
161
161
|
isInGroup?: boolean | undefined;
|
|
@@ -163,9 +163,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
163
163
|
disableAnimation?: boolean | undefined;
|
|
164
164
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
165
165
|
fallback: (slotProps?: ({
|
|
166
|
-
size?: "
|
|
166
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
167
167
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
168
|
-
radius?: "
|
|
168
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
169
169
|
isBordered?: boolean | undefined;
|
|
170
170
|
isDisabled?: boolean | undefined;
|
|
171
171
|
isInGroup?: boolean | undefined;
|
|
@@ -173,9 +173,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
173
173
|
disableAnimation?: boolean | undefined;
|
|
174
174
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
175
175
|
name: (slotProps?: ({
|
|
176
|
-
size?: "
|
|
176
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
177
177
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
178
|
-
radius?: "
|
|
178
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
179
179
|
isBordered?: boolean | undefined;
|
|
180
180
|
isDisabled?: boolean | undefined;
|
|
181
181
|
isInGroup?: boolean | undefined;
|
|
@@ -183,9 +183,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
183
183
|
disableAnimation?: boolean | undefined;
|
|
184
184
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
185
185
|
icon: (slotProps?: ({
|
|
186
|
-
size?: "
|
|
186
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
187
187
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
188
|
-
radius?: "
|
|
188
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
189
189
|
isBordered?: boolean | undefined;
|
|
190
190
|
isDisabled?: boolean | undefined;
|
|
191
191
|
isInGroup?: boolean | undefined;
|
package/dist/use-avatar.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as tailwind_variants from 'tailwind-variants';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import * as _heroui_system from '@heroui/system';
|
|
4
|
-
import {
|
|
5
|
-
import { SlotsToClasses, AvatarSlots
|
|
4
|
+
import { PropGetter, HTMLHeroUIProps } from '@heroui/system';
|
|
5
|
+
import { AvatarVariantProps, SlotsToClasses, AvatarSlots } from '@heroui/theme';
|
|
6
6
|
import { ReactRef } from '@heroui/react-utils';
|
|
7
7
|
|
|
8
8
|
interface Props extends HTMLHeroUIProps<"span"> {
|
|
@@ -92,9 +92,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
92
92
|
imgRef: react.RefObject<HTMLImageElement>;
|
|
93
93
|
slots: {
|
|
94
94
|
base: (slotProps?: ({
|
|
95
|
-
size?: "
|
|
95
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
96
96
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
97
|
-
radius?: "
|
|
97
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
98
98
|
isBordered?: boolean | undefined;
|
|
99
99
|
isDisabled?: boolean | undefined;
|
|
100
100
|
isInGroup?: boolean | undefined;
|
|
@@ -102,9 +102,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
102
102
|
disableAnimation?: boolean | undefined;
|
|
103
103
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
104
104
|
img: (slotProps?: ({
|
|
105
|
-
size?: "
|
|
105
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
106
106
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
107
|
-
radius?: "
|
|
107
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
108
108
|
isBordered?: boolean | undefined;
|
|
109
109
|
isDisabled?: boolean | undefined;
|
|
110
110
|
isInGroup?: boolean | undefined;
|
|
@@ -112,9 +112,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
112
112
|
disableAnimation?: boolean | undefined;
|
|
113
113
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
114
114
|
fallback: (slotProps?: ({
|
|
115
|
-
size?: "
|
|
115
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
116
116
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
117
|
-
radius?: "
|
|
117
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
118
118
|
isBordered?: boolean | undefined;
|
|
119
119
|
isDisabled?: boolean | undefined;
|
|
120
120
|
isInGroup?: boolean | undefined;
|
|
@@ -122,9 +122,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
122
122
|
disableAnimation?: boolean | undefined;
|
|
123
123
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
124
124
|
name: (slotProps?: ({
|
|
125
|
-
size?: "
|
|
125
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
126
126
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
127
|
-
radius?: "
|
|
127
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
128
128
|
isBordered?: boolean | undefined;
|
|
129
129
|
isDisabled?: boolean | undefined;
|
|
130
130
|
isInGroup?: boolean | undefined;
|
|
@@ -132,9 +132,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
132
132
|
disableAnimation?: boolean | undefined;
|
|
133
133
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
134
134
|
icon: (slotProps?: ({
|
|
135
|
-
size?: "
|
|
135
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
136
136
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
137
|
-
radius?: "
|
|
137
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
138
138
|
isBordered?: boolean | undefined;
|
|
139
139
|
isDisabled?: boolean | undefined;
|
|
140
140
|
isInGroup?: boolean | undefined;
|
|
@@ -143,9 +143,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
143
143
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
144
144
|
} & {
|
|
145
145
|
base: (slotProps?: ({
|
|
146
|
-
size?: "
|
|
146
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
147
147
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
148
|
-
radius?: "
|
|
148
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
149
149
|
isBordered?: boolean | undefined;
|
|
150
150
|
isDisabled?: boolean | undefined;
|
|
151
151
|
isInGroup?: boolean | undefined;
|
|
@@ -153,9 +153,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
153
153
|
disableAnimation?: boolean | undefined;
|
|
154
154
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
155
155
|
img: (slotProps?: ({
|
|
156
|
-
size?: "
|
|
156
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
157
157
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
158
|
-
radius?: "
|
|
158
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
159
159
|
isBordered?: boolean | undefined;
|
|
160
160
|
isDisabled?: boolean | undefined;
|
|
161
161
|
isInGroup?: boolean | undefined;
|
|
@@ -163,9 +163,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
163
163
|
disableAnimation?: boolean | undefined;
|
|
164
164
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
165
165
|
fallback: (slotProps?: ({
|
|
166
|
-
size?: "
|
|
166
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
167
167
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
168
|
-
radius?: "
|
|
168
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
169
169
|
isBordered?: boolean | undefined;
|
|
170
170
|
isDisabled?: boolean | undefined;
|
|
171
171
|
isInGroup?: boolean | undefined;
|
|
@@ -173,9 +173,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
173
173
|
disableAnimation?: boolean | undefined;
|
|
174
174
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
175
175
|
name: (slotProps?: ({
|
|
176
|
-
size?: "
|
|
176
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
177
177
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
178
|
-
radius?: "
|
|
178
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
179
179
|
isBordered?: boolean | undefined;
|
|
180
180
|
isDisabled?: boolean | undefined;
|
|
181
181
|
isInGroup?: boolean | undefined;
|
|
@@ -183,9 +183,9 @@ declare function useAvatar(originalProps?: UseAvatarProps): {
|
|
|
183
183
|
disableAnimation?: boolean | undefined;
|
|
184
184
|
} & tailwind_variants.ClassProp<tailwind_variants.ClassValue>) | undefined) => string;
|
|
185
185
|
icon: (slotProps?: ({
|
|
186
|
-
size?: "
|
|
186
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
187
187
|
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
|
|
188
|
-
radius?: "
|
|
188
|
+
radius?: "sm" | "md" | "lg" | "full" | "none" | undefined;
|
|
189
189
|
isBordered?: boolean | undefined;
|
|
190
190
|
isDisabled?: boolean | undefined;
|
|
191
191
|
isInGroup?: boolean | undefined;
|
package/dist/use-avatar.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(use_avatar_exports, {
|
|
|
26
26
|
module.exports = __toCommonJS(use_avatar_exports);
|
|
27
27
|
var import_theme = require("@heroui/theme");
|
|
28
28
|
var import_system = require("@heroui/system");
|
|
29
|
+
var import_utils = require("@react-aria/utils");
|
|
29
30
|
var import_react_utils2 = require("@heroui/react-utils");
|
|
30
31
|
var import_shared_utils = require("@heroui/shared-utils");
|
|
31
32
|
var import_focus = require("@react-aria/focus");
|
|
@@ -121,7 +122,7 @@ function useAvatar(originalProps = {}) {
|
|
|
121
122
|
className: slots.base({
|
|
122
123
|
class: (0, import_shared_utils.clsx)(baseStyles, props == null ? void 0 : props.className)
|
|
123
124
|
}),
|
|
124
|
-
...(0,
|
|
125
|
+
...(0, import_utils.mergeProps)(otherProps, hoverProps, canBeFocused ? focusProps : {})
|
|
125
126
|
}),
|
|
126
127
|
[canBeFocused, slots, baseStyles, focusProps, otherProps]
|
|
127
128
|
);
|
|
@@ -131,7 +132,7 @@ function useAvatar(originalProps = {}) {
|
|
|
131
132
|
src,
|
|
132
133
|
"data-loaded": (0, import_shared_utils.dataAttr)(isImgLoaded),
|
|
133
134
|
className: slots.img({ class: classNames == null ? void 0 : classNames.img }),
|
|
134
|
-
...(0,
|
|
135
|
+
...(0, import_utils.mergeProps)(
|
|
135
136
|
imgProps,
|
|
136
137
|
props,
|
|
137
138
|
(0, import_react_utils2.filterDOMProps)({ disableAnimation }, {
|
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.18
|
|
3
|
+
"version": "2.2.18",
|
|
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,15 +27,16 @@
|
|
|
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.
|
|
31
|
-
"@heroui/system": ">=2.4.
|
|
30
|
+
"@heroui/theme": ">=2.4.6",
|
|
31
|
+
"@heroui/system": ">=2.4.17"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@react-aria/interactions": "3.25.3",
|
|
35
35
|
"@react-aria/focus": "3.20.5",
|
|
36
|
-
"@
|
|
37
|
-
"@heroui/
|
|
38
|
-
"@heroui/
|
|
36
|
+
"@react-aria/utils": "3.29.1",
|
|
37
|
+
"@heroui/shared-utils": "2.1.9",
|
|
38
|
+
"@heroui/react-utils": "2.1.11",
|
|
39
|
+
"@heroui/use-image": "2.1.10"
|
|
39
40
|
},
|
|
40
41
|
"clean-package": "../../../clean-package.config.json",
|
|
41
42
|
"module": "dist/index.mjs",
|