@box/blueprint-web 12.36.0 → 12.38.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/combobox/combobox.js +12 -12
- package/dist/lib-esm/combobox/types.d.ts +6 -0
- package/dist/lib-esm/index.css +152 -78
- package/dist/lib-esm/input-chip/input-chip.js +12 -1
- package/dist/lib-esm/input-chip/input-chip.module.js +1 -1
- package/dist/lib-esm/input-chip/types.d.ts +1 -1
- package/dist/lib-esm/switch/switch-item.js +5 -0
- package/dist/lib-esm/switch/switch.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>;
|
|
@@ -18,18 +18,15 @@ import styles from './combobox.module.js';
|
|
|
18
18
|
|
|
19
19
|
const getOptionValue = option => typeof option === 'string' ? option : option.value;
|
|
20
20
|
const getOptionFromValue = (value, options) => options.find(option => typeof option === 'string' ? option === value : option.value === value);
|
|
21
|
-
|
|
21
|
+
// Generic helper to apply a callback to an option looked up by value, with a fallback when callback is absent.
|
|
22
|
+
const applyOptionCallback = (optionValue, options, callback, fallback) => {
|
|
22
23
|
const option = getOptionFromValue(optionValue, options);
|
|
23
|
-
return
|
|
24
|
-
};
|
|
25
|
-
const getDisplayAvatarFromOptionValue = (optionValue, options, displayAvatar) => {
|
|
26
|
-
const option = getOptionFromValue(optionValue, options);
|
|
27
|
-
return displayAvatar && option ? displayAvatar(option) : undefined;
|
|
28
|
-
};
|
|
29
|
-
const getTooltipValueFromOptionValue = (optionValue, options, displayTooltip) => {
|
|
30
|
-
const option = getOptionFromValue(optionValue, options);
|
|
31
|
-
return displayTooltip && option ? displayTooltip(option) : undefined;
|
|
24
|
+
return callback && option ? callback(option) : fallback;
|
|
32
25
|
};
|
|
26
|
+
const getDisplayValueFromOptionValue = (optionValue, options, displayValue) => applyOptionCallback(optionValue, options, displayValue, optionValue);
|
|
27
|
+
const getDisplayAvatarFromOptionValue = (optionValue, options, displayAvatar) => applyOptionCallback(optionValue, options, displayAvatar, undefined);
|
|
28
|
+
const getTooltipValueFromOptionValue = (optionValue, options, displayTooltip) => applyOptionCallback(optionValue, options, displayTooltip, undefined);
|
|
29
|
+
const getDisplayChipVariantFromOptionValue = (optionValue, options, displayChipVariant) => applyOptionCallback(optionValue, options, displayChipVariant, 'default');
|
|
33
30
|
const RootInner = ({
|
|
34
31
|
as = 'input',
|
|
35
32
|
...props
|
|
@@ -60,6 +57,7 @@ const RootInner = ({
|
|
|
60
57
|
displayValue,
|
|
61
58
|
displayAvatar,
|
|
62
59
|
displayTooltip,
|
|
60
|
+
displayChipVariant,
|
|
63
61
|
hideOnEscape,
|
|
64
62
|
renderOption,
|
|
65
63
|
options,
|
|
@@ -333,12 +331,14 @@ const RootInner = ({
|
|
|
333
331
|
avatar: getDisplayAvatarFromOptionValue(selected, options, displayAvatar),
|
|
334
332
|
label: getDisplayValueFromOptionValue(selected, options, displayValue),
|
|
335
333
|
onDelete: () => removeMultiSelectInputChip(selected),
|
|
336
|
-
tooltip: getTooltipValueFromOptionValue(selected, options, displayTooltip)
|
|
334
|
+
tooltip: getTooltipValueFromOptionValue(selected, options, displayTooltip),
|
|
335
|
+
variant: getDisplayChipVariantFromOptionValue(selected, options, displayChipVariant)
|
|
337
336
|
}, selected))
|
|
338
337
|
}), showSingleSelectChip && jsx(InputChip, {
|
|
339
338
|
label: getDisplayValueFromOptionValue(selectedValue, options, displayValue),
|
|
340
339
|
onDelete: showComboboxCancelButton ? undefined : removeSingleSelectInputChip,
|
|
341
|
-
tooltip: getTooltipValueFromOptionValue(selectedValue, options, displayTooltip)
|
|
340
|
+
tooltip: getTooltipValueFromOptionValue(selectedValue, options, displayTooltip),
|
|
341
|
+
variant: getDisplayChipVariantFromOptionValue(selectedValue, options, displayChipVariant)
|
|
342
342
|
}), jsxs("div", {
|
|
343
343
|
className: styles.textInputWrapper,
|
|
344
344
|
children: [jsx(Combobox$1, {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ComboboxPopoverProps } from '@ariakit/react';
|
|
2
2
|
import { type SelectItemProps } from '@ariakit/react-core/select/select-item';
|
|
3
3
|
import { type SelectRendererProps } from '@ariakit/react-core/select/select-renderer';
|
|
4
|
+
import { type InputChipProps } from '../input-chip/types';
|
|
4
5
|
import { type TextAreaProps } from '../text-area/types';
|
|
5
6
|
import { type Labelable } from '../util-components/labelable/types';
|
|
6
7
|
export type OptionValue = {
|
|
@@ -88,6 +89,11 @@ export interface ComboboxBaseProps<Multiple extends boolean, FreeInput extends b
|
|
|
88
89
|
* Return a string representation of a tooltip displayed on hover of an Input Chip in Combobox.
|
|
89
90
|
*/
|
|
90
91
|
displayTooltip?: (option: T) => string;
|
|
92
|
+
/**
|
|
93
|
+
* Return the variant of the InputChip to display for a given option.
|
|
94
|
+
* Falls back to 'default' when not provided.
|
|
95
|
+
*/
|
|
96
|
+
displayChipVariant?: (option: T) => InputChipProps['variant'];
|
|
91
97
|
/**
|
|
92
98
|
* Return a JSX representations of an option displayed in Combobox dropdown
|
|
93
99
|
* If not provided `displayValue()` is used to render select option item with a checkmark.
|
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]{
|
|
@@ -1839,7 +1845,10 @@
|
|
|
1839
1845
|
.bp_chips_group_module_chipsGroup--61ede > [role=row]{
|
|
1840
1846
|
max-width:100%;
|
|
1841
1847
|
}
|
|
1842
|
-
.bp_input_chip_module_container--
|
|
1848
|
+
.bp_input_chip_module_container--7e728{
|
|
1849
|
+
--surface-inputchip-surface-variable:var(--purple-rain-20);
|
|
1850
|
+
--text-inputchip-text-variable:var(--purple-rain-120);
|
|
1851
|
+
--icon-inputchip-deleteicon-variable:var(--purple-rain-120);
|
|
1843
1852
|
align-items:center;
|
|
1844
1853
|
background-color:var(--surface-inputchip-surface);
|
|
1845
1854
|
border:none;
|
|
@@ -1863,33 +1872,24 @@
|
|
|
1863
1872
|
-webkit-user-select:none;
|
|
1864
1873
|
user-select:none;
|
|
1865
1874
|
}
|
|
1866
|
-
.bp_input_chip_module_container--
|
|
1875
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_avatarContainer--7e728{
|
|
1867
1876
|
padding-inline:var(--space-05);
|
|
1868
1877
|
}
|
|
1869
|
-
.bp_input_chip_module_container--
|
|
1878
|
+
.bp_input_chip_module_container--7e728:not(.bp_input_chip_module_avatarContainer--7e728).bp_input_chip_module_deleteButton--7e728{
|
|
1870
1879
|
padding-inline:var(--space-1) var(--space-05);
|
|
1871
1880
|
}
|
|
1872
|
-
.bp_input_chip_module_container--
|
|
1881
|
+
.bp_input_chip_module_container--7e728:not(.bp_input_chip_module_error--7e728):focus{
|
|
1873
1882
|
background-color:var(--surface-inputchip-surface-hover);
|
|
1874
1883
|
box-shadow:0 0 0 var(--border-1) var(--outline-focus-on-dark), 0 0 0 calc(var(--border-2) + var(--border-1)) var(--outline-focus-on-light);
|
|
1875
1884
|
}
|
|
1876
|
-
.bp_input_chip_module_container--
|
|
1885
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_error--7e728{
|
|
1877
1886
|
background-color:var(--surface-inputchip-surface-error);
|
|
1878
1887
|
outline:var(--border-1) solid var(--border-inputchip-border-error);
|
|
1879
1888
|
}
|
|
1880
|
-
.bp_input_chip_module_container--
|
|
1889
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_error--7e728:focus{
|
|
1881
1890
|
box-shadow:0 0 0 var(--border-2) var(--outline-focus-on-dark), 0 0 0 calc(var(--border-2) + var(--border-2)) var(--outline-focus-on-light);
|
|
1882
1891
|
}
|
|
1883
|
-
.bp_input_chip_module_container--
|
|
1884
|
-
flex-shrink:0;
|
|
1885
|
-
}
|
|
1886
|
-
.bp_input_chip_module_container--9f437 .bp_input_chip_module_label--9f437{
|
|
1887
|
-
overflow:hidden;
|
|
1888
|
-
padding-inline:var(--space-2);
|
|
1889
|
-
text-overflow:ellipsis;
|
|
1890
|
-
white-space:nowrap;
|
|
1891
|
-
}
|
|
1892
|
-
.bp_input_chip_module_container--9f437 .bp_input_chip_module_deleteIcon--9f437{
|
|
1892
|
+
.bp_input_chip_module_container--7e728 .bp_input_chip_module_deleteIcon--7e728{
|
|
1893
1893
|
align-items:center;
|
|
1894
1894
|
background:var(--surface-cta-surface-icon);
|
|
1895
1895
|
border-radius:var(--radius-half);
|
|
@@ -1899,21 +1899,57 @@
|
|
|
1899
1899
|
padding-block:var(--space-1);
|
|
1900
1900
|
padding-inline:var(--space-1);
|
|
1901
1901
|
}
|
|
1902
|
-
.bp_input_chip_module_container--
|
|
1902
|
+
.bp_input_chip_module_container--7e728 .bp_input_chip_module_deleteIcon--7e728 *{
|
|
1903
1903
|
fill:var(--icon-cta-icon);
|
|
1904
1904
|
}
|
|
1905
|
-
.bp_input_chip_module_container--
|
|
1905
|
+
.bp_input_chip_module_container--7e728 .bp_input_chip_module_deleteIcon--7e728:hover{
|
|
1906
1906
|
background:var(--surface-cta-surface-icon-hover);
|
|
1907
1907
|
}
|
|
1908
|
-
.bp_input_chip_module_container--
|
|
1908
|
+
.bp_input_chip_module_container--7e728 .bp_input_chip_module_deleteIcon--7e728:hover *{
|
|
1909
1909
|
fill:var(--icon-cta-icon-hover);
|
|
1910
1910
|
}
|
|
1911
|
-
.bp_input_chip_module_container--
|
|
1911
|
+
.bp_input_chip_module_container--7e728 .bp_input_chip_module_deleteIcon--7e728:active{
|
|
1912
1912
|
background:var(--surface-cta-surface-icon-pressed);
|
|
1913
1913
|
}
|
|
1914
|
-
.bp_input_chip_module_container--
|
|
1914
|
+
.bp_input_chip_module_container--7e728 .bp_input_chip_module_deleteIcon--7e728:active *{
|
|
1915
1915
|
fill:var(--icon-cta-icon-pressed);
|
|
1916
1916
|
}
|
|
1917
|
+
.bp_input_chip_module_container--7e728 .bp_input_chip_module_label--7e728{
|
|
1918
|
+
overflow:hidden;
|
|
1919
|
+
padding-inline:var(--space-2);
|
|
1920
|
+
text-overflow:ellipsis;
|
|
1921
|
+
white-space:nowrap;
|
|
1922
|
+
}
|
|
1923
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_variable--7e728{
|
|
1924
|
+
background-color:var(--surface-inputchip-surface-variable);
|
|
1925
|
+
}
|
|
1926
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_variable--7e728 .bp_input_chip_module_label--7e728{
|
|
1927
|
+
color:var(--text-inputchip-text-variable);
|
|
1928
|
+
}
|
|
1929
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_variable--7e728:focus{
|
|
1930
|
+
background-color:var(--surface-inputchip-surface-variable);
|
|
1931
|
+
}
|
|
1932
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_variable--7e728 .bp_input_chip_module_deleteIcon--7e728{
|
|
1933
|
+
background:var(--surface-cta-surface-icon);
|
|
1934
|
+
}
|
|
1935
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_variable--7e728 .bp_input_chip_module_deleteIcon--7e728 *{
|
|
1936
|
+
fill:var(--icon-inputchip-deleteicon-variable);
|
|
1937
|
+
}
|
|
1938
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_variable--7e728 .bp_input_chip_module_deleteIcon--7e728:hover{
|
|
1939
|
+
background:var(--surface-cta-surface-icon-hover);
|
|
1940
|
+
}
|
|
1941
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_variable--7e728 .bp_input_chip_module_deleteIcon--7e728:hover *{
|
|
1942
|
+
fill:var(--icon-inputchip-deleteicon-variable);
|
|
1943
|
+
}
|
|
1944
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_variable--7e728 .bp_input_chip_module_deleteIcon--7e728:active{
|
|
1945
|
+
background:var(--surface-cta-surface-icon-pressed);
|
|
1946
|
+
}
|
|
1947
|
+
.bp_input_chip_module_container--7e728.bp_input_chip_module_variable--7e728 .bp_input_chip_module_deleteIcon--7e728:active *{
|
|
1948
|
+
fill:var(--icon-inputchip-deleteicon-variable);
|
|
1949
|
+
}
|
|
1950
|
+
.bp_input_chip_module_container--7e728 .bp_input_chip_module_avatar--7e728{
|
|
1951
|
+
flex-shrink:0;
|
|
1952
|
+
}
|
|
1917
1953
|
.bp_inline_error_module_inlineError--9a67c{
|
|
1918
1954
|
align-items:center;
|
|
1919
1955
|
color:var(--text-text-error-on-light);
|
|
@@ -7261,7 +7297,45 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
7261
7297
|
min-width:var(--split-button-dropdown-min-width);
|
|
7262
7298
|
}
|
|
7263
7299
|
|
|
7264
|
-
.bp_switch_module_option--
|
|
7300
|
+
.bp_switch_module_option--d724c[data-modern=false]{
|
|
7301
|
+
--switch-width:var(--size-10);
|
|
7302
|
+
--switch-height:var(--size-5);
|
|
7303
|
+
--switch-margin-left:var(--space-10);
|
|
7304
|
+
--switch-margin-right:var(--space-3);
|
|
7305
|
+
--description-margin:calc(var(--switch-margin-right) + var(--switch-width));
|
|
7306
|
+
--thumb-width:var(--size-5);
|
|
7307
|
+
--thumb-height:var(--size-5);
|
|
7308
|
+
--thumb-bg:var(--surface-switch-surface);
|
|
7309
|
+
--thumb-border:var(--border-1) solid var(--border-switch-border);
|
|
7310
|
+
--thumb-radius:var(--size-10);
|
|
7311
|
+
--thumb-shadow:var(--dropshadow-3);
|
|
7312
|
+
--switch-bg-off:var(--surface-switch-surface-off);
|
|
7313
|
+
--switch-bg-on:var(--surface-switch-surface-on);
|
|
7314
|
+
--switch-radius:var(--size-10);
|
|
7315
|
+
--switch-outline:var(--outline-focus-on-light);
|
|
7316
|
+
--switch-disabled-opacity:.5;
|
|
7317
|
+
}
|
|
7318
|
+
|
|
7319
|
+
.bp_switch_module_option--d724c[data-modern=true]{
|
|
7320
|
+
--switch-width:var(--bp-size-110);
|
|
7321
|
+
--switch-height:var(--bp-size-060);
|
|
7322
|
+
--switch-margin-left:var(--bp-space-100);
|
|
7323
|
+
--switch-margin-right:var(--bp-space-030);
|
|
7324
|
+
--description-margin:calc(var(--switch-margin-right) + var(--switch-width));
|
|
7325
|
+
--thumb-width:var(--bp-size-060);
|
|
7326
|
+
--thumb-height:var(--bp-size-060);
|
|
7327
|
+
--thumb-bg:var(--bp-surface-switch-surface);
|
|
7328
|
+
--thumb-border:var(--bp-border-01) solid var(--bp-border-switch-border);
|
|
7329
|
+
--thumb-radius:var(--bp-size-100);
|
|
7330
|
+
--thumb-shadow:var(--dropshadow-3);
|
|
7331
|
+
--switch-bg-off:var(--bp-surface-switch-surface-off);
|
|
7332
|
+
--switch-bg-on:var(--bp-surface-switch-surface-on);
|
|
7333
|
+
--switch-radius:var(--bp-size-100);
|
|
7334
|
+
--switch-outline:var(--bp-outline-focus-on-light);
|
|
7335
|
+
--switch-disabled-opacity:.6;
|
|
7336
|
+
}
|
|
7337
|
+
|
|
7338
|
+
.bp_switch_module_option--d724c{
|
|
7265
7339
|
display:flex;
|
|
7266
7340
|
flex-direction:column;
|
|
7267
7341
|
font-family:var(--body-default-font-family);
|
|
@@ -7273,69 +7347,69 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
7273
7347
|
text-decoration:var(--body-default-text-decoration);
|
|
7274
7348
|
text-transform:var(--body-default-text-case);
|
|
7275
7349
|
}
|
|
7276
|
-
.bp_switch_module_option--
|
|
7350
|
+
.bp_switch_module_option--d724c .bp_switch_module_label--d724c{
|
|
7277
7351
|
cursor:pointer;
|
|
7278
7352
|
display:inline-flex;
|
|
7279
7353
|
flex-direction:row;
|
|
7280
7354
|
width:-moz-fit-content;
|
|
7281
7355
|
width:fit-content;
|
|
7282
7356
|
}
|
|
7283
|
-
.bp_switch_module_option--
|
|
7357
|
+
.bp_switch_module_option--d724c .bp_switch_module_label--d724c.bp_switch_module_rightAlign--d724c{
|
|
7284
7358
|
flex-direction:row-reverse;
|
|
7285
7359
|
justify-content:space-between;
|
|
7286
7360
|
width:unset;
|
|
7287
7361
|
}
|
|
7288
|
-
.bp_switch_module_option--
|
|
7289
|
-
margin-left:
|
|
7362
|
+
.bp_switch_module_option--d724c .bp_switch_module_description--d724c{
|
|
7363
|
+
margin-left:var(--description-margin);
|
|
7290
7364
|
}
|
|
7291
|
-
.bp_switch_module_option--
|
|
7365
|
+
.bp_switch_module_option--d724c .bp_switch_module_description--d724c.bp_switch_module_rightAlign--d724c{
|
|
7292
7366
|
margin-left:unset;
|
|
7293
|
-
margin-right:
|
|
7367
|
+
margin-right:var(--description-margin);
|
|
7294
7368
|
}
|
|
7295
|
-
.bp_switch_module_option--
|
|
7296
|
-
background-color:var(--
|
|
7297
|
-
border:var(--
|
|
7298
|
-
border-radius:var(--
|
|
7299
|
-
box-shadow:var(--
|
|
7369
|
+
.bp_switch_module_option--d724c .bp_switch_module_thumb--d724c{
|
|
7370
|
+
background-color:var(--thumb-bg);
|
|
7371
|
+
border:var(--thumb-border);
|
|
7372
|
+
border-radius:var(--thumb-radius);
|
|
7373
|
+
box-shadow:var(--thumb-shadow);
|
|
7300
7374
|
box-sizing:border-box;
|
|
7301
7375
|
display:block;
|
|
7302
|
-
height:var(--
|
|
7376
|
+
height:var(--thumb-height);
|
|
7303
7377
|
transition:transform .4s;
|
|
7304
|
-
width:var(--
|
|
7378
|
+
width:var(--thumb-width);
|
|
7305
7379
|
will-change:transform;
|
|
7306
7380
|
}
|
|
7307
|
-
.bp_switch_module_option--
|
|
7381
|
+
.bp_switch_module_option--d724c .bp_switch_module_switch--d724c{
|
|
7308
7382
|
all:unset;
|
|
7309
7383
|
align-items:center;
|
|
7310
|
-
background-color:var(--
|
|
7311
|
-
border-radius:var(--
|
|
7384
|
+
background-color:var(--switch-bg-off);
|
|
7385
|
+
border-radius:var(--switch-radius);
|
|
7312
7386
|
display:flex;
|
|
7313
7387
|
flex-shrink:0;
|
|
7314
|
-
height:var(--
|
|
7315
|
-
margin-right:var(--
|
|
7388
|
+
height:var(--switch-height);
|
|
7389
|
+
margin-right:var(--switch-margin-right);
|
|
7316
7390
|
position:relative;
|
|
7317
7391
|
transition:background-color .4s;
|
|
7318
|
-
width:var(--
|
|
7392
|
+
width:var(--switch-width);
|
|
7319
7393
|
will-change:transition;
|
|
7320
7394
|
}
|
|
7321
|
-
.bp_switch_module_option--
|
|
7322
|
-
margin-left:var(--
|
|
7395
|
+
.bp_switch_module_option--d724c .bp_switch_module_switch--d724c.bp_switch_module_rightAlign--d724c{
|
|
7396
|
+
margin-left:var(--switch-margin-left);
|
|
7323
7397
|
margin-right:unset;
|
|
7324
7398
|
}
|
|
7325
|
-
.bp_switch_module_option--
|
|
7326
|
-
box-shadow:0 0 0 var(--border-1, 1px) var(--background-background), 0 0 0 var(--border-3) var(--outline
|
|
7399
|
+
.bp_switch_module_option--d724c .bp_switch_module_switch--d724c:focus-visible{
|
|
7400
|
+
box-shadow:0 0 0 var(--border-1, 1px) var(--background-background), 0 0 0 var(--border-3) var(--switch-outline);
|
|
7327
7401
|
}
|
|
7328
|
-
.bp_switch_module_option--
|
|
7329
|
-
background-color:var(--
|
|
7402
|
+
.bp_switch_module_option--d724c .bp_switch_module_switch--d724c[aria-checked=true]{
|
|
7403
|
+
background-color:var(--switch-bg-on);
|
|
7330
7404
|
}
|
|
7331
|
-
.bp_switch_module_option--
|
|
7332
|
-
transform:translateX(calc(var(--
|
|
7405
|
+
.bp_switch_module_option--d724c .bp_switch_module_switch--d724c[aria-checked=true] .bp_switch_module_thumb--d724c{
|
|
7406
|
+
transform:translateX(calc(var(--switch-width)/2));
|
|
7333
7407
|
}
|
|
7334
|
-
.bp_switch_module_option--
|
|
7408
|
+
.bp_switch_module_option--d724c.bp_switch_module_disabled--d724c .bp_switch_module_label--d724c{
|
|
7335
7409
|
cursor:default;
|
|
7336
7410
|
}
|
|
7337
|
-
.bp_switch_module_option--
|
|
7338
|
-
opacity:
|
|
7411
|
+
.bp_switch_module_option--d724c.bp_switch_module_disabled--d724c .bp_switch_module_switch--d724c{
|
|
7412
|
+
opacity:var(--switch-disabled-opacity);
|
|
7339
7413
|
}
|
|
7340
7414
|
|
|
7341
7415
|
.bp_text_button_module_textButton--84555[data-modern=false]{
|
|
@@ -6,6 +6,15 @@ import React__default, { forwardRef } from 'react';
|
|
|
6
6
|
import { Text } from '../text/text.js';
|
|
7
7
|
import styles from './input-chip.module.js';
|
|
8
8
|
|
|
9
|
+
const getVariantClass = variant => {
|
|
10
|
+
if (variant === 'error') {
|
|
11
|
+
return styles.error;
|
|
12
|
+
}
|
|
13
|
+
if (variant === 'variable') {
|
|
14
|
+
return styles.variable;
|
|
15
|
+
}
|
|
16
|
+
return undefined;
|
|
17
|
+
};
|
|
9
18
|
const DELETE_TRIGGER_KEYS = ['Backspace', 'Delete'];
|
|
10
19
|
const InputChip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
11
20
|
const {
|
|
@@ -44,11 +53,13 @@ const InputChip = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
44
53
|
buttonProps.onKeyDown?.(event);
|
|
45
54
|
};
|
|
46
55
|
const hasError = variant === 'error';
|
|
56
|
+
const variantClass = getVariantClass(variant);
|
|
57
|
+
const containerClassName = clsx(styles.container, variantClass, avatar && styles.avatarContainer, onDelete && styles.deleteButton, className);
|
|
47
58
|
return /* eslint-disable-next-line jsx-a11y/role-supports-aria-props */jsxs("button", {
|
|
48
59
|
...buttonProps,
|
|
49
60
|
ref: ref,
|
|
50
61
|
"aria-invalid": hasError,
|
|
51
|
-
className:
|
|
62
|
+
className: containerClassName,
|
|
52
63
|
onKeyDown: handleKeyDown,
|
|
53
64
|
type: "button",
|
|
54
65
|
children: [avatar, jsx(Text, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"container":"bp_input_chip_module_container--
|
|
2
|
+
var styles = {"container":"bp_input_chip_module_container--7e728","avatarContainer":"bp_input_chip_module_avatarContainer--7e728","deleteButton":"bp_input_chip_module_deleteButton--7e728","error":"bp_input_chip_module_error--7e728","deleteIcon":"bp_input_chip_module_deleteIcon--7e728","label":"bp_input_chip_module_label--7e728","variable":"bp_input_chip_module_variable--7e728","avatar":"bp_input_chip_module_avatar--7e728"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -17,7 +17,7 @@ export interface InputChipProps extends HTMLAttributes<HTMLElement> {
|
|
|
17
17
|
*
|
|
18
18
|
* @default "default"
|
|
19
19
|
*/
|
|
20
|
-
variant?: 'default' | 'error';
|
|
20
|
+
variant?: 'default' | 'error' | 'variable';
|
|
21
21
|
/**
|
|
22
22
|
* Callback fired when chip is deleted with X button click or keyboard interaction.
|
|
23
23
|
*/
|
|
@@ -2,6 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import * as RadixSwitch from '@radix-ui/react-switch';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
+
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
6
|
import { TextWithInfoBadge } from '../util-components/text-with-info-badge/text-with-info-badge.js';
|
|
6
7
|
import { useUniqueId } from '../utils/useUniqueId.js';
|
|
7
8
|
import styles from './switch.module.js';
|
|
@@ -24,10 +25,14 @@ const Switch = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
24
25
|
...rest
|
|
25
26
|
} = props;
|
|
26
27
|
const descriptionId = useUniqueId('description-', !!description);
|
|
28
|
+
const {
|
|
29
|
+
enableModernizedComponents
|
|
30
|
+
} = useBlueprintModernization();
|
|
27
31
|
return jsxs("div", {
|
|
28
32
|
className: clsx([styles.option], {
|
|
29
33
|
[styles.disabled]: disabled
|
|
30
34
|
}, className),
|
|
35
|
+
"data-modern": enableModernizedComponents,
|
|
31
36
|
children: [jsxs("label", {
|
|
32
37
|
className: clsx(styles.label, {
|
|
33
38
|
[styles.rightAlign]: isRightAligned
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"option":"bp_switch_module_option--
|
|
2
|
+
var styles = {"option":"bp_switch_module_option--d724c","label":"bp_switch_module_label--d724c","rightAlign":"bp_switch_module_rightAlign--d724c","description":"bp_switch_module_description--d724c","thumb":"bp_switch_module_thumb--d724c","switch":"bp_switch_module_switch--d724c","disabled":"bp_switch_module_disabled--d724c"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|