@luscii-healthtech/web-ui 44.6.0 → 44.7.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.development.js +3 -2
- 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 +4 -0
- package/dist/stories/RangeCoverage.stories.d.ts +1 -0
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -6184,7 +6184,7 @@ const ticksContainerStyle = {
|
|
|
6184
6184
|
width: "100%",
|
|
6185
6185
|
height: "20px"
|
|
6186
6186
|
};
|
|
6187
|
-
const RangeCoverageComponent = ({ sections, start, end, ticks = [], title, legendSwatches, translations, className }) => {
|
|
6187
|
+
const RangeCoverageComponent = ({ sections, start, end, ticks = [], tickFormatter, title, legendSwatches, translations, className }) => {
|
|
6188
6188
|
if (hasSectionOverlaps(sections)) {
|
|
6189
6189
|
return jsxRuntime.jsx(Text, { variant: "strong", children: translations.sectionOverlapsMessage });
|
|
6190
6190
|
}
|
|
@@ -6202,13 +6202,14 @@ const RangeCoverageComponent = ({ sections, start, end, ticks = [], title, legen
|
|
|
6202
6202
|
const position = isDescending ? (start - tick) / totalRange * 100 : (tick - start) / totalRange * 100;
|
|
6203
6203
|
const isFirst = index === 0;
|
|
6204
6204
|
const isLast = index === ticks.length - 1;
|
|
6205
|
+
const content = tickFormatter ? tickFormatter(tick) : tick;
|
|
6205
6206
|
return jsxRuntime.jsx(Text, { style: {
|
|
6206
6207
|
position: "absolute",
|
|
6207
6208
|
color: "var(--ui-color-text-neutral-secondary-default)",
|
|
6208
6209
|
whiteSpace: "nowrap",
|
|
6209
6210
|
left: `${position}%`,
|
|
6210
6211
|
transform: isFirst ? "translateX(0%)" : isLast ? "translateX(-100%)" : "translateX(-50%)"
|
|
6211
|
-
}, children:
|
|
6212
|
+
}, children: content }, tick);
|
|
6212
6213
|
}) })] })] }) });
|
|
6213
6214
|
};
|
|
6214
6215
|
const RangeCoverage = Object.assign(RangeCoverageComponent, {
|