@teamturing/react-kit 2.47.0 → 2.47.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/dist/core/Avatar/index.d.ts +2 -2
- package/dist/index.js +41 -41
- package/esm/core/Avatar/index.js +7 -5
- package/esm/core/AvatarGroup/index.js +33 -35
- package/package.json +2 -2
|
@@ -6,8 +6,8 @@ type AvatarSizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl';
|
|
|
6
6
|
type Props = {
|
|
7
7
|
size?: ResponsiveValue<AvatarSizeType>;
|
|
8
8
|
} & ImageProps & SxProp;
|
|
9
|
-
declare const
|
|
9
|
+
declare const Avatar: import("react").ForwardRefExoticComponent<{
|
|
10
10
|
size?: ResponsiveValue<AvatarSizeType> | undefined;
|
|
11
11
|
} & import("react").ImgHTMLAttributes<HTMLImageElement> & SxProp & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("react").RefAttributes<HTMLImageElement>>;
|
|
12
|
-
export default
|
|
12
|
+
export default Avatar;
|
|
13
13
|
export type { Props as AvatarProps };
|
package/dist/index.js
CHANGED
|
@@ -16794,24 +16794,27 @@ const Image = styled__default.default.img`
|
|
|
16794
16794
|
${sx}
|
|
16795
16795
|
`;
|
|
16796
16796
|
|
|
16797
|
-
const
|
|
16798
|
-
|
|
16797
|
+
const DEFAULT_AVATAR_URL = 'https://cdn.teamturing.com/cms/uploads/2024-02-21/1708481300_empty-profile.png';
|
|
16798
|
+
const Avatar = /*#__PURE__*/React.forwardRef(({
|
|
16799
|
+
src = DEFAULT_AVATAR_URL,
|
|
16799
16800
|
alt = '',
|
|
16800
16801
|
size = 'm',
|
|
16801
16802
|
sx,
|
|
16802
16803
|
...props
|
|
16803
16804
|
}, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseAvatar, {
|
|
16804
16805
|
ref: ref,
|
|
16806
|
+
role: 'presentation',
|
|
16805
16807
|
src: src,
|
|
16806
16808
|
alt: alt,
|
|
16807
16809
|
sx: sx,
|
|
16808
16810
|
size: size,
|
|
16809
16811
|
...props
|
|
16810
|
-
});
|
|
16812
|
+
}));
|
|
16811
16813
|
const BaseAvatar = styled__default.default(Image)`
|
|
16812
16814
|
border-radius: ${({
|
|
16813
16815
|
theme
|
|
16814
16816
|
}) => forcePixelValue(theme.radii.full)};
|
|
16817
|
+
object-fit: cover;
|
|
16815
16818
|
|
|
16816
16819
|
${variant({
|
|
16817
16820
|
prop: 'size',
|
|
@@ -16853,7 +16856,6 @@ const BaseAvatar = styled__default.default(Image)`
|
|
|
16853
16856
|
|
|
16854
16857
|
${sx}
|
|
16855
16858
|
`;
|
|
16856
|
-
var Avatar$1 = /*#__PURE__*/React.forwardRef(Avatar);
|
|
16857
16859
|
|
|
16858
16860
|
function* iterateFocusableElements(container, options = {}) {
|
|
16859
16861
|
var _a, _b;
|
|
@@ -35289,7 +35291,7 @@ const AvatarGroupItem = ({
|
|
|
35289
35291
|
onClick: onClick,
|
|
35290
35292
|
children: /*#__PURE__*/jsxRuntimeExports.jsx(Tooltip, {
|
|
35291
35293
|
text: props.alt,
|
|
35292
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(Avatar
|
|
35294
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(Avatar, {
|
|
35293
35295
|
ref: ref,
|
|
35294
35296
|
size: 's',
|
|
35295
35297
|
...props
|
|
@@ -35318,41 +35320,39 @@ const AvatarGroup = ({
|
|
|
35318
35320
|
children: [...childrenArray.slice(0, maxItemCount)].reverse()
|
|
35319
35321
|
}), isOverflown ? /*#__PURE__*/jsxRuntimeExports.jsx(OverlayPopper, {
|
|
35320
35322
|
placement: 'bottom',
|
|
35321
|
-
renderOverlay: overlayProps => {
|
|
35322
|
-
|
|
35323
|
-
|
|
35324
|
-
|
|
35325
|
-
|
|
35326
|
-
|
|
35327
|
-
|
|
35328
|
-
|
|
35329
|
-
|
|
35330
|
-
|
|
35331
|
-
|
|
35332
|
-
|
|
35333
|
-
|
|
35334
|
-
|
|
35335
|
-
|
|
35336
|
-
|
|
35337
|
-
|
|
35338
|
-
|
|
35339
|
-
|
|
35340
|
-
|
|
35341
|
-
|
|
35342
|
-
|
|
35343
|
-
|
|
35344
|
-
|
|
35345
|
-
|
|
35346
|
-
|
|
35347
|
-
|
|
35348
|
-
|
|
35349
|
-
|
|
35350
|
-
|
|
35351
|
-
|
|
35352
|
-
|
|
35353
|
-
|
|
35354
|
-
});
|
|
35355
|
-
},
|
|
35323
|
+
renderOverlay: overlayProps => /*#__PURE__*/jsxRuntimeExports.jsx(Overlay$1, {
|
|
35324
|
+
size: 's',
|
|
35325
|
+
maxHeight: 300,
|
|
35326
|
+
sx: {
|
|
35327
|
+
overflow: 'auto'
|
|
35328
|
+
},
|
|
35329
|
+
onClick: e => e.stopPropagation(),
|
|
35330
|
+
...overlayProps,
|
|
35331
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(Space, {
|
|
35332
|
+
px: 1,
|
|
35333
|
+
py: 2,
|
|
35334
|
+
children: childrenArray.slice(maxItemCount).map(({
|
|
35335
|
+
key,
|
|
35336
|
+
props
|
|
35337
|
+
}) => /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
|
|
35338
|
+
sx: {
|
|
35339
|
+
p: 3,
|
|
35340
|
+
display: 'flex',
|
|
35341
|
+
alignItems: 'center',
|
|
35342
|
+
columnGap: 2
|
|
35343
|
+
},
|
|
35344
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(Avatar, {
|
|
35345
|
+
size: 'xs',
|
|
35346
|
+
src: props.src,
|
|
35347
|
+
alt: props.alt
|
|
35348
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(Text, {
|
|
35349
|
+
typography: 'xs',
|
|
35350
|
+
color: 'text/neutral',
|
|
35351
|
+
children: props.alt
|
|
35352
|
+
})]
|
|
35353
|
+
}, key))
|
|
35354
|
+
})
|
|
35355
|
+
}),
|
|
35356
35356
|
children: popperProps => /*#__PURE__*/jsxRuntimeExports.jsxs(UnstyledButton, {
|
|
35357
35357
|
...popperProps,
|
|
35358
35358
|
onClick: e => {
|
|
@@ -43179,7 +43179,7 @@ const useTabState = ({
|
|
|
43179
43179
|
|
|
43180
43180
|
exports.ActionList = index$f;
|
|
43181
43181
|
exports.AnimatePresence = AnimatePresence;
|
|
43182
|
-
exports.Avatar = Avatar
|
|
43182
|
+
exports.Avatar = Avatar;
|
|
43183
43183
|
exports.AvatarGroup = index$c;
|
|
43184
43184
|
exports.BadgeAttacher = BadgeAttacher;
|
|
43185
43185
|
exports.Breadcrumbs = index$b;
|
package/esm/core/Avatar/index.js
CHANGED
|
@@ -7,24 +7,27 @@ import Image from '../Image/index.js';
|
|
|
7
7
|
import { j as jsxRuntimeExports } from '../../node_modules/react/jsx-runtime.js';
|
|
8
8
|
import { variant } from '../../node_modules/@styled-system/variant/dist/index.esm.js';
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
10
|
+
const DEFAULT_AVATAR_URL = 'https://cdn.teamturing.com/cms/uploads/2024-02-21/1708481300_empty-profile.png';
|
|
11
|
+
const Avatar = /*#__PURE__*/forwardRef(({
|
|
12
|
+
src = DEFAULT_AVATAR_URL,
|
|
12
13
|
alt = '',
|
|
13
14
|
size = 'm',
|
|
14
15
|
sx,
|
|
15
16
|
...props
|
|
16
17
|
}, ref) => /*#__PURE__*/jsxRuntimeExports.jsx(BaseAvatar, {
|
|
17
18
|
ref: ref,
|
|
19
|
+
role: 'presentation',
|
|
18
20
|
src: src,
|
|
19
21
|
alt: alt,
|
|
20
22
|
sx: sx,
|
|
21
23
|
size: size,
|
|
22
24
|
...props
|
|
23
|
-
});
|
|
25
|
+
}));
|
|
24
26
|
const BaseAvatar = styled(Image)`
|
|
25
27
|
border-radius: ${({
|
|
26
28
|
theme
|
|
27
29
|
}) => forcePixelValue(theme.radii.full)};
|
|
30
|
+
object-fit: cover;
|
|
28
31
|
|
|
29
32
|
${variant({
|
|
30
33
|
prop: 'size',
|
|
@@ -66,6 +69,5 @@ const BaseAvatar = styled(Image)`
|
|
|
66
69
|
|
|
67
70
|
${sx}
|
|
68
71
|
`;
|
|
69
|
-
var Avatar$1 = /*#__PURE__*/forwardRef(Avatar);
|
|
70
72
|
|
|
71
|
-
export { Avatar
|
|
73
|
+
export { Avatar as default };
|
|
@@ -26,41 +26,39 @@ const AvatarGroup = ({
|
|
|
26
26
|
children: [...childrenArray.slice(0, maxItemCount)].reverse()
|
|
27
27
|
}), isOverflown ? /*#__PURE__*/jsxRuntimeExports.jsx(OverlayPopper, {
|
|
28
28
|
placement: 'bottom',
|
|
29
|
-
renderOverlay: overlayProps => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
});
|
|
63
|
-
},
|
|
29
|
+
renderOverlay: overlayProps => /*#__PURE__*/jsxRuntimeExports.jsx(Overlay, {
|
|
30
|
+
size: 's',
|
|
31
|
+
maxHeight: 300,
|
|
32
|
+
sx: {
|
|
33
|
+
overflow: 'auto'
|
|
34
|
+
},
|
|
35
|
+
onClick: e => e.stopPropagation(),
|
|
36
|
+
...overlayProps,
|
|
37
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx(Space, {
|
|
38
|
+
px: 1,
|
|
39
|
+
py: 2,
|
|
40
|
+
children: childrenArray.slice(maxItemCount).map(({
|
|
41
|
+
key,
|
|
42
|
+
props
|
|
43
|
+
}) => /*#__PURE__*/jsxRuntimeExports.jsxs(View, {
|
|
44
|
+
sx: {
|
|
45
|
+
p: 3,
|
|
46
|
+
display: 'flex',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
columnGap: 2
|
|
49
|
+
},
|
|
50
|
+
children: [/*#__PURE__*/jsxRuntimeExports.jsx(Avatar, {
|
|
51
|
+
size: 'xs',
|
|
52
|
+
src: props.src,
|
|
53
|
+
alt: props.alt
|
|
54
|
+
}), /*#__PURE__*/jsxRuntimeExports.jsx(Text, {
|
|
55
|
+
typography: 'xs',
|
|
56
|
+
color: 'text/neutral',
|
|
57
|
+
children: props.alt
|
|
58
|
+
})]
|
|
59
|
+
}, key))
|
|
60
|
+
})
|
|
61
|
+
}),
|
|
64
62
|
children: popperProps => /*#__PURE__*/jsxRuntimeExports.jsxs(UnstyledButton, {
|
|
65
63
|
...popperProps,
|
|
66
64
|
onClick: e => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamturing/react-kit",
|
|
3
|
-
"version": "2.47.
|
|
3
|
+
"version": "2.47.1",
|
|
4
4
|
"description": "React components, hooks for create teamturing web application",
|
|
5
5
|
"author": "Sungchang Park <psch300@gmail.com> (https://github.com/psch300)",
|
|
6
6
|
"homepage": "https://github.com/weareteamturing/bombe#readme",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"react-textarea-autosize": "^8.5.3",
|
|
67
67
|
"styled-system": "^5.1.5"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "d4def05b872fd881706a5a6a1598cae05aadba49"
|
|
70
70
|
}
|