@luscii-healthtech/web-ui 46.3.2 → 46.3.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.
@@ -6318,20 +6318,29 @@ const calculateSegments = (args) => {
6318
6318
  const lower = Math.min(clampedFrom, clampedTo);
6319
6319
  const startPos = isDescending ? (start - higher) / totalRange * 100 : (lower - start) / totalRange * 100;
6320
6320
  const width = (higher - lower) / totalRange * 100;
6321
+ const visualFrom = isDescending ? higher : lower;
6322
+ const visualTo = isDescending ? lower : higher;
6321
6323
  return {
6322
6324
  startPos,
6323
6325
  width,
6324
6326
  color: section.color,
6325
- originalSection: section
6327
+ originalSection: section,
6328
+ visualFrom,
6329
+ visualTo
6326
6330
  };
6327
6331
  }).filter((s) => s.width > 0).sort((a, b) => a.startPos - b.startPos);
6328
6332
  let currentPos = 0;
6333
+ let currentValue = start;
6329
6334
  for (const section of normalizedSections) {
6330
6335
  if (section.startPos > currentPos) {
6331
6336
  segments.push({
6332
6337
  widthPercent: section.startPos - currentPos,
6333
6338
  color: "transparent",
6334
- originalSection: section.originalSection
6339
+ originalSection: {
6340
+ from: currentValue,
6341
+ to: section.visualFrom,
6342
+ color: "transparent"
6343
+ }
6335
6344
  });
6336
6345
  }
6337
6346
  segments.push({
@@ -6340,13 +6349,14 @@ const calculateSegments = (args) => {
6340
6349
  originalSection: section.originalSection
6341
6350
  });
6342
6351
  currentPos = section.startPos + section.width;
6352
+ currentValue = section.visualTo;
6343
6353
  }
6344
6354
  if (currentPos < 100) {
6345
6355
  segments.push({
6346
6356
  widthPercent: 100 - currentPos,
6347
6357
  color: "transparent",
6348
6358
  originalSection: {
6349
- from: end,
6359
+ from: currentValue,
6350
6360
  to: end,
6351
6361
  color: "transparent"
6352
6362
  }
@@ -6456,7 +6466,10 @@ const RangeCoverageComponent = (_a) => {
6456
6466
  onSectionFocus === null || onSectionFocus === void 0 ? void 0 : onSectionFocus(sectionDataWithBackground);
6457
6467
  }, onMouseLeave: () => {
6458
6468
  onSectionFocus === null || onSectionFocus === void 0 ? void 0 : onSectionFocus(null);
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)
6469
+ } }) }), jsxRuntime.jsx(Tooltip.Content, { container: tooltipContent === null || tooltipContent === void 0 ? void 0 : tooltipContent.container, backgroundColor: "transparent", side: "bottom", sideOffset: 16, style: {
6470
+ minWidth: 200,
6471
+ maxWidth: 600
6472
+ }, children: jsxRuntime.jsx(Card, { border: true, elevation: "medium", width: "full", children: renderedTooltipContent }) })] }, ariaLabel)
6460
6473
  );
6461
6474
  }) }) }), ticks.length > 0 && jsxRuntime.jsx("div", { style: ticksContainerStyle, children: ticks.map((tick, index) => {
6462
6475
  const totalRange = Math.abs(end - start);