@box/blueprint-web 12.35.0 → 12.37.0
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/lib-esm/avatar/avatar.d.ts +14 -9
- package/dist/lib-esm/avatar/avatar.js +21 -9
- package/dist/lib-esm/avatar/avatar.module.js +1 -1
- package/dist/lib-esm/avatar/consts.d.ts +1 -1
- package/dist/lib-esm/avatar/consts.js +2 -2
- package/dist/lib-esm/avatar/types.d.ts +10 -4
- package/dist/lib-esm/index.css +46 -32
- package/dist/lib-esm/navigation-menu/navigation-menu-content.js +5 -0
- package/dist/lib-esm/navigation-menu/navigation-menu-link.js +5 -0
- package/dist/lib-esm/navigation-menu/navigation-menu.module.js +1 -1
- package/package.json +1 -1
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const Avatar: React.ForwardRefExoticComponent<(Omit<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
|
|
3
|
+
ref?: ((instance: HTMLImageElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLImageElement> | null | undefined;
|
|
3
4
|
} & {
|
|
4
5
|
anonymous?: boolean;
|
|
5
6
|
size?: import("./types").AvatarSize;
|
|
6
7
|
text?: string;
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
icon?: React.ReactElement<React.SVGProps<SVGSVGElement>>;
|
|
9
|
+
} & Required<Pick<import("./types").Image, keyof import("./types").Image>> & Omit<import("./types").Image, keyof import("./types").Image> & Required<Pick<import("./types").WithColor, "color">> & Partial<Record<"colorIndex", never>> & Omit<import("./types").WithColor, keyof import("./types").WithColor>, "ref"> | Omit<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLImageElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLImageElement> | null | undefined;
|
|
9
11
|
} & {
|
|
10
12
|
anonymous?: boolean;
|
|
11
13
|
size?: import("./types").AvatarSize;
|
|
12
14
|
text?: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
icon?: React.ReactElement<React.SVGProps<SVGSVGElement>>;
|
|
16
|
+
} & Required<Pick<import("./types").Image, keyof import("./types").Image>> & Omit<import("./types").Image, keyof import("./types").Image> & Required<Pick<import("./types").WithColor, "colorIndex">> & Partial<Record<"color", never>> & Omit<import("./types").WithColor, keyof import("./types").WithColor>, "ref"> | Omit<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
|
|
17
|
+
ref?: ((instance: HTMLImageElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLImageElement> | null | undefined;
|
|
15
18
|
} & {
|
|
16
19
|
anonymous?: boolean;
|
|
17
20
|
size?: import("./types").AvatarSize;
|
|
18
21
|
text?: string;
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
icon?: React.ReactElement<React.SVGProps<SVGSVGElement>>;
|
|
23
|
+
} & Partial<Record<keyof import("./types").Image, never>> & Omit<import("./types").Image, keyof import("./types").Image> & Required<Pick<import("./types").WithColor, "color">> & Partial<Record<"colorIndex", never>> & Omit<import("./types").WithColor, keyof import("./types").WithColor>, "ref"> | Omit<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
|
|
24
|
+
ref?: ((instance: HTMLImageElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLImageElement> | null | undefined;
|
|
21
25
|
} & {
|
|
22
26
|
anonymous?: boolean;
|
|
23
27
|
size?: import("./types").AvatarSize;
|
|
24
28
|
text?: string;
|
|
25
|
-
|
|
29
|
+
icon?: React.ReactElement<React.SVGProps<SVGSVGElement>>;
|
|
30
|
+
} & Partial<Record<keyof import("./types").Image, never>> & Omit<import("./types").Image, keyof import("./types").Image> & Required<Pick<import("./types").WithColor, "colorIndex">> & Partial<Record<"color", never>> & Omit<import("./types").WithColor, keyof import("./types").WithColor>, "ref">) & React.RefAttributes<HTMLImageElement>>;
|
|
@@ -2,9 +2,9 @@ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { Avatar as Avatar$1 } from '@box/blueprint-web-assets/icons/Line';
|
|
3
3
|
import { GrayBlack } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { forwardRef, useState, useEffect } from 'react';
|
|
5
|
+
import React__default, { forwardRef, useState, useEffect } from 'react';
|
|
6
6
|
import styles from './avatar.module.js';
|
|
7
|
-
import { colors,
|
|
7
|
+
import { colors, iconSizes } from './consts.js';
|
|
8
8
|
|
|
9
9
|
const Avatar = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
10
10
|
const {
|
|
@@ -13,6 +13,7 @@ const Avatar = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
13
13
|
className,
|
|
14
14
|
color,
|
|
15
15
|
colorIndex,
|
|
16
|
+
icon,
|
|
16
17
|
loading = 'lazy',
|
|
17
18
|
onLoad,
|
|
18
19
|
src,
|
|
@@ -27,13 +28,24 @@ const Avatar = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
27
28
|
setImageHasError(false);
|
|
28
29
|
}, [src]);
|
|
29
30
|
const backgroundColor = color || colors[(colorIndex || 0) % colors.length];
|
|
30
|
-
const
|
|
31
|
-
const imageIsLoading = !!src && !imageIsLoaded;
|
|
32
|
-
const
|
|
33
|
-
const
|
|
31
|
+
const iconSize = iconSizes[size];
|
|
32
|
+
const imageIsLoading = !!src && !icon && !imageIsLoaded;
|
|
33
|
+
const shouldShowIcon = !anonymous && icon && (!src || !imageIsLoaded);
|
|
34
|
+
const shouldShowText = !anonymous && !icon && text && !imageIsLoaded;
|
|
35
|
+
const shouldShowAnonymousAvatar = anonymous || imageIsLoading && !text && !icon;
|
|
34
36
|
const shouldShowImage = !anonymous && src && !imageHasError;
|
|
35
37
|
const avatarContents = jsxs(Fragment, {
|
|
36
|
-
children: [
|
|
38
|
+
children: [shouldShowIcon && jsx("div", {
|
|
39
|
+
className: styles.iconContainer,
|
|
40
|
+
style: {
|
|
41
|
+
backgroundColor
|
|
42
|
+
},
|
|
43
|
+
children: /*#__PURE__*/React__default.cloneElement(icon, {
|
|
44
|
+
width: iconSize,
|
|
45
|
+
height: iconSize,
|
|
46
|
+
role: 'presentation'
|
|
47
|
+
})
|
|
48
|
+
}), shouldShowText && jsx("div", {
|
|
37
49
|
className: clsx(styles.text, styles[`length-${text.length}`]),
|
|
38
50
|
style: {
|
|
39
51
|
backgroundColor
|
|
@@ -43,9 +55,9 @@ const Avatar = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
43
55
|
className: styles.anonymousAvatar,
|
|
44
56
|
children: jsx(Avatar$1, {
|
|
45
57
|
color: GrayBlack,
|
|
46
|
-
height:
|
|
58
|
+
height: iconSize,
|
|
47
59
|
role: "presentation",
|
|
48
|
-
width:
|
|
60
|
+
width: iconSize
|
|
49
61
|
})
|
|
50
62
|
}), shouldShowImage && jsx("img", {
|
|
51
63
|
...rest,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"avatar":"bp_avatar_module_avatar--
|
|
2
|
+
var styles = {"avatar":"bp_avatar_module_avatar--af6ca","text":"bp_avatar_module_text--af6ca","small":"bp_avatar_module_small--af6ca","length-1":"bp_avatar_module_length-1--af6ca","length-2":"bp_avatar_module_length-2--af6ca","medium":"bp_avatar_module_medium--af6ca","large":"bp_avatar_module_large--af6ca","length-3":"bp_avatar_module_length-3--af6ca","length-4":"bp_avatar_module_length-4--af6ca","xlarge":"bp_avatar_module_xlarge--af6ca","xxlarge":"bp_avatar_module_xxlarge--af6ca","badge":"bp_avatar_module_badge--af6ca","image":"bp_avatar_module_image--af6ca","loading":"bp_avatar_module_loading--af6ca","anonymousAvatar":"bp_avatar_module_anonymousAvatar--af6ca","iconContainer":"bp_avatar_module_iconContainer--af6ca"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AvatarSize, type Color } from './types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const iconSizes: Record<AvatarSize, string>;
|
|
3
3
|
export declare const AvatarSizes: readonly ["small", "medium", "large", "xlarge", "xxlarge"];
|
|
4
4
|
export declare const colorsMap: Record<string, Color>;
|
|
5
5
|
export declare const colors: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Size3, Size4, Size5, Size7, Size9, BoxBlue50, DarkBlue50, Yellow50, GreenLight50, Yellorange50, LightBlue50, WatermelonRed50, PurpleRain50, Orange50, Grimace50 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const iconSizes = {
|
|
4
4
|
small: Size3,
|
|
5
5
|
medium: Size4,
|
|
6
6
|
large: Size5,
|
|
@@ -21,4 +21,4 @@ const colorsMap = {
|
|
|
21
21
|
};
|
|
22
22
|
const colors = Object.values(colorsMap);
|
|
23
23
|
|
|
24
|
-
export {
|
|
24
|
+
export { colors, colorsMap, iconSizes };
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { type BoxBlue50, type DarkBlue50, type GreenLight50, type Grimace50, type LightBlue50, type Orange50, type PurpleRain50, type WatermelonRed50, type Yellorange50, type Yellow50 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
2
|
+
import { type ReactElement, type SVGProps } from 'react';
|
|
2
3
|
import { type RequireAllOrNone, type RequireExactlyOne } from 'type-fest';
|
|
3
4
|
import { type AvatarSizes } from './consts';
|
|
4
5
|
export type AvatarSize = (typeof AvatarSizes)[number];
|
|
5
6
|
export type Color = typeof BoxBlue50 | typeof DarkBlue50 | typeof Yellow50 | typeof GreenLight50 | typeof Yellorange50 | typeof LightBlue50 | typeof WatermelonRed50 | typeof PurpleRain50 | typeof Orange50 | typeof Grimace50;
|
|
6
7
|
export interface Image {
|
|
7
|
-
/** The image to display. When the image is loading or if it fails to load,
|
|
8
|
-
*
|
|
8
|
+
/** The image to display. When the image is loading or if it fails to load, fallbacks are displayed in order:
|
|
9
|
+
* icon (if provided) → text (if provided) → anonymous user image.
|
|
10
|
+
* The icon serves as the primary fallback while the image is loading.
|
|
9
11
|
*/
|
|
10
12
|
src?: string;
|
|
11
13
|
/** The alt text for the image */
|
|
12
14
|
alt?: string;
|
|
13
15
|
}
|
|
14
16
|
export interface WithColor {
|
|
15
|
-
/** The color of the avatar background when displaying the letter or the number */
|
|
17
|
+
/** The color of the avatar background when displaying the icon, letter or the number */
|
|
16
18
|
color?: Color;
|
|
17
|
-
/** The index of the color of the avatar background when displaying the letter or the number.
|
|
19
|
+
/** The index of the color of the avatar background when displaying the icon, letter or the number.
|
|
18
20
|
* A convenience replacement for the color prop to facilitate providing a hash of the user data.
|
|
19
21
|
* It is ignored when the color prop is provided. */
|
|
20
22
|
colorIndex?: number;
|
|
@@ -28,4 +30,8 @@ export type AvatarProps = React.ComponentPropsWithRef<'img'> & {
|
|
|
28
30
|
* Numbers can be formatted with formatNumber() that is exposed along with the Avatar component.
|
|
29
31
|
*/
|
|
30
32
|
text?: string;
|
|
33
|
+
/** The icon element to display. Will not be displayed if the src prop is provided and the image is successfully loaded.
|
|
34
|
+
* Example: <Avatar icon={<AvatarTwo />} />
|
|
35
|
+
*/
|
|
36
|
+
icon?: ReactElement<SVGProps<SVGSVGElement>>;
|
|
31
37
|
} & RequireAllOrNone<Image, keyof Image> & RequireExactlyOne<WithColor, keyof WithColor>;
|
package/dist/lib-esm/index.css
CHANGED
|
@@ -907,7 +907,7 @@
|
|
|
907
907
|
transform:rotate(180deg);
|
|
908
908
|
}
|
|
909
909
|
|
|
910
|
-
.bp_avatar_module_avatar--
|
|
910
|
+
.bp_avatar_module_avatar--af6ca{
|
|
911
911
|
all:unset;
|
|
912
912
|
align-items:center;
|
|
913
913
|
background-color:var(--gray-10);
|
|
@@ -925,7 +925,7 @@
|
|
|
925
925
|
text-decoration:var(--body-default-bold-text-decoration);
|
|
926
926
|
text-transform:var(--body-default-bold-text-case);
|
|
927
927
|
}
|
|
928
|
-
.bp_avatar_module_avatar--
|
|
928
|
+
.bp_avatar_module_avatar--af6ca .bp_avatar_module_text--af6ca{
|
|
929
929
|
align-items:center;
|
|
930
930
|
border-radius:50%;
|
|
931
931
|
display:flex;
|
|
@@ -933,14 +933,14 @@
|
|
|
933
933
|
justify-content:center;
|
|
934
934
|
width:100%;
|
|
935
935
|
}
|
|
936
|
-
.bp_avatar_module_avatar--
|
|
936
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_small--af6ca{
|
|
937
937
|
height:var(--size-6);
|
|
938
938
|
width:var(--size-6);
|
|
939
939
|
}
|
|
940
|
-
.bp_avatar_module_avatar--
|
|
940
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_small--af6ca .bp_avatar_module_text--af6ca{
|
|
941
941
|
font-size:.5rem;
|
|
942
942
|
}
|
|
943
|
-
.bp_avatar_module_avatar--
|
|
943
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_small--af6ca .bp_avatar_module_length-1--af6ca.bp_avatar_module_text--af6ca,.bp_avatar_module_avatar--af6ca.bp_avatar_module_small--af6ca .bp_avatar_module_length-2--af6ca.bp_avatar_module_text--af6ca{
|
|
944
944
|
font-family:var(--label-bold-font-family);
|
|
945
945
|
font-size:var(--label-bold-font-size);
|
|
946
946
|
font-weight:var(--label-bold-font-weight);
|
|
@@ -950,11 +950,11 @@
|
|
|
950
950
|
text-decoration:var(--label-bold-text-decoration);
|
|
951
951
|
text-transform:var(--label-bold-text-case);
|
|
952
952
|
}
|
|
953
|
-
.bp_avatar_module_avatar--
|
|
953
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_medium--af6ca{
|
|
954
954
|
height:var(--size-7);
|
|
955
955
|
width:var(--size-7);
|
|
956
956
|
}
|
|
957
|
-
.bp_avatar_module_avatar--
|
|
957
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_medium--af6ca .bp_avatar_module_text--af6ca{
|
|
958
958
|
font-family:var(--label-bold-font-family);
|
|
959
959
|
font-size:var(--label-bold-font-size);
|
|
960
960
|
font-weight:var(--label-bold-font-weight);
|
|
@@ -964,17 +964,17 @@
|
|
|
964
964
|
text-decoration:var(--label-bold-text-decoration);
|
|
965
965
|
text-transform:var(--label-bold-text-case);
|
|
966
966
|
}
|
|
967
|
-
.bp_avatar_module_avatar--
|
|
967
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_medium--af6ca .bp_avatar_module_length-1--af6ca.bp_avatar_module_text--af6ca,.bp_avatar_module_avatar--af6ca.bp_avatar_module_medium--af6ca .bp_avatar_module_length-2--af6ca.bp_avatar_module_text--af6ca{
|
|
968
968
|
font-size:.8125rem;
|
|
969
969
|
}
|
|
970
|
-
.bp_avatar_module_avatar--
|
|
970
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_large--af6ca{
|
|
971
971
|
height:var(--size-8);
|
|
972
972
|
width:var(--size-8);
|
|
973
973
|
}
|
|
974
|
-
.bp_avatar_module_avatar--
|
|
974
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_large--af6ca .bp_avatar_module_text--af6ca{
|
|
975
975
|
font-size:.5rem;
|
|
976
976
|
}
|
|
977
|
-
.bp_avatar_module_avatar--
|
|
977
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_large--af6ca .bp_avatar_module_length-1--af6ca.bp_avatar_module_text--af6ca,.bp_avatar_module_avatar--af6ca.bp_avatar_module_large--af6ca .bp_avatar_module_length-2--af6ca.bp_avatar_module_text--af6ca{
|
|
978
978
|
font-family:var(--body-default-bold-font-family);
|
|
979
979
|
font-size:var(--body-default-bold-font-size);
|
|
980
980
|
font-weight:var(--body-default-bold-font-weight);
|
|
@@ -984,10 +984,10 @@
|
|
|
984
984
|
text-decoration:var(--body-default-bold-text-decoration);
|
|
985
985
|
text-transform:var(--body-default-bold-text-case);
|
|
986
986
|
}
|
|
987
|
-
.bp_avatar_module_avatar--
|
|
987
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_large--af6ca .bp_avatar_module_length-3--af6ca.bp_avatar_module_text--af6ca{
|
|
988
988
|
font-size:.6875rem;
|
|
989
989
|
}
|
|
990
|
-
.bp_avatar_module_avatar--
|
|
990
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_large--af6ca .bp_avatar_module_length-4--af6ca.bp_avatar_module_text--af6ca{
|
|
991
991
|
font-family:var(--label-bold-font-family);
|
|
992
992
|
font-size:var(--label-bold-font-size);
|
|
993
993
|
font-weight:var(--label-bold-font-weight);
|
|
@@ -997,14 +997,14 @@
|
|
|
997
997
|
text-decoration:var(--label-bold-text-decoration);
|
|
998
998
|
text-transform:var(--label-bold-text-case);
|
|
999
999
|
}
|
|
1000
|
-
.bp_avatar_module_avatar--
|
|
1000
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_xlarge--af6ca{
|
|
1001
1001
|
height:var(--size-11);
|
|
1002
1002
|
width:var(--size-11);
|
|
1003
1003
|
}
|
|
1004
|
-
.bp_avatar_module_avatar--
|
|
1004
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_xlarge--af6ca .bp_avatar_module_text--af6ca{
|
|
1005
1005
|
font-size:1rem;
|
|
1006
1006
|
}
|
|
1007
|
-
.bp_avatar_module_avatar--
|
|
1007
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_xlarge--af6ca .bp_avatar_module_length-1--af6ca.bp_avatar_module_text--af6ca,.bp_avatar_module_avatar--af6ca.bp_avatar_module_xlarge--af6ca .bp_avatar_module_length-2--af6ca.bp_avatar_module_text--af6ca{
|
|
1008
1008
|
font-family:var(--title-x-large-font-family);
|
|
1009
1009
|
font-size:var(--title-x-large-font-size);
|
|
1010
1010
|
font-weight:var(--title-x-large-font-weight);
|
|
@@ -1014,46 +1014,52 @@
|
|
|
1014
1014
|
text-decoration:var(--title-x-large-text-decoration);
|
|
1015
1015
|
text-transform:var(--title-x-large-text-case);
|
|
1016
1016
|
}
|
|
1017
|
-
.bp_avatar_module_avatar--
|
|
1017
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_xxlarge--af6ca{
|
|
1018
1018
|
height:var(--size-20);
|
|
1019
1019
|
width:var(--size-20);
|
|
1020
1020
|
}
|
|
1021
|
-
.bp_avatar_module_avatar--
|
|
1021
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_xxlarge--af6ca .bp_avatar_module_text--af6ca{
|
|
1022
1022
|
font-size:1.25rem;
|
|
1023
1023
|
}
|
|
1024
|
-
.bp_avatar_module_avatar--
|
|
1024
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_xxlarge--af6ca .bp_avatar_module_length-1--af6ca.bp_avatar_module_text--af6ca,.bp_avatar_module_avatar--af6ca.bp_avatar_module_xxlarge--af6ca .bp_avatar_module_length-2--af6ca.bp_avatar_module_text--af6ca{
|
|
1025
1025
|
font-size:2rem;
|
|
1026
1026
|
}
|
|
1027
|
-
.bp_avatar_module_avatar--
|
|
1027
|
+
.bp_avatar_module_avatar--af6ca.bp_avatar_module_xxlarge--af6ca .bp_avatar_module_badge--af6ca{
|
|
1028
1028
|
right:-.375rem;
|
|
1029
1029
|
}
|
|
1030
|
-
.bp_avatar_module_avatar--
|
|
1030
|
+
.bp_avatar_module_avatar--af6ca .bp_avatar_module_image--af6ca{
|
|
1031
1031
|
border-radius:50%;
|
|
1032
1032
|
height:100%;
|
|
1033
1033
|
object-fit:cover;
|
|
1034
1034
|
width:100%;
|
|
1035
1035
|
}
|
|
1036
|
-
.bp_avatar_module_avatar--
|
|
1036
|
+
.bp_avatar_module_avatar--af6ca .bp_avatar_module_image--af6ca.bp_avatar_module_loading--af6ca{
|
|
1037
1037
|
height:0;
|
|
1038
1038
|
width:0;
|
|
1039
1039
|
}
|
|
1040
1040
|
|
|
1041
|
-
.bp_avatar_module_anonymousAvatar--
|
|
1041
|
+
.bp_avatar_module_anonymousAvatar--af6ca,.bp_avatar_module_iconContainer--af6ca{
|
|
1042
1042
|
align-items:center;
|
|
1043
1043
|
display:flex;
|
|
1044
1044
|
justify-content:center;
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
1047
|
-
|
|
1047
|
+
.bp_avatar_module_iconContainer--af6ca{
|
|
1048
|
+
border-radius:50%;
|
|
1049
|
+
height:100%;
|
|
1050
|
+
width:100%;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
[data-button-wrapper]:hover .bp_avatar_module_avatar--af6ca{
|
|
1048
1054
|
box-shadow:0 0 0 0 var(--background-background), 0 0 0 var(--border-3) var(--border-avatar-border-hover);
|
|
1049
1055
|
cursor:pointer;
|
|
1050
1056
|
}
|
|
1051
1057
|
|
|
1052
|
-
[data-button-wrapper]:active .bp_avatar_module_avatar--
|
|
1058
|
+
[data-button-wrapper]:active .bp_avatar_module_avatar--af6ca{
|
|
1053
1059
|
box-shadow:0 0 0 0 var(--background-background), 0 0 0 var(--border-3) var(--border-avatar-border-pressed);
|
|
1054
1060
|
}
|
|
1055
1061
|
|
|
1056
|
-
[data-button-wrapper][data-focus-visible] .bp_avatar_module_avatar--
|
|
1062
|
+
[data-button-wrapper][data-focus-visible] .bp_avatar_module_avatar--af6ca{
|
|
1057
1063
|
box-shadow:0 0 0 var(--border-1, 1px) var(--background-background), 0 0 0 var(--border-3) var(--outline-focus-on-light);
|
|
1058
1064
|
}
|
|
1059
1065
|
.bp_tooltip_module_content--5b8ee[data-modern=false]{
|
|
@@ -5186,8 +5192,16 @@ table.bp_inline_table_module_inlineTable--7cffa tr:not(:last-child) td{
|
|
|
5186
5192
|
transform:scaleX(1);
|
|
5187
5193
|
}
|
|
5188
5194
|
}
|
|
5189
|
-
.bp_navigation_menu_module_link--
|
|
5190
|
-
color:var(--text-text-on-light);
|
|
5195
|
+
.bp_navigation_menu_module_link--a2f10[data-modern=false]{
|
|
5196
|
+
--navigation-menu-link-text-color:var(--text-text-on-light);
|
|
5197
|
+
}
|
|
5198
|
+
|
|
5199
|
+
.bp_navigation_menu_module_link--a2f10[data-modern=true]{
|
|
5200
|
+
--navigation-menu-link-text-color:var(--bp-text-text-on-light);
|
|
5201
|
+
}
|
|
5202
|
+
|
|
5203
|
+
.bp_navigation_menu_module_link--a2f10.bp_navigation_menu_module_link--a2f10{
|
|
5204
|
+
color:var(--navigation-menu-link-text-color);
|
|
5191
5205
|
font-family:var(--body-default-font-family);
|
|
5192
5206
|
font-size:var(--body-default-font-size);
|
|
5193
5207
|
font-weight:var(--body-default-font-weight);
|
|
@@ -5197,16 +5211,16 @@ table.bp_inline_table_module_inlineTable--7cffa tr:not(:last-child) td{
|
|
|
5197
5211
|
text-decoration:var(--body-default-text-decoration);
|
|
5198
5212
|
text-transform:var(--body-default-text-case);
|
|
5199
5213
|
}
|
|
5200
|
-
.bp_navigation_menu_module_link--
|
|
5201
|
-
color:var(--
|
|
5214
|
+
.bp_navigation_menu_module_link--a2f10.bp_navigation_menu_module_link--a2f10:hover{
|
|
5215
|
+
color:var(--navigation-menu-link-text-color);
|
|
5202
5216
|
}
|
|
5203
|
-
.bp_navigation_menu_module_link--
|
|
5217
|
+
.bp_navigation_menu_module_link--a2f10.bp_navigation_menu_module_link--a2f10.bp_navigation_menu_module_ellipsis--a2f10{
|
|
5204
5218
|
overflow:hidden;
|
|
5205
5219
|
text-overflow:ellipsis;
|
|
5206
5220
|
white-space:nowrap;
|
|
5207
5221
|
}
|
|
5208
5222
|
|
|
5209
|
-
.bp_navigation_menu_module_navigationMenuSeparator--
|
|
5223
|
+
.bp_navigation_menu_module_navigationMenuSeparator--a2f10{
|
|
5210
5224
|
margin-block:var(--space-2);
|
|
5211
5225
|
}
|
|
5212
5226
|
.bp_page_module_page--41d33{
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
+
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
3
4
|
import { DropdownMenu } from '../primitives/dropdown-menu/index.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -10,9 +11,13 @@ const NavigationMenuContent = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
10
11
|
children,
|
|
11
12
|
...rest
|
|
12
13
|
} = props;
|
|
14
|
+
const {
|
|
15
|
+
enableModernizedComponents
|
|
16
|
+
} = useBlueprintModernization();
|
|
13
17
|
return jsx(DropdownMenu.Content, {
|
|
14
18
|
...rest,
|
|
15
19
|
ref: forwardedRef,
|
|
20
|
+
"data-modern": enableModernizedComponents,
|
|
16
21
|
children: children
|
|
17
22
|
});
|
|
18
23
|
});
|
|
@@ -2,6 +2,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import { Link } from '../primitives/link/link.js';
|
|
5
|
+
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
6
|
import styles from './navigation-menu.module.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -12,10 +13,14 @@ const NavigationMenuLink = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
12
13
|
children,
|
|
13
14
|
...rest
|
|
14
15
|
} = props;
|
|
16
|
+
const {
|
|
17
|
+
enableModernizedComponents
|
|
18
|
+
} = useBlueprintModernization();
|
|
15
19
|
return jsx(Link, {
|
|
16
20
|
...rest,
|
|
17
21
|
ref: forwardedRef,
|
|
18
22
|
className: clsx([styles.link, styles.ellipsis]),
|
|
23
|
+
"data-modern": enableModernizedComponents,
|
|
19
24
|
children: children
|
|
20
25
|
});
|
|
21
26
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"link":"bp_navigation_menu_module_link--
|
|
2
|
+
var styles = {"link":"bp_navigation_menu_module_link--a2f10","ellipsis":"bp_navigation_menu_module_ellipsis--a2f10","navigationMenuSeparator":"bp_navigation_menu_module_navigationMenuSeparator--a2f10"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|