@homebound/beam 3.10.0 → 3.11.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/index.cjs +13 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -7
- package/dist/index.d.ts +12 -7
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5758,9 +5758,9 @@ interface AvatarProps {
|
|
|
5758
5758
|
name?: string;
|
|
5759
5759
|
size?: AvatarSize;
|
|
5760
5760
|
showName?: boolean;
|
|
5761
|
-
|
|
5761
|
+
preventTooltip?: boolean;
|
|
5762
5762
|
}
|
|
5763
|
-
declare function Avatar({ src, name, size, showName,
|
|
5763
|
+
declare function Avatar({ src, name, size, showName, preventTooltip, ...others }: AvatarProps): JSX.Element;
|
|
5764
5764
|
type AvatarSize = "sm" | "md" | "lg" | "xl";
|
|
5765
5765
|
|
|
5766
5766
|
/** Base Interfaced */
|
|
@@ -6033,6 +6033,11 @@ type IconButtonProps = {
|
|
|
6033
6033
|
download?: boolean;
|
|
6034
6034
|
/** Provides label for screen readers - Will become a required soon */
|
|
6035
6035
|
label?: string;
|
|
6036
|
+
/**
|
|
6037
|
+
* By default the `label` is also surfaced as a hover tooltip. Set this to keep the `aria-label`
|
|
6038
|
+
* for screen readers without showing the tooltip. An explicit `tooltip` or disabled reason still shows.
|
|
6039
|
+
*/
|
|
6040
|
+
preventTooltip?: boolean;
|
|
6036
6041
|
} & BeamButtonProps & BeamFocusableProps;
|
|
6037
6042
|
declare function IconButton(props: IconButtonProps): JSX.Element;
|
|
6038
6043
|
declare const iconButtonStylesHover: Pick<Properties, never> & {
|
|
@@ -6096,7 +6101,7 @@ declare function NavGroup(props: NavGroupProps): JSX.Element;
|
|
|
6096
6101
|
|
|
6097
6102
|
type TextButtonTriggerProps = Pick<ButtonProps, "label" | "variant" | "size" | "icon">;
|
|
6098
6103
|
type IconButtonTriggerProps = Pick<IconButtonProps, "icon" | "color" | "compact" | "inc">;
|
|
6099
|
-
type AvatarButtonTriggerProps = Pick<AvatarButtonProps, "src" | "name" | "size">;
|
|
6104
|
+
type AvatarButtonTriggerProps = Pick<AvatarButtonProps, "src" | "name" | "size" | "preventTooltip">;
|
|
6100
6105
|
type NavLinkButtonTriggerProps = {
|
|
6101
6106
|
navLabel: string;
|
|
6102
6107
|
} & Pick<NavLinkProps, "active" | "variant" | "icon">;
|
|
@@ -8796,10 +8801,10 @@ declare const zIndices: {
|
|
|
8796
8801
|
readonly tableExpandableTitle: 20;
|
|
8797
8802
|
readonly tableStickyColumn: 30;
|
|
8798
8803
|
readonly tableStickyHeader: 40;
|
|
8799
|
-
readonly scrollShadow:
|
|
8800
|
-
readonly superDrawerScrim:
|
|
8801
|
-
readonly modalUnderlay:
|
|
8802
|
-
readonly pageStickyHeader:
|
|
8804
|
+
readonly scrollShadow: 50;
|
|
8805
|
+
readonly superDrawerScrim: 50;
|
|
8806
|
+
readonly modalUnderlay: 60;
|
|
8807
|
+
readonly pageStickyHeader: 70;
|
|
8803
8808
|
readonly dragHandle: 80;
|
|
8804
8809
|
readonly sideNav: 100;
|
|
8805
8810
|
readonly snackbar: 120;
|
package/dist/index.d.ts
CHANGED
|
@@ -5758,9 +5758,9 @@ interface AvatarProps {
|
|
|
5758
5758
|
name?: string;
|
|
5759
5759
|
size?: AvatarSize;
|
|
5760
5760
|
showName?: boolean;
|
|
5761
|
-
|
|
5761
|
+
preventTooltip?: boolean;
|
|
5762
5762
|
}
|
|
5763
|
-
declare function Avatar({ src, name, size, showName,
|
|
5763
|
+
declare function Avatar({ src, name, size, showName, preventTooltip, ...others }: AvatarProps): JSX.Element;
|
|
5764
5764
|
type AvatarSize = "sm" | "md" | "lg" | "xl";
|
|
5765
5765
|
|
|
5766
5766
|
/** Base Interfaced */
|
|
@@ -6033,6 +6033,11 @@ type IconButtonProps = {
|
|
|
6033
6033
|
download?: boolean;
|
|
6034
6034
|
/** Provides label for screen readers - Will become a required soon */
|
|
6035
6035
|
label?: string;
|
|
6036
|
+
/**
|
|
6037
|
+
* By default the `label` is also surfaced as a hover tooltip. Set this to keep the `aria-label`
|
|
6038
|
+
* for screen readers without showing the tooltip. An explicit `tooltip` or disabled reason still shows.
|
|
6039
|
+
*/
|
|
6040
|
+
preventTooltip?: boolean;
|
|
6036
6041
|
} & BeamButtonProps & BeamFocusableProps;
|
|
6037
6042
|
declare function IconButton(props: IconButtonProps): JSX.Element;
|
|
6038
6043
|
declare const iconButtonStylesHover: Pick<Properties, never> & {
|
|
@@ -6096,7 +6101,7 @@ declare function NavGroup(props: NavGroupProps): JSX.Element;
|
|
|
6096
6101
|
|
|
6097
6102
|
type TextButtonTriggerProps = Pick<ButtonProps, "label" | "variant" | "size" | "icon">;
|
|
6098
6103
|
type IconButtonTriggerProps = Pick<IconButtonProps, "icon" | "color" | "compact" | "inc">;
|
|
6099
|
-
type AvatarButtonTriggerProps = Pick<AvatarButtonProps, "src" | "name" | "size">;
|
|
6104
|
+
type AvatarButtonTriggerProps = Pick<AvatarButtonProps, "src" | "name" | "size" | "preventTooltip">;
|
|
6100
6105
|
type NavLinkButtonTriggerProps = {
|
|
6101
6106
|
navLabel: string;
|
|
6102
6107
|
} & Pick<NavLinkProps, "active" | "variant" | "icon">;
|
|
@@ -8796,10 +8801,10 @@ declare const zIndices: {
|
|
|
8796
8801
|
readonly tableExpandableTitle: 20;
|
|
8797
8802
|
readonly tableStickyColumn: 30;
|
|
8798
8803
|
readonly tableStickyHeader: 40;
|
|
8799
|
-
readonly scrollShadow:
|
|
8800
|
-
readonly superDrawerScrim:
|
|
8801
|
-
readonly modalUnderlay:
|
|
8802
|
-
readonly pageStickyHeader:
|
|
8804
|
+
readonly scrollShadow: 50;
|
|
8805
|
+
readonly superDrawerScrim: 50;
|
|
8806
|
+
readonly modalUnderlay: 60;
|
|
8807
|
+
readonly pageStickyHeader: 70;
|
|
8803
8808
|
readonly dragHandle: 80;
|
|
8804
8809
|
readonly sideNav: 100;
|
|
8805
8810
|
readonly snackbar: 120;
|
package/dist/index.js
CHANGED
|
@@ -5323,7 +5323,8 @@ function IconButton(props) {
|
|
|
5323
5323
|
circle = false,
|
|
5324
5324
|
download = false,
|
|
5325
5325
|
forceFocusStyles = false,
|
|
5326
|
-
label
|
|
5326
|
+
label,
|
|
5327
|
+
preventTooltip = false
|
|
5327
5328
|
} = props;
|
|
5328
5329
|
const isDisabled = !!disabled;
|
|
5329
5330
|
const ariaProps = {
|
|
@@ -5374,7 +5375,7 @@ function IconButton(props) {
|
|
|
5374
5375
|
};
|
|
5375
5376
|
const buttonContent = /* @__PURE__ */ jsx11(Icon, { icon, color: color || (isDisabled ? "--b-text-disabled" /* TextDisabled */ : circle && (isHovered || active || isFocusVisible) ? defaultIconColor : iconColor), bgColor, inc: compact ? 2 : circle ? 2.5 : inc });
|
|
5376
5377
|
return maybeTooltip({
|
|
5377
|
-
title: resolveTooltip(disabled ?? label, tooltip),
|
|
5378
|
+
title: resolveTooltip(disabled ?? (preventTooltip ? void 0 : label), tooltip),
|
|
5378
5379
|
placement: "top",
|
|
5379
5380
|
children: getButtonOrLink(buttonContent, onPress, buttonAttrs, openInNew, download)
|
|
5380
5381
|
});
|
|
@@ -5718,11 +5719,11 @@ var zIndices = {
|
|
|
5718
5719
|
tableExpandableTitle: 20,
|
|
5719
5720
|
tableStickyColumn: 30,
|
|
5720
5721
|
tableStickyHeader: 40,
|
|
5721
|
-
// Page chrome
|
|
5722
|
-
scrollShadow:
|
|
5723
|
-
superDrawerScrim:
|
|
5724
|
-
modalUnderlay:
|
|
5725
|
-
pageStickyHeader:
|
|
5722
|
+
// Page chrome - ensure these items sit above the table
|
|
5723
|
+
scrollShadow: 50,
|
|
5724
|
+
superDrawerScrim: 50,
|
|
5725
|
+
modalUnderlay: 60,
|
|
5726
|
+
pageStickyHeader: 70,
|
|
5726
5727
|
dragHandle: 80,
|
|
5727
5728
|
// Side-nav layer. Mobile rail overlays page content when expanded; sits below
|
|
5728
5729
|
// snackbar so toasts still land on top.
|
|
@@ -8840,7 +8841,7 @@ function Avatar({
|
|
|
8840
8841
|
name,
|
|
8841
8842
|
size = "md",
|
|
8842
8843
|
showName = false,
|
|
8843
|
-
|
|
8844
|
+
preventTooltip = false,
|
|
8844
8845
|
...others
|
|
8845
8846
|
}) {
|
|
8846
8847
|
const tid = useTestIds(others, "avatar");
|
|
@@ -8888,7 +8889,7 @@ function Avatar({
|
|
|
8888
8889
|
...__typography4[sizeToTypeScale[size]] ?? {}
|
|
8889
8890
|
}), children: name })
|
|
8890
8891
|
] }) : maybeTooltip({
|
|
8891
|
-
title:
|
|
8892
|
+
title: preventTooltip ? void 0 : name,
|
|
8892
8893
|
children: img,
|
|
8893
8894
|
placement: "top"
|
|
8894
8895
|
});
|
|
@@ -8937,6 +8938,7 @@ function AvatarButton(props) {
|
|
|
8937
8938
|
openInNew,
|
|
8938
8939
|
forceFocusStyles = false,
|
|
8939
8940
|
__storyState,
|
|
8941
|
+
preventTooltip = false,
|
|
8940
8942
|
...avatarProps
|
|
8941
8943
|
} = props;
|
|
8942
8944
|
const isDisabled = !!disabled;
|
|
@@ -8983,12 +8985,11 @@ function AvatarButton(props) {
|
|
|
8983
8985
|
...mergeProps7(typeof onPress === "string" ? navLink : void 0, void 0, styles)
|
|
8984
8986
|
};
|
|
8985
8987
|
const content = /* @__PURE__ */ jsxs21(Fragment11, { children: [
|
|
8986
|
-
/* @__PURE__ */ jsx34(Avatar, { ...avatarProps, ...tid,
|
|
8988
|
+
/* @__PURE__ */ jsx34(Avatar, { ...avatarProps, ...tid, preventTooltip: true }),
|
|
8987
8989
|
isPressed && /* @__PURE__ */ jsx34("span", { ...trussProps23(pressedOverlayCss) })
|
|
8988
8990
|
] });
|
|
8989
8991
|
return maybeTooltip({
|
|
8990
|
-
|
|
8991
|
-
title: resolveTooltip(disabled, tooltip ?? avatarProps.name),
|
|
8992
|
+
title: resolveTooltip(disabled, tooltip ?? (preventTooltip ? void 0 : avatarProps.name)),
|
|
8992
8993
|
placement: "top",
|
|
8993
8994
|
// Disable the auto-tooltip in Avatar to prevent nested tooltips which can cause issues with interactions
|
|
8994
8995
|
children: getButtonOrLink(content, onPress, buttonAttrs, openInNew)
|