@luscii-healthtech/web-ui 46.3.0 → 46.3.2
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.development.js +5 -4
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/src/components/RangeCoverage/RangeCoverage.d.ts +19 -2
- package/dist/src/generated/components/RangeCoverage/RangeCoverage.d.ts +19 -2
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +4 -7
|
@@ -6414,6 +6414,7 @@ const ticksContainerStyle = {
|
|
|
6414
6414
|
};
|
|
6415
6415
|
const RangeCoverageComponent = (_a) => {
|
|
6416
6416
|
var { sections, start, end, ticks = [], tickFormatter, title, legendSwatches, onSectionFocus, translations, className, slots } = _a, rest = __rest(_a, ["sections", "start", "end", "ticks", "tickFormatter", "title", "legendSwatches", "onSectionFocus", "translations", "className", "slots"]);
|
|
6417
|
+
const { tooltipContent } = slots !== null && slots !== void 0 ? slots : {};
|
|
6417
6418
|
if (hasSectionOverlaps(sections)) {
|
|
6418
6419
|
return jsxRuntime.jsx(Text, { variant: "strong", children: translations.sectionOverlapsMessage });
|
|
6419
6420
|
}
|
|
@@ -6426,9 +6427,9 @@ const RangeCoverageComponent = (_a) => {
|
|
|
6426
6427
|
}) : swatch.color;
|
|
6427
6428
|
return jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx("div", { style: Object.assign(Object.assign({}, legendSwatchStyle), { background }) }), jsxRuntime.jsx(Text, { as: "span", children: swatch.label })] }, swatch.label);
|
|
6428
6429
|
}) }) })] }), jsxRuntime.jsxs(Stack, { gap: "xs", width: "full", align: "stretch", children: [jsxRuntime.jsx("div", { style: barContainerStyle, children: jsxRuntime.jsx("div", { style: barStyle, children: segments.map((segment) => {
|
|
6429
|
-
var _a2;
|
|
6430
|
+
var _a2, _b;
|
|
6430
6431
|
const sectionDataWithBackground = Object.assign(Object.assign({}, segment.originalSection), { background: getSegmentStyle(segment.color).background });
|
|
6431
|
-
const renderedTooltipContent = (_a2 =
|
|
6432
|
+
const renderedTooltipContent = (_a2 = tooltipContent === null || tooltipContent === void 0 ? void 0 : tooltipContent.render) === null || _a2 === void 0 ? void 0 : _a2.call(tooltipContent, sectionDataWithBackground);
|
|
6432
6433
|
const segmentStyle = Object.assign({ flexBasis: `calc(${segment.widthPercent}% - 1px)`, flexGrow: 0, flexShrink: 0, marginRight: "1px" }, getSegmentStyle(segment.color));
|
|
6433
6434
|
const ariaLabel = `${segment.originalSection.from} - ${segment.originalSection.to}`;
|
|
6434
6435
|
if (!renderedTooltipContent && !onSectionFocus) {
|
|
@@ -6447,7 +6448,7 @@ const RangeCoverageComponent = (_a) => {
|
|
|
6447
6448
|
}
|
|
6448
6449
|
return (
|
|
6449
6450
|
// Sections cannot overlap, so from-to should be unique
|
|
6450
|
-
jsxRuntime.jsxs(Tooltip.Root, { children: [jsxRuntime.jsx(Tooltip.Trigger, { asChild: true, children: jsxRuntime.jsx("button", { "aria-label": ariaLabel, style: segmentStyle, onFocus: () => {
|
|
6451
|
+
jsxRuntime.jsxs(Tooltip.Root, { delayDuration: (_b = tooltipContent === null || tooltipContent === void 0 ? void 0 : tooltipContent.delayDuration) !== null && _b !== void 0 ? _b : 100, children: [jsxRuntime.jsx(Tooltip.Trigger, { asChild: true, children: jsxRuntime.jsx("button", { "aria-label": ariaLabel, style: segmentStyle, onFocus: () => {
|
|
6451
6452
|
onSectionFocus === null || onSectionFocus === void 0 ? void 0 : onSectionFocus(sectionDataWithBackground);
|
|
6452
6453
|
}, onBlur: () => {
|
|
6453
6454
|
onSectionFocus === null || onSectionFocus === void 0 ? void 0 : onSectionFocus(null);
|
|
@@ -6455,7 +6456,7 @@ const RangeCoverageComponent = (_a) => {
|
|
|
6455
6456
|
onSectionFocus === null || onSectionFocus === void 0 ? void 0 : onSectionFocus(sectionDataWithBackground);
|
|
6456
6457
|
}, onMouseLeave: () => {
|
|
6457
6458
|
onSectionFocus === null || onSectionFocus === void 0 ? void 0 : onSectionFocus(null);
|
|
6458
|
-
} }) }), jsxRuntime.jsx(Tooltip.Content, { backgroundColor: "transparent", side: "bottom", sideOffset: 16, children: jsxRuntime.jsx(Card, { border: true, elevation: "medium", children: renderedTooltipContent }) })] }, ariaLabel)
|
|
6459
|
+
} }) }), jsxRuntime.jsx(Tooltip.Content, { container: tooltipContent === null || tooltipContent === void 0 ? void 0 : tooltipContent.container, backgroundColor: "transparent", side: "bottom", sideOffset: 16, children: jsxRuntime.jsx(Card, { border: true, elevation: "medium", children: renderedTooltipContent }) })] }, ariaLabel)
|
|
6459
6460
|
);
|
|
6460
6461
|
}) }) }), ticks.length > 0 && jsxRuntime.jsx("div", { style: ticksContainerStyle, children: ticks.map((tick, index) => {
|
|
6461
6462
|
const totalRange = Math.abs(end - start);
|