@homebound/beam 2.212.1 → 2.212.3
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.
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
1
2
|
import { Margin, Only, Xss } from "../Css";
|
|
2
3
|
declare type ChipType = "caution" | "warning" | "success" | "light" | "dark" | "neutral";
|
|
3
4
|
export declare const ChipTypes: Record<ChipType, ChipType>;
|
|
4
5
|
export interface ChipProps<X> {
|
|
5
6
|
text: string;
|
|
6
|
-
title?:
|
|
7
|
+
title?: ReactNode;
|
|
7
8
|
xss?: X;
|
|
8
9
|
type?: ChipType;
|
|
9
10
|
compact?: boolean;
|
package/dist/components/Chip.js
CHANGED
|
@@ -22,7 +22,7 @@ function Chip({ type = exports.ChipTypes.neutral, ...props }) {
|
|
|
22
22
|
const tid = (0, useTestIds_1.useTestIds)(props, "chip");
|
|
23
23
|
return (0, Tooltip_1.maybeTooltip)({
|
|
24
24
|
title,
|
|
25
|
-
placement: "
|
|
25
|
+
placement: "bottom",
|
|
26
26
|
children: ((0, jsx_runtime_1.jsx)("span", Object.assign({ css: {
|
|
27
27
|
...Css_1.Css[compact ? "xs" : "sm"].dif.aic.br16.pl1.px1.pyPx(2).gray900.$,
|
|
28
28
|
...typeStyles[type],
|
|
@@ -166,8 +166,10 @@ function RowImpl(props) {
|
|
|
166
166
|
...(isTotals && hasExpandableHeader && Css_1.Css.boxShadow(`inset 0 -1px 0 ${Css_1.Palette.Gray200}`).$),
|
|
167
167
|
// Then apply any expandable header specific override
|
|
168
168
|
...(isExpandableHeader && style.expandableHeaderCss),
|
|
169
|
-
//
|
|
169
|
+
// Conditionally apply the right border styling for the header or totals row when using expandable tables
|
|
170
|
+
// Only apply if not the last column in the table AND when this column is the last column in the group of expandable column or not expanded AND
|
|
170
171
|
...(hasExpandableHeader &&
|
|
172
|
+
columns.length - 1 !== columnIndex &&
|
|
171
173
|
(isHeader || isTotals) &&
|
|
172
174
|
currentExpandedColumnCount === 0 &&
|
|
173
175
|
Css_1.Css.boxShadow(`inset -1px -1px 0 ${Css_1.Palette.Gray200}`).$),
|
|
@@ -53,7 +53,7 @@ function Popper({ triggerRef, content, placement = "auto" }) {
|
|
|
53
53
|
],
|
|
54
54
|
placement,
|
|
55
55
|
});
|
|
56
|
-
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsxs)("div", Object.assign({ ref: popperRef, style: styles.popper }, attributes.popper, { css: Css_1.Css.maxw("320px").bgGray900.white.px1.py("4px").br4.xs.
|
|
56
|
+
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsxs)("div", Object.assign({ ref: popperRef, style: styles.popper }, attributes.popper, { css: Css_1.Css.maxw("320px").bgGray900.white.px1.py("4px").br4.xs.add("zIndex", 999999).$ }, { children: [(0, jsx_runtime_1.jsx)("div", { ref: setArrowRef, style: { ...styles.arrow }, id: "arrow" }, void 0), content] }), void 0), document.body);
|
|
57
57
|
}
|
|
58
58
|
// Helper function to conditionally wrap component with Tooltip if necessary.
|
|
59
59
|
// `maybeTooltip` requires that the `children` prop be a ReactElement, even though <Tooltip /> allows for ReactNode.
|