@wallarm-org/design-system 0.35.0 → 0.36.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/components/Attribute/AttributeActionsTarget.js +1 -1
- package/dist/components/Ip/IpList/IpListHorizontal.js +1 -1
- package/dist/components/OverflowList/OverflowList.js +1 -1
- package/dist/components/Popover/PopoverContent.js +1 -1
- package/dist/components/SimpleCharts/LineChart/LineChart.d.ts +70 -0
- package/dist/components/SimpleCharts/LineChart/LineChart.figma.d.ts +1 -0
- package/dist/components/SimpleCharts/LineChart/LineChart.figma.js +163 -0
- package/dist/components/SimpleCharts/LineChart/LineChart.js +136 -0
- package/dist/components/SimpleCharts/LineChart/LineChartBody.d.ts +12 -0
- package/dist/components/SimpleCharts/LineChart/LineChartBody.js +66 -0
- package/dist/components/SimpleCharts/LineChart/LineChartContext.d.ts +151 -0
- package/dist/components/SimpleCharts/LineChart/LineChartContext.js +16 -0
- package/dist/components/SimpleCharts/LineChart/LineChartEmpty.d.ts +15 -0
- package/dist/components/SimpleCharts/LineChart/LineChartEmpty.js +71 -0
- package/dist/components/SimpleCharts/LineChart/LineChartGrid.d.ts +19 -0
- package/dist/components/SimpleCharts/LineChart/LineChartGrid.js +17 -0
- package/dist/components/SimpleCharts/LineChart/LineChartHoverPopover.d.ts +5 -0
- package/dist/components/SimpleCharts/LineChart/LineChartHoverPopover.js +14 -0
- package/dist/components/SimpleCharts/LineChart/LineChartHoverPopoverDot.d.ts +14 -0
- package/dist/components/SimpleCharts/LineChart/LineChartHoverPopoverDot.js +20 -0
- package/dist/components/SimpleCharts/LineChart/LineChartHoverPopoverRow.d.ts +12 -0
- package/dist/components/SimpleCharts/LineChart/LineChartHoverPopoverRow.js +33 -0
- package/dist/components/SimpleCharts/LineChart/LineChartHoverPopoverTimestamp.d.ts +5 -0
- package/dist/components/SimpleCharts/LineChart/LineChartHoverPopoverTimestamp.js +12 -0
- package/dist/components/SimpleCharts/LineChart/LineChartLegend.d.ts +15 -0
- package/dist/components/SimpleCharts/LineChart/LineChartLegend.js +19 -0
- package/dist/components/SimpleCharts/LineChart/LineChartLegendItem.d.ts +14 -0
- package/dist/components/SimpleCharts/LineChart/LineChartLegendItem.js +112 -0
- package/dist/components/SimpleCharts/LineChart/LineChartLine.d.ts +17 -0
- package/dist/components/SimpleCharts/LineChart/LineChartLine.js +57 -0
- package/dist/components/SimpleCharts/LineChart/LineChartTooltip.d.ts +31 -0
- package/dist/components/SimpleCharts/LineChart/LineChartTooltip.js +75 -0
- package/dist/components/SimpleCharts/LineChart/LineChartXAxis.d.ts +51 -0
- package/dist/components/SimpleCharts/LineChart/LineChartXAxis.js +34 -0
- package/dist/components/SimpleCharts/LineChart/LineChartYAxis.d.ts +24 -0
- package/dist/components/SimpleCharts/LineChart/LineChartYAxis.js +30 -0
- package/dist/components/SimpleCharts/LineChart/LineChartZoomBrush.d.ts +32 -0
- package/dist/components/SimpleCharts/LineChart/LineChartZoomBrush.js +104 -0
- package/dist/components/SimpleCharts/LineChart/LineChartZoomPopover.d.ts +5 -0
- package/dist/components/SimpleCharts/LineChart/LineChartZoomPopover.js +14 -0
- package/dist/components/SimpleCharts/LineChart/LineChartZoomPopoverConfirm.d.ts +5 -0
- package/dist/components/SimpleCharts/LineChart/LineChartZoomPopoverConfirm.js +14 -0
- package/dist/components/SimpleCharts/LineChart/LineChartZoomPopoverRange.d.ts +5 -0
- package/dist/components/SimpleCharts/LineChart/LineChartZoomPopoverRange.js +12 -0
- package/dist/components/SimpleCharts/LineChart/classes.d.ts +28 -0
- package/dist/components/SimpleCharts/LineChart/classes.js +95 -0
- package/dist/components/SimpleCharts/LineChart/constants.d.ts +25 -0
- package/dist/components/SimpleCharts/LineChart/constants.js +26 -0
- package/dist/components/SimpleCharts/LineChart/hooks/index.d.ts +5 -0
- package/dist/components/SimpleCharts/LineChart/hooks/index.js +6 -0
- package/dist/components/SimpleCharts/LineChart/hooks/useLineChartActiveKey.d.ts +33 -0
- package/dist/components/SimpleCharts/LineChart/hooks/useLineChartActiveKey.js +33 -0
- package/dist/components/SimpleCharts/LineChart/hooks/useLineChartDataWarnings.d.ts +18 -0
- package/dist/components/SimpleCharts/LineChart/hooks/useLineChartDataWarnings.js +47 -0
- package/dist/components/SimpleCharts/LineChart/hooks/useLineChartZoomState.d.ts +37 -0
- package/dist/components/SimpleCharts/LineChart/hooks/useLineChartZoomState.js +111 -0
- package/dist/components/SimpleCharts/LineChart/hooks/useZoomDragListeners.d.ts +16 -0
- package/dist/components/SimpleCharts/LineChart/hooks/useZoomDragListeners.js +27 -0
- package/dist/components/SimpleCharts/LineChart/hooks/useZoomPendingListeners.d.ts +21 -0
- package/dist/components/SimpleCharts/LineChart/hooks/useZoomPendingListeners.js +35 -0
- package/dist/components/SimpleCharts/LineChart/index.d.ts +19 -0
- package/dist/components/SimpleCharts/LineChart/index.js +19 -0
- package/dist/components/SimpleCharts/LineChart/lib/dropEdgeGridLines.d.ts +30 -0
- package/dist/components/SimpleCharts/LineChart/lib/dropEdgeGridLines.js +48 -0
- package/dist/components/SimpleCharts/LineChart/lib/formatRange.d.ts +9 -0
- package/dist/components/SimpleCharts/LineChart/lib/formatRange.js +7 -0
- package/dist/components/SimpleCharts/LineChart/lib/sampleData.d.ts +15 -0
- package/dist/components/SimpleCharts/LineChart/lib/sampleData.js +109 -0
- package/dist/components/SimpleCharts/LineChart/lib/tickHorizontalCoordinates.d.ts +15 -0
- package/dist/components/SimpleCharts/LineChart/lib/tickHorizontalCoordinates.js +13 -0
- package/dist/components/SimpleCharts/LineChart/lib/warn.d.ts +4 -0
- package/dist/components/SimpleCharts/LineChart/lib/warn.js +6 -0
- package/dist/components/SimpleCharts/PieChart/PieChartContext.js +5 -2
- package/dist/components/SimpleCharts/PieChart/constants.d.ts +1 -2
- package/dist/components/SimpleCharts/PieChart/constants.js +2 -15
- package/dist/components/SimpleCharts/hooks/index.d.ts +1 -0
- package/dist/components/SimpleCharts/hooks/index.js +2 -0
- package/dist/components/SimpleCharts/hooks/useChartTimeFormatters.d.ts +21 -0
- package/dist/components/SimpleCharts/hooks/useChartTimeFormatters.js +33 -0
- package/dist/components/SimpleCharts/index.d.ts +3 -0
- package/dist/components/SimpleCharts/index.js +4 -1
- package/dist/components/SimpleCharts/lib/chartPalette.d.ts +10 -0
- package/dist/components/SimpleCharts/lib/chartPalette.js +20 -0
- package/dist/components/SimpleCharts/lib/hoverSync.d.ts +9 -0
- package/dist/components/SimpleCharts/lib/hoverSync.js +5 -0
- package/dist/components/SimpleCharts/lib/index.d.ts +2 -0
- package/dist/components/SimpleCharts/lib/index.js +3 -0
- package/dist/components/SimpleCharts/lib/timeFormatters.d.ts +25 -0
- package/dist/components/SimpleCharts/lib/timeFormatters.js +57 -0
- package/dist/hooks/useOverflowItems.js +1 -1
- package/dist/metadata/components.json +3665 -2
- package/dist/utils/formatDateTime.d.ts +4 -0
- package/dist/utils/formatDateTime.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useDateFormat } from "../../DateFormatProvider/useDateFormat.js";
|
|
3
|
+
import { formatChartDate, formatChartDateTime, formatChartHour, formatChartTimezone, withTimezoneChip } from "../lib/timeFormatters.js";
|
|
4
|
+
const useChartTimeFormatters = ()=>{
|
|
5
|
+
const { order = 'day-first', hourCycle } = useDateFormat();
|
|
6
|
+
const resolvedHourCycle = hourCycle ?? 24;
|
|
7
|
+
return useMemo(()=>{
|
|
8
|
+
const formatHour = (value)=>formatChartHour(value, {
|
|
9
|
+
hourCycle: resolvedHourCycle
|
|
10
|
+
});
|
|
11
|
+
const formatDate = (value)=>formatChartDate(value, {
|
|
12
|
+
order
|
|
13
|
+
});
|
|
14
|
+
const formatDateTime = (value)=>formatChartDateTime(value, {
|
|
15
|
+
order,
|
|
16
|
+
hourCycle: resolvedHourCycle
|
|
17
|
+
});
|
|
18
|
+
return {
|
|
19
|
+
formatHour,
|
|
20
|
+
formatDate,
|
|
21
|
+
formatDateTime,
|
|
22
|
+
formatTimezone: formatChartTimezone,
|
|
23
|
+
formatHourWithTimezone: withTimezoneChip(formatHour),
|
|
24
|
+
formatDateWithTimezone: withTimezoneChip(formatDate),
|
|
25
|
+
formatDateTimeWithTimezone: withTimezoneChip(formatDateTime),
|
|
26
|
+
formatDateRange: ({ from, to })=>`${formatDate(from)} → ${formatDate(to)}`
|
|
27
|
+
};
|
|
28
|
+
}, [
|
|
29
|
+
order,
|
|
30
|
+
resolvedHourCycle
|
|
31
|
+
]);
|
|
32
|
+
};
|
|
33
|
+
export { useChartTimeFormatters };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { BarList, BarListBar, type BarListBarProps, BarListItem, type BarListItemProps, BarListLabel, type BarListLabelProps, BarListPercent, type BarListPercentProps, type BarListProps, BarListSkeleton, type BarListSkeletonProps, BarListValue, type BarListValueProps, } from './BarList';
|
|
2
2
|
export { Chart, ChartActions, type ChartActionsProps, ChartEmpty, type ChartEmptyProps, ChartHeader, type ChartHeaderProps, type ChartProps, ChartTitle, type ChartTitleProps, } from './Chart';
|
|
3
|
+
export { type ChartTimeFormatters, useChartTimeFormatters } from './hooks';
|
|
4
|
+
export { LineChart, LineChartBody, type LineChartBodyProps, type LineChartDatum, LineChartEmpty, type LineChartEmptyProps, LineChartGrid, type LineChartGridProps, LineChartHoverPopover, LineChartHoverPopoverDot, type LineChartHoverPopoverDotProps, type LineChartHoverPopoverProps, LineChartHoverPopoverRow, type LineChartHoverPopoverRowProps, LineChartHoverPopoverTimestamp, type LineChartHoverPopoverTimestampProps, LineChartLegend, LineChartLegendItem, type LineChartLegendItemProps, type LineChartLegendOrientation, type LineChartLegendProps, LineChartLine, type LineChartLineProps, type LineChartProps, type LineChartSeries, LineChartTooltip, type LineChartTooltipProps, type LineChartTooltipRenderArgs, LineChartXAxis, type LineChartXAxisProps, LineChartYAxis, type LineChartYAxisProps, LineChartZoomBrush, type LineChartZoomBrushProps, LineChartZoomPopover, LineChartZoomPopoverConfirm, type LineChartZoomPopoverConfirmProps, type LineChartZoomPopoverProps, LineChartZoomPopoverRange, type LineChartZoomPopoverRangeProps, type LineChartZoomRange, } from './LineChart';
|
|
5
|
+
export { type ChartHourCycle, type ChartTimeFormatterOptions, type ChartTimeOrder, formatChartDate, formatChartDateTime, formatChartHour, formatChartTimezone, withTimezoneChip, } from './lib';
|
|
3
6
|
export { LegendDot, type LegendDotProps, PieChart, PieChartCenter, PieChartCenterLabel, type PieChartCenterLabelPluralRules, type PieChartCenterLabelProps, type PieChartCenterProps, PieChartCenterValue, type PieChartCenterValueProps, type PieChartDatum, PieChartDonut, type PieChartDonutProps, PieChartLegend, PieChartLegendItem, type PieChartLegendItemProps, PieChartLegendPercent, type PieChartLegendPercentProps, type PieChartLegendPercentVariant, type PieChartLegendProps, PieChartLegendValue, type PieChartLegendValueProps, type PieChartProps, PieChartSkeleton, type PieChartSkeletonProps, } from './PieChart';
|
|
4
7
|
export type { ChartColor } from './types';
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { BarList, BarListBar, BarListItem, BarListLabel, BarListPercent, BarListSkeleton, BarListValue } from "./BarList/index.js";
|
|
2
2
|
import { Chart, ChartActions, ChartEmpty, ChartHeader, ChartTitle } from "./Chart/index.js";
|
|
3
|
+
import { useChartTimeFormatters } from "./hooks/index.js";
|
|
4
|
+
import { LineChart, LineChartBody, LineChartEmpty, LineChartGrid, LineChartHoverPopover, LineChartHoverPopoverDot, LineChartHoverPopoverRow, LineChartHoverPopoverTimestamp, LineChartLegend, LineChartLegendItem, LineChartLine, LineChartTooltip, LineChartXAxis, LineChartYAxis, LineChartZoomBrush, LineChartZoomPopover, LineChartZoomPopoverConfirm, LineChartZoomPopoverRange } from "./LineChart/index.js";
|
|
5
|
+
import { formatChartDate, formatChartDateTime, formatChartHour, formatChartTimezone, withTimezoneChip } from "./lib/index.js";
|
|
3
6
|
import { LegendDot, PieChart, PieChartCenter, PieChartCenterLabel, PieChartCenterValue, PieChartDonut, PieChartLegend, PieChartLegendItem, PieChartLegendPercent, PieChartLegendValue, PieChartSkeleton } from "./PieChart/index.js";
|
|
4
|
-
export { BarList, BarListBar, BarListItem, BarListLabel, BarListPercent, BarListSkeleton, BarListValue, Chart, ChartActions, ChartEmpty, ChartHeader, ChartTitle, LegendDot, PieChart, PieChartCenter, PieChartCenterLabel, PieChartCenterValue, PieChartDonut, PieChartLegend, PieChartLegendItem, PieChartLegendPercent, PieChartLegendValue, PieChartSkeleton };
|
|
7
|
+
export { BarList, BarListBar, BarListItem, BarListLabel, BarListPercent, BarListSkeleton, BarListValue, Chart, ChartActions, ChartEmpty, ChartHeader, ChartTitle, LegendDot, LineChart, LineChartBody, LineChartEmpty, LineChartGrid, LineChartHoverPopover, LineChartHoverPopoverDot, LineChartHoverPopoverRow, LineChartHoverPopoverTimestamp, LineChartLegend, LineChartLegendItem, LineChartLine, LineChartTooltip, LineChartXAxis, LineChartYAxis, LineChartZoomBrush, LineChartZoomPopover, LineChartZoomPopoverConfirm, LineChartZoomPopoverRange, PieChart, PieChartCenter, PieChartCenterLabel, PieChartCenterValue, PieChartDonut, PieChartLegend, PieChartLegendItem, PieChartLegendPercent, PieChartLegendValue, PieChartSkeleton, formatChartDate, formatChartDateTime, formatChartHour, formatChartTimezone, useChartTimeFormatters, withTimezoneChip };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ChartColor } from '../types';
|
|
2
|
+
export declare const CHART_PALETTE_FILL: Record<ChartColor, string>;
|
|
3
|
+
/**
|
|
4
|
+
* Resolve a chart colour to a CSS color string. A `ChartColor` palette key is
|
|
5
|
+
* looked up in `CHART_PALETTE_FILL`; any other string is returned verbatim so
|
|
6
|
+
* callers can pass `var(--color-violet-500)`, `#8b5cf6`, `oklch(…)`, etc.
|
|
7
|
+
* Returns `undefined` only when `color` is undefined — the caller decides the
|
|
8
|
+
* fallback (line/slice fall back to slate; popover dots stay transparent).
|
|
9
|
+
*/
|
|
10
|
+
export declare const resolveChartColor: (color: ChartColor | string | undefined) => string | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const CHART_PALETTE_FILL = {
|
|
2
|
+
brand: 'var(--color-w-orange-500)',
|
|
3
|
+
blue: 'var(--color-blue-500)',
|
|
4
|
+
green: 'var(--color-green-500)',
|
|
5
|
+
red: 'var(--color-red-500)',
|
|
6
|
+
amber: 'var(--color-amber-500)',
|
|
7
|
+
purple: 'var(--color-purple-500)',
|
|
8
|
+
slate: 'var(--color-badge-slate-dark-alt)',
|
|
9
|
+
teal: 'var(--color-teal-500)',
|
|
10
|
+
cyan: 'var(--color-cyan-500)',
|
|
11
|
+
indigo: 'var(--color-indigo-500)',
|
|
12
|
+
pink: 'var(--color-pink-500)',
|
|
13
|
+
rose: 'var(--color-rose-500)'
|
|
14
|
+
};
|
|
15
|
+
const resolveChartColor = (color)=>{
|
|
16
|
+
if (void 0 === color) return;
|
|
17
|
+
if (color in CHART_PALETTE_FILL) return CHART_PALETTE_FILL[color];
|
|
18
|
+
return color;
|
|
19
|
+
};
|
|
20
|
+
export { CHART_PALETTE_FILL, resolveChartColor };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds an `isHoverSyncTarget` predicate for a chart's hover-syncing surfaces.
|
|
3
|
+
*
|
|
4
|
+
* Without this guard, mouseLeave/blur handlers fire `setActive(null)` on every
|
|
5
|
+
* row crossing — and the matching mouseEnter on the next sibling re-sets the
|
|
6
|
+
* active key, but React commits the intermediate `null` frame first, flickering
|
|
7
|
+
* popovers and dimmed series on every crossing.
|
|
8
|
+
*/
|
|
9
|
+
export declare const makeIsHoverSyncTarget: (slots: readonly string[]) => (target: EventTarget | null | undefined) => boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { makeIsHoverSyncTarget } from "./hoverSync.js";
|
|
2
|
+
import { formatChartDate, formatChartDateTime, formatChartHour, formatChartTimezone, withTimezoneChip } from "./timeFormatters.js";
|
|
3
|
+
export { formatChartDate, formatChartDateTime, formatChartHour, formatChartTimezone, makeIsHoverSyncTarget, withTimezoneChip };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { DateOrder } from '../../DateFormatProvider/context';
|
|
3
|
+
export type ChartTimeOrder = DateOrder;
|
|
4
|
+
export type ChartHourCycle = 12 | 24;
|
|
5
|
+
export interface ChartTimeFormatterOptions {
|
|
6
|
+
order?: ChartTimeOrder;
|
|
7
|
+
hourCycle?: ChartHourCycle;
|
|
8
|
+
}
|
|
9
|
+
/** `14:32` (24h) / `2:32 PM` (12h). Empty string for invalid input. */
|
|
10
|
+
export declare const formatChartHour: (value: unknown, options?: {
|
|
11
|
+
hourCycle?: ChartHourCycle;
|
|
12
|
+
}) => string;
|
|
13
|
+
/** `24 Jan` (day-first) / `Jan 24` (month-first). Year is omitted — axis space is precious. */
|
|
14
|
+
export declare const formatChartDate: (value: unknown, options?: {
|
|
15
|
+
order?: ChartTimeOrder;
|
|
16
|
+
}) => string;
|
|
17
|
+
/** Combined `24 Jan 14:32`. Respects both `order` and `hourCycle`. */
|
|
18
|
+
export declare const formatChartDateTime: (value: unknown, options?: ChartTimeFormatterOptions) => string;
|
|
19
|
+
/** `GMT±N` / `UTC`. Delegates to the shared `utils/formatDateTime` helper. */
|
|
20
|
+
export declare const formatChartTimezone: (value: unknown) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Wrap a string formatter so it appends a dimmed timezone chip. Returns a
|
|
23
|
+
* `ReactNode` so it can be passed to tooltip / zoom-popover slots.
|
|
24
|
+
*/
|
|
25
|
+
export declare const withTimezoneChip: (formatter: (value: unknown) => string) => ((value: unknown) => ReactNode);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { format, isValid } from "date-fns";
|
|
3
|
+
import { formatTimezone } from "../../../utils/formatDateTime.js";
|
|
4
|
+
const toDate = (value)=>{
|
|
5
|
+
if (value instanceof Date) return isValid(value) ? value : null;
|
|
6
|
+
if ('number' == typeof value || 'string' == typeof value) {
|
|
7
|
+
const d = new Date(value);
|
|
8
|
+
return isValid(d) ? d : null;
|
|
9
|
+
}
|
|
10
|
+
return null;
|
|
11
|
+
};
|
|
12
|
+
const datePattern = (order, withYear)=>{
|
|
13
|
+
if ('month-first' === order) return withYear ? 'MMM d, yyyy' : 'MMM d';
|
|
14
|
+
return withYear ? 'd MMM, yyyy' : 'd MMM';
|
|
15
|
+
};
|
|
16
|
+
const timePattern = (hourCycle, withSeconds)=>{
|
|
17
|
+
if (12 === hourCycle) return withSeconds ? 'h:mm:ss a' : 'h:mm a';
|
|
18
|
+
return withSeconds ? 'HH:mm:ss' : 'HH:mm';
|
|
19
|
+
};
|
|
20
|
+
const formatChartHour = (value, options = {})=>{
|
|
21
|
+
const date = toDate(value);
|
|
22
|
+
if (!date) return '';
|
|
23
|
+
return format(date, timePattern(options.hourCycle ?? 24, false));
|
|
24
|
+
};
|
|
25
|
+
const formatChartDate = (value, options = {})=>{
|
|
26
|
+
const date = toDate(value);
|
|
27
|
+
if (!date) return '';
|
|
28
|
+
return format(date, datePattern(options.order ?? 'day-first', false));
|
|
29
|
+
};
|
|
30
|
+
const formatChartDateTime = (value, options = {})=>{
|
|
31
|
+
const date = toDate(value);
|
|
32
|
+
if (!date) return '';
|
|
33
|
+
const { order = 'day-first', hourCycle = 24 } = options;
|
|
34
|
+
return format(date, `${datePattern(order, false)} ${timePattern(hourCycle, false)}`);
|
|
35
|
+
};
|
|
36
|
+
const formatChartTimezone = (value)=>{
|
|
37
|
+
const date = toDate(value);
|
|
38
|
+
return date ? formatTimezone(date) : '';
|
|
39
|
+
};
|
|
40
|
+
const withTimezoneChip = (formatter)=>(value)=>{
|
|
41
|
+
const date = toDate(value);
|
|
42
|
+
if (!date) return null;
|
|
43
|
+
const main = formatter(value);
|
|
44
|
+
if (!main) return null;
|
|
45
|
+
const tz = formatTimezone(date);
|
|
46
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
47
|
+
children: [
|
|
48
|
+
main,
|
|
49
|
+
" ",
|
|
50
|
+
/*#__PURE__*/ jsx("span", {
|
|
51
|
+
className: "text-text-secondary",
|
|
52
|
+
children: tz
|
|
53
|
+
})
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
export { formatChartDate, formatChartDateTime, formatChartHour, formatChartTimezone, withTimezoneChip };
|
|
@@ -44,7 +44,7 @@ function useOverflowItems({ items, renderItem, renderMeasurementItem, overflowRe
|
|
|
44
44
|
]);
|
|
45
45
|
if (overflowElement && 'object' == typeof overflowElement) tempDiv.textContent = '+1';
|
|
46
46
|
}
|
|
47
|
-
dynamicReserveSpace = tempDiv.offsetWidth + gap;
|
|
47
|
+
dynamicReserveSpace = Math.max(reserveSpace, tempDiv.offsetWidth + gap);
|
|
48
48
|
document.body.removeChild(tempDiv);
|
|
49
49
|
} catch {}
|
|
50
50
|
const maxWidth = availableWidth - (needsIndicator ? dynamicReserveSpace : 0);
|