@mlw-packages/react-components 1.9.4 → 1.9.6

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.mjs CHANGED
@@ -42,7 +42,7 @@ import ptBR3 from 'date-fns/locale/pt-BR';
42
42
  import { useSensors, useSensor, MouseSensor, TouchSensor, PointerSensor, DndContext, DragOverlay, useDroppable, useDraggable } from '@dnd-kit/core';
43
43
  import { CSS } from '@dnd-kit/utilities';
44
44
  import { RadioGroup, RadioGroupItem } from '@radix-ui/react-radio-group';
45
- import { ResponsiveContainer, ComposedChart, XAxis, YAxis, Bar, Line, Area, CartesianGrid, ReferenceLine, Tooltip, Legend, LabelList, Rectangle, PieChart, Pie, Cell } from 'recharts';
45
+ import { ResponsiveContainer, ComposedChart, XAxis, YAxis, Bar, Line, Area, CartesianGrid, Tooltip, Legend, LabelList, Rectangle, PieChart, Pie, Cell } from 'recharts';
46
46
 
47
47
  var __create = Object.create;
48
48
  var __defProp = Object.defineProperty;
@@ -14303,42 +14303,6 @@ var computeYAxisTickWidth = (chartMarginLeft, yAxisLabel, axisLabelMargin, yTick
14303
14303
  const estimated = Math.max(48, Math.min(220, maxLen * 8 + 24));
14304
14304
  return estimated;
14305
14305
  };
14306
- var CustomYAxisTick = (props) => {
14307
- const { x = 0, y = 0, payload } = props;
14308
- const text = String(payload?.value || "");
14309
- const maxCharsPerLine = 20;
14310
- const words = text.split(" ");
14311
- const lines = [];
14312
- let currentLine = "";
14313
- words.forEach((word) => {
14314
- const testLine = currentLine ? `${currentLine} ${word}` : word;
14315
- if (testLine.length > maxCharsPerLine && currentLine) {
14316
- lines.push(currentLine);
14317
- currentLine = word;
14318
- } else {
14319
- currentLine = testLine;
14320
- }
14321
- });
14322
- if (currentLine) {
14323
- lines.push(currentLine);
14324
- }
14325
- const lineHeight = 12;
14326
- const totalHeight = lines.length * lineHeight;
14327
- const startY = y - totalHeight / 2 + lineHeight / 2;
14328
- return /* @__PURE__ */ jsx("g", { children: lines.map((line, index) => /* @__PURE__ */ jsx(
14329
- "text",
14330
- {
14331
- x,
14332
- y: startY + index * lineHeight,
14333
- textAnchor: "end",
14334
- fill: "hsl(var(--muted-foreground))",
14335
- fontSize: 11,
14336
- children: line
14337
- },
14338
- index
14339
- )) });
14340
- };
14341
- var CustomYAxisTick_default = CustomYAxisTick;
14342
14306
  var menuVariants = {
14343
14307
  hidden: { opacity: 0, y: -6, scale: 0.98 },
14344
14308
  visible: { opacity: 1, y: 0, scale: 1 },
@@ -16163,7 +16127,7 @@ var HorizontalLegend = ({
16163
16127
  const label = mapperConfig[key]?.label ?? labelMap?.[key] ?? formatFieldName2(key);
16164
16128
  return legendUppercase ? label.toUpperCase() : label;
16165
16129
  };
16166
- return /* @__PURE__ */ jsx("div", { className: cn(className), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-2 sm:gap-3 md:gap-4 overflow-x-auto", children: [
16130
+ return /* @__PURE__ */ jsx("div", { className: cn(className), children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-left gap-2 sm:gap-3 md:gap-4 overflow-x-auto", children: [
16167
16131
  allKeys.map((key) => {
16168
16132
  const displayLabel = formatLegendLabel(key);
16169
16133
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-shrink-0", children: [
@@ -17140,9 +17104,9 @@ var Chart = ({
17140
17104
  isLoading = false,
17141
17105
  timeSeries,
17142
17106
  timeSeriesLegend,
17143
- customLegend,
17144
- horizontal = false,
17145
- orderBy
17107
+ customLegend
17108
+ // horizontal removido
17109
+ // orderBy removido
17146
17110
  }) => {
17147
17111
  const { xAxisConfig, mapperConfig } = useMemo(() => {
17148
17112
  return fnSmartConfig({ xAxis, data, labelMap });
@@ -17178,12 +17142,6 @@ var Chart = ({
17178
17142
  defaultEndIndex: timeSeriesConfig?.end,
17179
17143
  onRangeChange: timeSeriesConfig?.onRangeChange
17180
17144
  });
17181
- const { maxPeriodLabel, minPeriodLabel } = useChartMinMax({
17182
- processedData: data,
17183
- orderBy,
17184
- xAxisDataKey: xAxisConfig.dataKey,
17185
- categoryFormatter
17186
- });
17187
17145
  const processedData = useMemo(() => {
17188
17146
  const mapped = data.map((item) => ({
17189
17147
  ...item,
@@ -17193,23 +17151,8 @@ var Chart = ({
17193
17151
  if (timeSeriesConfig) {
17194
17152
  result = mapped.slice(startIndex, endIndex + 1);
17195
17153
  }
17196
- if (orderBy && horizontal) {
17197
- result = [...result].sort((a, b) => {
17198
- const valueA = Number(a[orderBy]) || 0;
17199
- const valueB = Number(b[orderBy]) || 0;
17200
- return valueB - valueA;
17201
- });
17202
- }
17203
17154
  return result;
17204
- }, [
17205
- data,
17206
- xAxisConfig.dataKey,
17207
- timeSeriesConfig,
17208
- startIndex,
17209
- endIndex,
17210
- orderBy,
17211
- horizontal
17212
- ]);
17155
+ }, [data, xAxisConfig.dataKey, timeSeriesConfig, startIndex, endIndex]);
17213
17156
  const seriesOrder = filtersOrder(mapperConfig, series);
17214
17157
  const allKeys = seriesOrder.map((s) => s.key).filter(Boolean);
17215
17158
  const finalColors = useMemo(
@@ -17305,10 +17248,6 @@ var Chart = ({
17305
17248
  const finalChartRightMargin = chartMargin?.right ?? (rightKeys.length > 0 ? AXIS_LABEL_MARGIN : 30);
17306
17249
  const finalChartLeftMargin = chartMargin?.left ?? (yAxisLabel ? AXIS_LABEL_MARGIN : 0);
17307
17250
  const yAxisTickWidth = useMemo(() => {
17308
- if (horizontal) {
17309
- if (typeof chartMargin?.left === "number") return chartMargin.left;
17310
- return 130;
17311
- }
17312
17251
  return computeYAxisTickWidth(
17313
17252
  chartMargin?.left,
17314
17253
  yAxisLabel,
@@ -17318,7 +17257,6 @@ var Chart = ({
17318
17257
  niceMaxLeft
17319
17258
  );
17320
17259
  }, [
17321
- horizontal,
17322
17260
  chartMargin?.left,
17323
17261
  yAxisLabel,
17324
17262
  yTickFormatter,
@@ -17404,7 +17342,7 @@ var Chart = ({
17404
17342
  ] }) })
17405
17343
  ] });
17406
17344
  }
17407
- return /* @__PURE__ */ jsx(
17345
+ return /* @__PURE__ */ jsxs(
17408
17346
  "div",
17409
17347
  {
17410
17348
  ref: wrapperRef,
@@ -17412,513 +17350,400 @@ var Chart = ({
17412
17350
  "w-full overflow-hidden min-w-0 rounded-lg border-border",
17413
17351
  className
17414
17352
  ),
17415
- children: /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-card relative w-full max-w-full min-w-0 py-1", children: [
17416
- title && /* @__PURE__ */ jsx(
17417
- "div",
17418
- {
17419
- className: cn(
17420
- "w-full flex items-center mt-3 mb-2",
17421
- HORIZONTAL_PADDING_CLASS,
17422
- titlePosition === "center" && "justify-center",
17423
- titlePosition === "right" && "justify-end",
17424
- titlePosition === "left" && "justify-start"
17425
- ),
17426
- children: /* @__PURE__ */ jsx("div", { className: "text-[1.4rem] font-semibold text-foreground", children: title })
17427
- }
17428
- ),
17429
- customLegend && !!data.length && /* @__PURE__ */ jsx("div", { className: cn("px-6 mb-2", HORIZONTAL_PADDING_CLASS), children: /* @__PURE__ */ jsx(
17430
- ChartTotalLegend_default,
17431
- {
17432
- items: allKeys.map((key) => {
17433
- const values = processedData.map(
17434
- (d) => Number(d[key] || 0)
17435
- );
17436
- const total = values.reduce((a, b) => a + b, 0);
17437
- const first = values[0] || 0;
17438
- const last = values[values.length - 1] || 0;
17439
- const trendValue = first !== 0 ? Math.round((last - first) / first * 100) : 0;
17440
- const formattedTotal = finalValueFormatter ? finalValueFormatter({
17441
- value: total,
17442
- formattedValue: String(total)
17443
- }) : new Intl.NumberFormat(formatBR ? "pt-BR" : "en-US").format(
17444
- total
17445
- );
17446
- return {
17447
- label: mapperConfig[key]?.label || key,
17448
- value: formattedTotal,
17449
- color: finalColors[key],
17450
- trend: {
17451
- value: Math.abs(trendValue),
17452
- positive: trendValue >= 0,
17453
- neutral: trendValue === 0
17454
- }
17455
- };
17456
- })
17457
- }
17458
- ) }),
17459
- allKeys.length > 0 && (enableHighlights || enableShowOnly) && /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", teste), children: [
17460
- enableHighlights && /* @__PURE__ */ jsx(
17461
- Highlights_default,
17462
- {
17463
- allKeys,
17464
- mapperConfig,
17465
- finalColors,
17466
- highlightedSeries,
17467
- toggleHighlight,
17468
- containerWidth: chartInnerWidth
17469
- }
17470
- ),
17471
- enableShowOnly && /* @__PURE__ */ jsx(
17472
- ShowOnly_default,
17353
+ children: [
17354
+ /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-card relative w-full max-w-full min-w-0 py-1", children: [
17355
+ title && /* @__PURE__ */ jsx(
17356
+ "div",
17473
17357
  {
17474
- showOnlyHighlighted,
17475
- setShowOnlyHighlighted,
17476
- highlightedSeriesSize: highlightedSeries.size,
17477
- clearHighlights
17358
+ className: cn(
17359
+ "w-full flex items-center mt-3 mb-2",
17360
+ HORIZONTAL_PADDING_CLASS,
17361
+ titlePosition === "center" && "justify-center",
17362
+ titlePosition === "right" && "justify-end",
17363
+ titlePosition === "left" && "justify-start"
17364
+ ),
17365
+ children: /* @__PURE__ */ jsx("div", { className: "text-[1.4rem] font-semibold text-foreground", children: title })
17478
17366
  }
17479
17367
  ),
17480
- enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ jsx(
17481
- PeriodsDropdown_default,
17368
+ customLegend && !!data.length && /* @__PURE__ */ jsx("div", { className: cn("px-6 mb-2", HORIZONTAL_PADDING_CLASS), children: /* @__PURE__ */ jsx(
17369
+ ChartTotalLegend_default,
17482
17370
  {
17483
- processedData,
17484
- onOpenPeriod: openTooltipForPeriod,
17485
- rightOffset: finalChartRightMargin,
17486
- activePeriods
17371
+ items: allKeys.map((key) => {
17372
+ const values = processedData.map(
17373
+ (d) => Number(d[key] || 0)
17374
+ );
17375
+ const total = values.reduce((a, b) => a + b, 0);
17376
+ const first = values[0] || 0;
17377
+ const last = values[values.length - 1] || 0;
17378
+ const trendValue = first !== 0 ? Math.round((last - first) / first * 100) : 0;
17379
+ const formattedTotal = finalValueFormatter ? finalValueFormatter({
17380
+ value: total,
17381
+ formattedValue: String(total)
17382
+ }) : new Intl.NumberFormat(formatBR ? "pt-BR" : "en-US").format(
17383
+ total
17384
+ );
17385
+ return {
17386
+ label: mapperConfig[key]?.label || key,
17387
+ value: formattedTotal,
17388
+ color: finalColors[key],
17389
+ trend: {
17390
+ value: Math.abs(trendValue),
17391
+ positive: trendValue >= 0,
17392
+ neutral: trendValue === 0
17393
+ }
17394
+ };
17395
+ })
17487
17396
  }
17488
- ) })
17489
- ] }),
17490
- !(allKeys.length > 0 && (enableHighlights || enableShowOnly)) && enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx(
17491
- "div",
17492
- {
17493
- className: cn(
17494
- "w-full flex justify-end mb-2",
17495
- HORIZONTAL_PADDING_CLASS
17397
+ ) }),
17398
+ allKeys.length > 0 && (enableHighlights || enableShowOnly) && /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-2", teste), children: [
17399
+ enableHighlights && /* @__PURE__ */ jsx(
17400
+ Highlights_default,
17401
+ {
17402
+ allKeys,
17403
+ mapperConfig,
17404
+ finalColors,
17405
+ highlightedSeries,
17406
+ toggleHighlight,
17407
+ containerWidth: chartInnerWidth
17408
+ }
17496
17409
  ),
17497
- style: {
17498
- paddingRight: `${finalChartRightMargin}px`,
17499
- maxWidth: `${chartInnerWidth}px`
17500
- },
17501
- children: /* @__PURE__ */ jsx(
17410
+ enableShowOnly && /* @__PURE__ */ jsx(
17411
+ ShowOnly_default,
17412
+ {
17413
+ showOnlyHighlighted,
17414
+ setShowOnlyHighlighted,
17415
+ highlightedSeriesSize: highlightedSeries.size,
17416
+ clearHighlights
17417
+ }
17418
+ ),
17419
+ enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ jsx(
17502
17420
  PeriodsDropdown_default,
17503
17421
  {
17504
17422
  processedData,
17505
17423
  onOpenPeriod: openTooltipForPeriod,
17506
- rightOffset: finalChartRightMargin
17424
+ rightOffset: finalChartRightMargin,
17425
+ activePeriods
17507
17426
  }
17508
- )
17509
- }
17510
- ),
17511
- showLegend && horizontal && /* @__PURE__ */ jsx(
17512
- HorizontalLegend_default,
17513
- {
17514
- allKeys,
17515
- mapperConfig,
17516
- finalColors,
17517
- labelMap,
17518
- legendUppercase,
17519
- orderBy,
17520
- maxPeriodLabel,
17521
- minPeriodLabel,
17522
- className: cn(HORIZONTAL_PADDING_CLASS)
17523
- }
17524
- ),
17525
- /* @__PURE__ */ jsx(
17526
- "div",
17527
- {
17528
- className: cn(
17529
- horizontal && "overflow-y-auto overflow-x-hidden px-6",
17530
- horizontal && "scrollbar-thin scrollbar-thumb-muted scrollbar-track-transparent"
17531
- ),
17532
- style: {
17533
- maxHeight: horizontal ? height : void 0
17534
- },
17535
- children: /* @__PURE__ */ jsx(
17536
- ResponsiveContainer,
17537
- {
17538
- width: "100%",
17539
- height: horizontal ? Math.max(height, processedData.length * 50) : height,
17540
- children: /* @__PURE__ */ jsxs(
17541
- ComposedChart,
17427
+ ) })
17428
+ ] }),
17429
+ !(allKeys.length > 0 && (enableHighlights || enableShowOnly)) && enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx(
17430
+ "div",
17431
+ {
17432
+ className: cn(
17433
+ "w-full flex justify-end mb-2",
17434
+ HORIZONTAL_PADDING_CLASS
17435
+ ),
17436
+ style: {
17437
+ paddingRight: `${finalChartRightMargin}px`,
17438
+ maxWidth: `${chartInnerWidth}px`
17439
+ },
17440
+ children: /* @__PURE__ */ jsx(
17441
+ PeriodsDropdown_default,
17442
+ {
17443
+ processedData,
17444
+ onOpenPeriod: openTooltipForPeriod,
17445
+ rightOffset: finalChartRightMargin
17446
+ }
17447
+ )
17448
+ }
17449
+ ),
17450
+ /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs(
17451
+ ComposedChart,
17452
+ {
17453
+ data: processedData,
17454
+ height,
17455
+ margin: {
17456
+ top: 10,
17457
+ right: finalChartRightMargin,
17458
+ left: finalChartLeftMargin,
17459
+ bottom: 10
17460
+ },
17461
+ onClick: handleChartClick,
17462
+ children: [
17463
+ /* @__PURE__ */ jsx("defs", { children: seriesOrder.filter((s) => s.type === "area").map((s) => {
17464
+ const key = s.key;
17465
+ const color = finalColors[key];
17466
+ return /* @__PURE__ */ jsxs(
17467
+ "linearGradient",
17468
+ {
17469
+ id: `gradient-${key}`,
17470
+ x1: "0",
17471
+ y1: "0",
17472
+ x2: "0",
17473
+ y2: "0.8",
17474
+ children: [
17475
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: color, stopOpacity: 0.8 }),
17476
+ /* @__PURE__ */ jsx("stop", { offset: "90%", stopColor: color, stopOpacity: 0.1 })
17477
+ ]
17478
+ },
17479
+ `gradient-${key}`
17480
+ );
17481
+ }) }),
17482
+ showGrid && /* @__PURE__ */ jsx(
17483
+ CartesianGrid,
17484
+ {
17485
+ strokeDasharray: "3 3",
17486
+ stroke: gridColor || "hsl(var(--muted-foreground))",
17487
+ opacity: 0.5
17488
+ }
17489
+ ),
17490
+ /* @__PURE__ */ jsx(
17491
+ XAxis,
17542
17492
  {
17543
- data: processedData,
17544
- height: horizontal ? Math.max(height, processedData.length * 50) : height,
17545
- layout: horizontal ? "vertical" : "horizontal",
17546
- margin: {
17547
- top: 10,
17548
- right: finalChartRightMargin,
17549
- left: finalChartLeftMargin,
17550
- bottom: 10
17493
+ dataKey: xAxisConfig.dataKey,
17494
+ stroke: "hsl(var(--muted-foreground))",
17495
+ fontSize: 12,
17496
+ tickLine: false,
17497
+ axisLine: false,
17498
+ tickFormatter: (value) => {
17499
+ if (categoryFormatter)
17500
+ return categoryFormatter(value);
17501
+ if (xAxisConfig.valueFormatter)
17502
+ return xAxisConfig.valueFormatter(value);
17503
+ return String(value ?? "");
17551
17504
  },
17552
- onClick: handleChartClick,
17553
- children: [
17554
- /* @__PURE__ */ jsx("defs", { children: seriesOrder.filter((s) => s.type === "area").map((s) => {
17555
- const key = s.key;
17556
- const color = finalColors[key];
17557
- return /* @__PURE__ */ jsxs(
17558
- "linearGradient",
17559
- {
17560
- id: `gradient-${key}`,
17561
- x1: "0",
17562
- y1: "0",
17563
- x2: "0",
17564
- y2: "0.8",
17565
- children: [
17566
- /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: color, stopOpacity: 0.8 }),
17567
- /* @__PURE__ */ jsx(
17568
- "stop",
17569
- {
17570
- offset: "90%",
17571
- stopColor: color,
17572
- stopOpacity: 0.1
17573
- }
17574
- )
17575
- ]
17576
- },
17577
- `gradient-${key}`
17578
- );
17579
- }) }),
17580
- showGrid && /* @__PURE__ */ jsx(
17581
- CartesianGrid,
17582
- {
17583
- strokeDasharray: "3 3",
17584
- stroke: gridColor || "hsl(var(--muted-foreground))",
17585
- opacity: 0.5
17505
+ label: xAxisLabel ? {
17506
+ value: xAxisLabel,
17507
+ position: "insideBottomRight",
17508
+ offset: -5,
17509
+ style: {
17510
+ fontSize: 12,
17511
+ fill: "hsl(var(--muted-foreground))",
17512
+ fontWeight: 500
17513
+ }
17514
+ } : void 0
17515
+ }
17516
+ ),
17517
+ /* @__PURE__ */ jsx(
17518
+ YAxis,
17519
+ {
17520
+ yAxisId: "left",
17521
+ width: yAxisTickWidth,
17522
+ stroke: "hsl(var(--muted-foreground))",
17523
+ fontSize: 12,
17524
+ tickLine: false,
17525
+ axisLine: false,
17526
+ tickFormatter: yTickFormatter,
17527
+ domain: [Math.min(minLeftDataValue, 0), niceMaxLeft],
17528
+ tickCount: 6,
17529
+ label: yAxisLabel ? {
17530
+ value: yAxisLabel,
17531
+ angle: -90,
17532
+ position: "left",
17533
+ dx: leftYAxisLabelDx,
17534
+ style: {
17535
+ fontSize: 12,
17536
+ fill: "hsl(var(--muted-foreground))",
17537
+ fontWeight: 500,
17538
+ textAnchor: "middle"
17539
+ }
17540
+ } : void 0
17541
+ }
17542
+ ),
17543
+ rightKeys.length > 0 && (() => {
17544
+ const { rightAxisColor, rightTickFormatter } = fnConfigRightKeys(
17545
+ biaxialConfigNormalized,
17546
+ yTickFormatter,
17547
+ finalColors
17548
+ );
17549
+ return /* @__PURE__ */ jsx(
17550
+ YAxis,
17551
+ {
17552
+ yAxisId: "right",
17553
+ width: finalChartRightMargin,
17554
+ orientation: "right",
17555
+ stroke: "hsl(var(--muted-foreground))",
17556
+ fontSize: 12,
17557
+ tickLine: false,
17558
+ axisLine: false,
17559
+ tick: { fill: rightAxisColor },
17560
+ tickFormatter: rightTickFormatter,
17561
+ domain: [Math.min(minRightDataValue, 0), niceMaxRight],
17562
+ tickCount: 6,
17563
+ label: biaxialConfigNormalized?.label ? {
17564
+ value: biaxialConfigNormalized.label,
17565
+ angle: -90,
17566
+ position: "right",
17567
+ dx: rightYAxisLabelDx,
17568
+ style: {
17569
+ fontSize: 12,
17570
+ fill: "hsl(var(--muted-foreground))",
17571
+ fontWeight: 500,
17572
+ textAnchor: "middle"
17586
17573
  }
17587
- ),
17588
- horizontal ? /* @__PURE__ */ jsxs(Fragment, { children: [
17589
- /* @__PURE__ */ jsx(
17590
- XAxis,
17574
+ } : void 0
17575
+ }
17576
+ );
17577
+ })(),
17578
+ showTooltip && /* @__PURE__ */ jsx(
17579
+ Tooltip,
17580
+ {
17581
+ content: showTooltipTotal ? /* @__PURE__ */ jsx(
17582
+ TooltipWithTotal_default,
17583
+ {
17584
+ finalColors,
17585
+ valueFormatter: finalValueFormatter,
17586
+ categoryFormatter,
17587
+ periodLabel
17588
+ }
17589
+ ) : /* @__PURE__ */ jsx(
17590
+ TooltipSimple_default,
17591
+ {
17592
+ finalColors,
17593
+ valueFormatter: finalValueFormatter,
17594
+ categoryFormatter,
17595
+ periodLabel
17596
+ }
17597
+ ),
17598
+ cursor: { fill: "hsl(var(--muted))", opacity: 0.1 }
17599
+ }
17600
+ ),
17601
+ showLegend && /* @__PURE__ */ jsx(
17602
+ Legend,
17603
+ {
17604
+ iconSize: 12,
17605
+ formatter: (value) => {
17606
+ return /* @__PURE__ */ jsx("span", { className: "tracking-[0] rounded-sm", children: fnFormatterValueLegend(
17607
+ value,
17608
+ mapperConfig,
17609
+ labelMap,
17610
+ legendUppercase
17611
+ ) });
17612
+ }
17613
+ }
17614
+ ),
17615
+ seriesOrder.map((s) => {
17616
+ if (showOnlyHighlighted && !highlightedSeries.has(s.key))
17617
+ return null;
17618
+ const { label, color, key } = fnBuildConfigData(
17619
+ s,
17620
+ mapperConfig,
17621
+ labelMap,
17622
+ finalColors,
17623
+ rightKeys,
17624
+ biaxialConfigNormalized
17625
+ );
17626
+ if (s.type === "bar") {
17627
+ return /* @__PURE__ */ jsx(
17628
+ Bar,
17629
+ {
17630
+ dataKey: key,
17631
+ yAxisId: rightKeys.includes(key) ? "right" : "left",
17632
+ name: label,
17633
+ fill: color,
17634
+ radius: [4, 4, 0, 0],
17635
+ onClick: handleBarClick,
17636
+ className: "cursor-pointer",
17637
+ style: { opacity: getSeriesOpacity(key) },
17638
+ activeBar: /* @__PURE__ */ jsx(
17639
+ Rectangle,
17591
17640
  {
17592
- type: "number",
17593
- orientation: "top",
17594
- stroke: "hsl(var(--muted-foreground))",
17595
- fontSize: 12,
17596
- tickLine: false,
17597
- axisLine: false,
17598
- tickFormatter: yTickFormatter,
17599
- domain: [Math.min(minLeftDataValue, 0), niceMaxLeft],
17600
- tickCount: 6,
17601
- label: yAxisLabel ? {
17602
- value: yAxisLabel,
17603
- position: "insideTopRight",
17604
- offset: -5,
17605
- style: {
17606
- fontSize: 12,
17607
- fill: "hsl(var(--muted-foreground))",
17608
- fontWeight: 500
17609
- }
17610
- } : void 0
17641
+ fill: color,
17642
+ stroke: color,
17643
+ strokeWidth: 2,
17644
+ opacity: 0.8
17611
17645
  }
17612
17646
  ),
17613
- /* @__PURE__ */ jsx(
17614
- YAxis,
17647
+ children: showLabels && labelsVisibility.bar !== false && highlightedSeries.size === 0 || highlightedSeries.has(key) ? /* @__PURE__ */ jsx(
17648
+ LabelList,
17615
17649
  {
17616
- type: "category",
17617
- dataKey: xAxisConfig.dataKey,
17618
- yAxisId: "left",
17619
- width: yAxisTickWidth,
17620
- stroke: "hsl(var(--muted-foreground))",
17621
- fontSize: 11,
17622
- tickLine: false,
17623
- axisLine: false,
17624
- tick: /* @__PURE__ */ jsx(CustomYAxisTick_default, { width: yAxisTickWidth - 10 }),
17625
- tickFormatter: (value) => {
17626
- if (categoryFormatter)
17627
- return categoryFormatter(value);
17628
- if (xAxisConfig.valueFormatter)
17629
- return xAxisConfig.valueFormatter(
17630
- value
17631
- );
17632
- return String(value ?? "");
17650
+ dataKey: key,
17651
+ content: (props) => {
17652
+ if (!fnContentLabelList(props)) return null;
17653
+ const inside = renderInsideBarLabel(
17654
+ color,
17655
+ finalValueFormatter
17656
+ );
17657
+ return inside(props);
17633
17658
  },
17634
- label: xAxisLabel ? {
17635
- value: xAxisLabel,
17636
- angle: -90,
17637
- position: "insideTop",
17638
- dx: leftYAxisLabelDx,
17639
- style: {
17640
- fontSize: 12,
17641
- fill: "hsl(var(--muted-foreground))",
17642
- fontWeight: 500,
17643
- textAnchor: "middle"
17644
- }
17645
- } : void 0
17659
+ offset: 0
17646
17660
  }
17647
- )
17648
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
17649
- /* @__PURE__ */ jsx(
17650
- XAxis,
17661
+ ) : null
17662
+ },
17663
+ `bar-${key}`
17664
+ );
17665
+ }
17666
+ if (s.type === "line") {
17667
+ const lineFormatter = (props) => {
17668
+ const numValue = typeof props.value === "number" ? props.value : typeof props.value === "string" ? parseFloat(props.value) : 0;
17669
+ const percentage = calcDivision(numValue, 100);
17670
+ const formattedPercentage = typeof percentage === "number" ? percentage.toFixed(1).replace(".", ",") : String(percentage).replace(".", ",");
17671
+ return `${formattedPercentage}%`;
17672
+ };
17673
+ return /* @__PURE__ */ jsx(
17674
+ Line,
17675
+ {
17676
+ dataKey: key,
17677
+ yAxisId: rightKeys.includes(key) ? "right" : "left",
17678
+ name: label,
17679
+ stroke: color,
17680
+ strokeWidth: 2,
17681
+ dot: { r: 3 },
17682
+ activeDot: { r: 6 },
17683
+ onClick: handleSeriesClick,
17684
+ className: "cursor-pointer pointer-events-auto",
17685
+ style: { opacity: getSeriesOpacity(key) },
17686
+ children: showLabels && labelsVisibility.line !== false && highlightedSeries.size === 0 || highlightedSeries.has(key) ? /* @__PURE__ */ jsx(
17687
+ LabelList,
17651
17688
  {
17652
- dataKey: xAxisConfig.dataKey,
17653
- stroke: "hsl(var(--muted-foreground))",
17654
- fontSize: 12,
17655
- tickLine: false,
17656
- axisLine: false,
17657
- tickFormatter: (value) => {
17658
- if (categoryFormatter)
17659
- return categoryFormatter(value);
17660
- if (xAxisConfig.valueFormatter)
17661
- return xAxisConfig.valueFormatter(
17662
- value
17663
- );
17664
- return String(value ?? "");
17665
- },
17666
- label: xAxisLabel ? {
17667
- value: xAxisLabel,
17668
- position: "insideBottomRight",
17669
- offset: -5,
17670
- style: {
17671
- fontSize: 12,
17672
- fill: "hsl(var(--muted-foreground))",
17673
- fontWeight: 500
17674
- }
17675
- } : void 0
17689
+ dataKey: key,
17690
+ position: "top",
17691
+ content: pillLabelRenderer_default(
17692
+ color,
17693
+ "filled",
17694
+ lineFormatter
17695
+ ),
17696
+ offset: 14
17676
17697
  }
17677
- ),
17678
- /* @__PURE__ */ jsx(
17679
- YAxis,
17698
+ ) : null
17699
+ },
17700
+ `line-${key}`
17701
+ );
17702
+ }
17703
+ if (s.type === "area") {
17704
+ return /* @__PURE__ */ jsx(
17705
+ Area,
17706
+ {
17707
+ type: "monotone",
17708
+ dataKey: key,
17709
+ yAxisId: rightKeys.includes(key) ? "right" : "left",
17710
+ name: label,
17711
+ stroke: color,
17712
+ fill: `url(#gradient-${key})`,
17713
+ fillOpacity: 1,
17714
+ strokeWidth: 2,
17715
+ onClick: handleSeriesClick,
17716
+ className: "cursor-pointer pointer-events-auto",
17717
+ style: { opacity: getSeriesOpacity(key) },
17718
+ activeDot: {
17719
+ r: 6,
17720
+ fill: color,
17721
+ stroke: "hsl(var(--background))",
17722
+ strokeWidth: 2
17723
+ },
17724
+ children: showLabels && labelsVisibility.area !== false && highlightedSeries.size === 0 || highlightedSeries.has(key) ? /* @__PURE__ */ jsx(
17725
+ LabelList,
17680
17726
  {
17681
- yAxisId: "left",
17682
- width: yAxisTickWidth,
17683
- stroke: "hsl(var(--muted-foreground))",
17684
- fontSize: 12,
17685
- tickLine: false,
17686
- axisLine: false,
17687
- tickFormatter: yTickFormatter,
17688
- domain: [Math.min(minLeftDataValue, 0), niceMaxLeft],
17689
- tickCount: 6,
17690
- label: yAxisLabel ? {
17691
- value: yAxisLabel,
17692
- angle: -90,
17693
- position: "left",
17694
- dx: leftYAxisLabelDx,
17695
- style: {
17696
- fontSize: 12,
17697
- fill: "hsl(var(--muted-foreground))",
17698
- fontWeight: 500,
17699
- textAnchor: "middle"
17700
- }
17701
- } : void 0
17727
+ dataKey: key,
17728
+ position: "top",
17729
+ content: pillLabelRenderer_default(
17730
+ color,
17731
+ "soft",
17732
+ finalValueFormatter
17733
+ ),
17734
+ offset: 12
17702
17735
  }
17703
- )
17704
- ] }),
17705
- minLeftDataValue < 0 && /* @__PURE__ */ jsx(
17706
- ReferenceLine,
17707
- {
17708
- y: 0,
17709
- yAxisId: "left",
17710
- stroke: "hsl(var(--muted-foreground))",
17711
- strokeWidth: 1,
17712
- strokeDasharray: "4 4"
17713
- }
17714
- ),
17715
- rightKeys.length > 0 && (() => {
17716
- const { rightAxisColor, rightTickFormatter } = fnConfigRightKeys(
17717
- biaxialConfigNormalized,
17718
- yTickFormatter,
17719
- finalColors
17720
- );
17721
- return /* @__PURE__ */ jsx(
17722
- YAxis,
17723
- {
17724
- yAxisId: "right",
17725
- width: finalChartRightMargin,
17726
- orientation: "right",
17727
- stroke: "hsl(var(--muted-foreground))",
17728
- fontSize: 12,
17729
- tickLine: false,
17730
- axisLine: false,
17731
- tick: { fill: rightAxisColor },
17732
- tickFormatter: rightTickFormatter,
17733
- domain: [Math.min(minRightDataValue, 0), niceMaxRight],
17734
- tickCount: 6,
17735
- label: biaxialConfigNormalized?.label ? {
17736
- value: biaxialConfigNormalized.label,
17737
- angle: -90,
17738
- position: "right",
17739
- dx: rightYAxisLabelDx,
17740
- style: {
17741
- fontSize: 12,
17742
- fill: "hsl(var(--muted-foreground))",
17743
- fontWeight: 500,
17744
- textAnchor: "middle"
17745
- }
17746
- } : void 0
17747
- }
17748
- );
17749
- })(),
17750
- showTooltip && /* @__PURE__ */ jsx(
17751
- Tooltip,
17752
- {
17753
- content: showTooltipTotal ? /* @__PURE__ */ jsx(
17754
- TooltipWithTotal_default,
17755
- {
17756
- finalColors,
17757
- valueFormatter: finalValueFormatter,
17758
- categoryFormatter,
17759
- periodLabel
17760
- }
17761
- ) : /* @__PURE__ */ jsx(
17762
- TooltipSimple_default,
17763
- {
17764
- finalColors,
17765
- valueFormatter: finalValueFormatter,
17766
- categoryFormatter,
17767
- periodLabel
17768
- }
17769
- ),
17770
- cursor: { fill: "hsl(var(--muted))", opacity: 0.1 }
17771
- }
17772
- ),
17773
- showLegend && !horizontal && /* @__PURE__ */ jsx(
17774
- Legend,
17775
- {
17776
- iconSize: 12,
17777
- formatter: (value) => {
17778
- return /* @__PURE__ */ jsx("span", { className: "tracking-[0] rounded-sm", children: fnFormatterValueLegend(
17779
- value,
17780
- mapperConfig,
17781
- labelMap,
17782
- legendUppercase
17783
- ) });
17784
- }
17785
- }
17786
- ),
17787
- seriesOrder.map((s) => {
17788
- if (showOnlyHighlighted && !highlightedSeries.has(s.key))
17789
- return null;
17790
- const { label, color, key } = fnBuildConfigData(
17791
- s,
17792
- mapperConfig,
17793
- labelMap,
17794
- finalColors,
17795
- rightKeys,
17796
- biaxialConfigNormalized
17797
- );
17798
- if (s.type === "bar") {
17799
- return /* @__PURE__ */ jsx(
17800
- Bar,
17801
- {
17802
- dataKey: key,
17803
- yAxisId: rightKeys.includes(key) ? "right" : "left",
17804
- name: label,
17805
- fill: color,
17806
- radius: horizontal ? [0, 4, 4, 0] : [4, 4, 0, 0],
17807
- onClick: handleBarClick,
17808
- className: "cursor-pointer",
17809
- style: { opacity: getSeriesOpacity(key) },
17810
- activeBar: /* @__PURE__ */ jsx(
17811
- Rectangle,
17812
- {
17813
- fill: color,
17814
- stroke: color,
17815
- strokeWidth: 2,
17816
- opacity: 0.8
17817
- }
17818
- ),
17819
- children: showLabels && labelsVisibility.bar !== false && highlightedSeries.size === 0 || highlightedSeries.has(key) ? /* @__PURE__ */ jsx(
17820
- LabelList,
17821
- {
17822
- dataKey: key,
17823
- content: (props) => {
17824
- if (!fnContentLabelList(props)) return null;
17825
- const inside = renderInsideBarLabel(
17826
- color,
17827
- finalValueFormatter
17828
- );
17829
- return inside(props);
17830
- },
17831
- offset: 0
17832
- }
17833
- ) : null
17834
- },
17835
- `bar-${key}`
17836
- );
17837
- }
17838
- if (s.type === "line") {
17839
- const lineFormatter = (props) => {
17840
- const numValue = typeof props.value === "number" ? props.value : typeof props.value === "string" ? parseFloat(props.value) : 0;
17841
- const percentage = calcDivision(numValue, 100);
17842
- const formattedPercentage = typeof percentage === "number" ? percentage.toFixed(1).replace(".", ",") : String(percentage).replace(".", ",");
17843
- return `${formattedPercentage}%`;
17844
- };
17845
- return /* @__PURE__ */ jsx(
17846
- Line,
17847
- {
17848
- dataKey: key,
17849
- yAxisId: rightKeys.includes(key) ? "right" : "left",
17850
- name: label,
17851
- stroke: color,
17852
- strokeWidth: 2,
17853
- dot: { r: 3 },
17854
- activeDot: { r: 6 },
17855
- onClick: handleSeriesClick,
17856
- className: "cursor-pointer pointer-events-auto",
17857
- style: { opacity: getSeriesOpacity(key) },
17858
- children: showLabels && labelsVisibility.line !== false && highlightedSeries.size === 0 || highlightedSeries.has(key) ? /* @__PURE__ */ jsx(
17859
- LabelList,
17860
- {
17861
- dataKey: key,
17862
- position: "top",
17863
- content: pillLabelRenderer_default(
17864
- color,
17865
- "filled",
17866
- lineFormatter
17867
- ),
17868
- offset: 14
17869
- }
17870
- ) : null
17871
- },
17872
- `line-${key}`
17873
- );
17874
- }
17875
- if (s.type === "area") {
17876
- return /* @__PURE__ */ jsx(
17877
- Area,
17878
- {
17879
- type: "monotone",
17880
- dataKey: key,
17881
- yAxisId: rightKeys.includes(key) ? "right" : "left",
17882
- name: label,
17883
- stroke: color,
17884
- fill: `url(#gradient-${key})`,
17885
- fillOpacity: 1,
17886
- strokeWidth: 2,
17887
- onClick: handleSeriesClick,
17888
- className: "cursor-pointer pointer-events-auto",
17889
- style: { opacity: getSeriesOpacity(key) },
17890
- activeDot: {
17891
- r: 6,
17892
- fill: color,
17893
- stroke: "hsl(var(--background))",
17894
- strokeWidth: 2
17895
- },
17896
- children: showLabels && labelsVisibility.area !== false && highlightedSeries.size === 0 || highlightedSeries.has(key) ? /* @__PURE__ */ jsx(
17897
- LabelList,
17898
- {
17899
- dataKey: key,
17900
- position: "top",
17901
- content: pillLabelRenderer_default(
17902
- color,
17903
- "soft",
17904
- finalValueFormatter
17905
- ),
17906
- offset: 12
17907
- }
17908
- ) : null
17909
- },
17910
- `area-${key}`
17911
- );
17912
- }
17913
- return null;
17914
- })
17915
- ]
17736
+ ) : null
17737
+ },
17738
+ `area-${key}`
17739
+ );
17916
17740
  }
17917
- )
17918
- }
17919
- )
17920
- }
17921
- ),
17741
+ return null;
17742
+ })
17743
+ ]
17744
+ }
17745
+ ) })
17746
+ ] }),
17922
17747
  enableDraggableTooltips && activeTooltips.map((tooltip) => /* @__PURE__ */ jsx(
17923
17748
  DraggableTooltip_default,
17924
17749
  {
@@ -17976,11 +17801,498 @@ var Chart = ({
17976
17801
  }
17977
17802
  }
17978
17803
  )
17979
- ] })
17804
+ ]
17980
17805
  }
17981
17806
  );
17982
17807
  };
17983
17808
  var Chart_default = Chart;
17809
+ var DEFAULT_COLORS3 = ["#0d1136", "#666655", "#1a1a1a"];
17810
+ var HorizontalChart = ({
17811
+ data,
17812
+ series,
17813
+ className,
17814
+ height = 500,
17815
+ width = "100%",
17816
+ colors: colors2 = DEFAULT_COLORS3,
17817
+ gridColor,
17818
+ showGrid = true,
17819
+ showTooltip = true,
17820
+ showLegend = true,
17821
+ title,
17822
+ titlePosition = "left",
17823
+ showLabels = false,
17824
+ labelsVisibility = { bar: true },
17825
+ xAxis,
17826
+ xAxisLabel,
17827
+ yAxisLabel,
17828
+ labelMap,
17829
+ valueFormatter,
17830
+ categoryFormatter,
17831
+ enableHighlights = false,
17832
+ enableShowOnly = false,
17833
+ enablePeriodsDropdown = false,
17834
+ enableDraggableTooltips = false,
17835
+ showTooltipTotal = false,
17836
+ periodLabel = "Per\xEDodo",
17837
+ maxTooltips = 5,
17838
+ formatBR = false,
17839
+ legendUppercase = false,
17840
+ chartMargin,
17841
+ isLoading = false,
17842
+ customLegend,
17843
+ orderBy
17844
+ }) => {
17845
+ const { xAxisConfig, mapperConfig } = useMemo(() => {
17846
+ return fnSmartConfig({ xAxis, data, labelMap });
17847
+ }, [data, xAxis, labelMap]);
17848
+ const {
17849
+ highlightedSeries,
17850
+ showOnlyHighlighted,
17851
+ toggleHighlight,
17852
+ setShowOnlyHighlighted,
17853
+ clearHighlights
17854
+ } = useChartHighlights();
17855
+ const { wrapperRef, measuredWidth } = useChartDimensions();
17856
+ const {
17857
+ activeTooltips,
17858
+ toggleTooltip,
17859
+ onTooltipPositionChange,
17860
+ setActiveTooltips
17861
+ } = useChartTooltips(maxTooltips);
17862
+ useEffect(() => {
17863
+ if (highlightedSeries.size === 0 && showOnlyHighlighted) {
17864
+ setShowOnlyHighlighted(false);
17865
+ }
17866
+ }, [highlightedSeries, showOnlyHighlighted, setShowOnlyHighlighted]);
17867
+ const processedData = useMemo(() => {
17868
+ const mapped = data.map((item) => ({
17869
+ ...item,
17870
+ name: String(item[xAxisConfig.dataKey] || "N/A")
17871
+ }));
17872
+ if (orderBy && mapped.length > 0) {
17873
+ return [...mapped].sort((a, b) => {
17874
+ const valueA = Number(a[orderBy]) || 0;
17875
+ const valueB = Number(b[orderBy]) || 0;
17876
+ return valueB - valueA;
17877
+ });
17878
+ }
17879
+ return mapped;
17880
+ }, [data, xAxisConfig.dataKey, orderBy]);
17881
+ const seriesOrder = filtersOrder(mapperConfig, series);
17882
+ const allKeys = seriesOrder.map((s) => s.key).filter(Boolean);
17883
+ const finalColors = useMemo(
17884
+ () => generateColorMap(allKeys, colors2, mapperConfig),
17885
+ [allKeys, colors2, mapperConfig]
17886
+ );
17887
+ const activePeriods = useMemo(
17888
+ () => activeTooltips.map((t) => adaptDataForTooltip(t.data, xAxisConfig.dataKey).name),
17889
+ [activeTooltips, xAxisConfig.dataKey]
17890
+ );
17891
+ const maxDataValue = useMemo(() => {
17892
+ return getMaxDataValue(processedData, allKeys);
17893
+ }, [processedData, allKeys]);
17894
+ const minDataValue = useMemo(() => {
17895
+ return getMinDataValue(processedData, allKeys);
17896
+ }, [processedData, allKeys]);
17897
+ const niceMax = useMemo(() => computeNiceMax(maxDataValue), [maxDataValue]);
17898
+ const { handleChartClick, handleBarClick } = useChartClick({
17899
+ enableDraggableTooltips,
17900
+ xAxisDataKey: xAxisConfig.dataKey,
17901
+ toggleTooltip,
17902
+ setActiveTooltips
17903
+ });
17904
+ const getSeriesOpacity = useCallback(
17905
+ (key) => {
17906
+ return highlightedSeries.size > 0 ? highlightedSeries.has(key) ? 1 : 0.25 : 1;
17907
+ },
17908
+ [highlightedSeries]
17909
+ );
17910
+ const finalValueFormatter = useMemo(
17911
+ () => createValueFormatter(valueFormatter, formatBR),
17912
+ [valueFormatter, formatBR]
17913
+ );
17914
+ const yTickFormatter = useMemo(
17915
+ () => createYTickFormatter(finalValueFormatter),
17916
+ [finalValueFormatter]
17917
+ );
17918
+ const CONTAINER_PADDING_LEFT = -6;
17919
+ const finalChartRightMargin = chartMargin?.right ?? 0;
17920
+ const finalChartLeftMargin = chartMargin?.left ?? 0;
17921
+ const HORIZONTAL_PADDING_CLASS = "px-6";
17922
+ const effectiveChartWidth = typeof width === "number" ? width : measuredWidth ? Math.max(0, measuredWidth - 32) : 800;
17923
+ const chartInnerWidth = effectiveChartWidth - finalChartLeftMargin - finalChartRightMargin;
17924
+ const openTooltipForPeriod = useCallback(
17925
+ (periodName) => {
17926
+ fnOpenTooltipForPeriod(
17927
+ enableDraggableTooltips,
17928
+ processedData,
17929
+ periodName,
17930
+ activeTooltips,
17931
+ setActiveTooltips,
17932
+ maxTooltips,
17933
+ effectiveChartWidth
17934
+ );
17935
+ },
17936
+ [
17937
+ enableDraggableTooltips,
17938
+ processedData,
17939
+ activeTooltips,
17940
+ effectiveChartWidth,
17941
+ maxTooltips,
17942
+ setActiveTooltips
17943
+ ]
17944
+ );
17945
+ if (!data && !isLoading) return null;
17946
+ if (isLoading) {
17947
+ return /* @__PURE__ */ jsx(
17948
+ NoData_default,
17949
+ {
17950
+ title,
17951
+ isLoading: true,
17952
+ loadingMessage: typeof title === "string" ? `${title} \u2014 Carregando` : "Carregando",
17953
+ paddingLeft: CONTAINER_PADDING_LEFT + finalChartLeftMargin,
17954
+ height
17955
+ }
17956
+ );
17957
+ }
17958
+ if (Array.isArray(data) && data.length === 0) {
17959
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
17960
+ NoData_default,
17961
+ {
17962
+ title,
17963
+ paddingLeft: CONTAINER_PADDING_LEFT + finalChartLeftMargin,
17964
+ height
17965
+ }
17966
+ ) });
17967
+ }
17968
+ return /* @__PURE__ */ jsxs(
17969
+ "div",
17970
+ {
17971
+ ref: wrapperRef,
17972
+ className: cn(
17973
+ "w-full overflow-hidden min-w-0 rounded-lg border-border",
17974
+ className
17975
+ ),
17976
+ children: [
17977
+ /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-card relative w-full max-w-full min-w-0 py-1", children: [
17978
+ title && /* @__PURE__ */ jsx(
17979
+ "div",
17980
+ {
17981
+ className: cn(
17982
+ "w-full flex items-center mt-3 mb-2",
17983
+ HORIZONTAL_PADDING_CLASS,
17984
+ titlePosition === "center" && "justify-center",
17985
+ titlePosition === "right" && "justify-end",
17986
+ titlePosition === "left" && "justify-start"
17987
+ ),
17988
+ children: /* @__PURE__ */ jsx("div", { className: "text-[1.4rem] font-semibold text-foreground", children: title })
17989
+ }
17990
+ ),
17991
+ customLegend && !!data.length && /* @__PURE__ */ jsx("div", { className: cn("px-6 mb-2", HORIZONTAL_PADDING_CLASS), children: /* @__PURE__ */ jsx(
17992
+ ChartTotalLegend_default,
17993
+ {
17994
+ items: allKeys.map((key) => {
17995
+ const values = processedData.map(
17996
+ (d) => Number(d[key] || 0)
17997
+ );
17998
+ const total = values.reduce((a, b) => a + b, 0);
17999
+ const first = values[0] || 0;
18000
+ const last = values[values.length - 1] || 0;
18001
+ const trendValue = first !== 0 ? Math.round((last - first) / first * 100) : 0;
18002
+ const formattedTotal = finalValueFormatter ? finalValueFormatter({
18003
+ value: total,
18004
+ formattedValue: String(total)
18005
+ }) : new Intl.NumberFormat(formatBR ? "pt-BR" : "en-US").format(
18006
+ total
18007
+ );
18008
+ return {
18009
+ label: mapperConfig[key]?.label || key,
18010
+ value: formattedTotal,
18011
+ color: finalColors[key],
18012
+ trend: {
18013
+ value: Math.abs(trendValue),
18014
+ positive: trendValue >= 0,
18015
+ neutral: trendValue === 0
18016
+ }
18017
+ };
18018
+ })
18019
+ }
18020
+ ) }),
18021
+ allKeys.length > 0 && (enableHighlights || enableShowOnly) && /* @__PURE__ */ jsxs(
18022
+ "div",
18023
+ {
18024
+ className: cn("flex items-center gap-2", HORIZONTAL_PADDING_CLASS),
18025
+ children: [
18026
+ enableHighlights && /* @__PURE__ */ jsx(
18027
+ Highlights_default,
18028
+ {
18029
+ allKeys,
18030
+ mapperConfig,
18031
+ finalColors,
18032
+ highlightedSeries,
18033
+ toggleHighlight,
18034
+ containerWidth: chartInnerWidth
18035
+ }
18036
+ ),
18037
+ enableShowOnly && /* @__PURE__ */ jsx(
18038
+ ShowOnly_default,
18039
+ {
18040
+ showOnlyHighlighted,
18041
+ setShowOnlyHighlighted,
18042
+ highlightedSeriesSize: highlightedSeries.size,
18043
+ clearHighlights
18044
+ }
18045
+ ),
18046
+ enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center", children: /* @__PURE__ */ jsx(
18047
+ PeriodsDropdown_default,
18048
+ {
18049
+ processedData,
18050
+ onOpenPeriod: openTooltipForPeriod,
18051
+ rightOffset: finalChartRightMargin,
18052
+ activePeriods
18053
+ }
18054
+ ) })
18055
+ ]
18056
+ }
18057
+ ),
18058
+ !(allKeys.length > 0 && (enableHighlights || enableShowOnly)) && enablePeriodsDropdown && enableDraggableTooltips && /* @__PURE__ */ jsx(
18059
+ "div",
18060
+ {
18061
+ className: cn(
18062
+ "w-full flex justify-end mb-2",
18063
+ HORIZONTAL_PADDING_CLASS
18064
+ ),
18065
+ children: /* @__PURE__ */ jsx(
18066
+ PeriodsDropdown_default,
18067
+ {
18068
+ processedData,
18069
+ onOpenPeriod: openTooltipForPeriod,
18070
+ rightOffset: finalChartRightMargin
18071
+ }
18072
+ )
18073
+ }
18074
+ ),
18075
+ showLegend && /* @__PURE__ */ jsx("div", { className: cn("mb-3", HORIZONTAL_PADDING_CLASS), children: /* @__PURE__ */ jsx(
18076
+ HorizontalLegend_default,
18077
+ {
18078
+ allKeys,
18079
+ mapperConfig,
18080
+ finalColors,
18081
+ labelMap,
18082
+ legendUppercase
18083
+ }
18084
+ ) }),
18085
+ /* @__PURE__ */ jsx(
18086
+ "div",
18087
+ {
18088
+ className: cn(
18089
+ "overflow-y-auto overflow-x-hidden px-6",
18090
+ "scrollbar-thin scrollbar-thumb-muted scrollbar-track-transparent mb-2"
18091
+ ),
18092
+ style: {
18093
+ maxHeight: height
18094
+ },
18095
+ children: /* @__PURE__ */ jsx(
18096
+ ResponsiveContainer,
18097
+ {
18098
+ width: "100%",
18099
+ height: Math.max(height, processedData.length * 50),
18100
+ children: /* @__PURE__ */ jsxs(
18101
+ ComposedChart,
18102
+ {
18103
+ layout: "vertical",
18104
+ data: processedData,
18105
+ height: Math.max(height, processedData.length * 50),
18106
+ margin: {
18107
+ top: 10,
18108
+ right: finalChartRightMargin,
18109
+ left: finalChartLeftMargin,
18110
+ bottom: 10
18111
+ },
18112
+ onClick: handleChartClick,
18113
+ children: [
18114
+ showGrid && /* @__PURE__ */ jsx(
18115
+ CartesianGrid,
18116
+ {
18117
+ strokeDasharray: "3 3",
18118
+ stroke: gridColor || "hsl(var(--muted-foreground))",
18119
+ opacity: 0.5
18120
+ }
18121
+ ),
18122
+ /* @__PURE__ */ jsx(
18123
+ XAxis,
18124
+ {
18125
+ type: "number",
18126
+ stroke: "hsl(var(--muted-foreground))",
18127
+ fontSize: 12,
18128
+ tickLine: false,
18129
+ orientation: "top",
18130
+ axisLine: false,
18131
+ tickFormatter: yTickFormatter,
18132
+ domain: [Math.min(minDataValue, 0), niceMax],
18133
+ label: yAxisLabel ? {
18134
+ value: yAxisLabel,
18135
+ position: "insideTopRight",
18136
+ offset: -1,
18137
+ style: {
18138
+ fontSize: 12,
18139
+ fill: "hsl(var(--muted-foreground))",
18140
+ fontWeight: 500
18141
+ }
18142
+ } : void 0
18143
+ }
18144
+ ),
18145
+ /* @__PURE__ */ jsx(
18146
+ YAxis,
18147
+ {
18148
+ type: "category",
18149
+ dataKey: xAxisConfig.dataKey,
18150
+ stroke: "hsl(var(--muted-foreground))",
18151
+ fontSize: 12,
18152
+ tickLine: false,
18153
+ axisLine: false,
18154
+ width: 125,
18155
+ tickFormatter: (value) => {
18156
+ if (categoryFormatter)
18157
+ return categoryFormatter(value);
18158
+ if (xAxisConfig.valueFormatter)
18159
+ return xAxisConfig.valueFormatter(value);
18160
+ return String(value ?? "");
18161
+ },
18162
+ label: xAxisLabel ? {
18163
+ value: xAxisLabel,
18164
+ angle: -90,
18165
+ position: "insideTopLeft",
18166
+ style: {
18167
+ fontSize: 12,
18168
+ fill: "hsl(var(--muted-foreground))",
18169
+ fontWeight: 500,
18170
+ textAnchor: "middle"
18171
+ }
18172
+ } : void 0
18173
+ }
18174
+ ),
18175
+ showTooltip && /* @__PURE__ */ jsx(
18176
+ Tooltip,
18177
+ {
18178
+ content: showTooltipTotal ? /* @__PURE__ */ jsx(
18179
+ TooltipWithTotal_default,
18180
+ {
18181
+ finalColors,
18182
+ valueFormatter: finalValueFormatter,
18183
+ categoryFormatter,
18184
+ periodLabel
18185
+ }
18186
+ ) : /* @__PURE__ */ jsx(
18187
+ TooltipSimple_default,
18188
+ {
18189
+ finalColors,
18190
+ valueFormatter: finalValueFormatter,
18191
+ categoryFormatter,
18192
+ periodLabel
18193
+ }
18194
+ ),
18195
+ cursor: { fill: "hsl(var(--muted))", opacity: 0.1 }
18196
+ }
18197
+ ),
18198
+ seriesOrder.map((s) => {
18199
+ if (showOnlyHighlighted && !highlightedSeries.has(s.key))
18200
+ return null;
18201
+ const { label, color, key } = fnBuildConfigData(
18202
+ s,
18203
+ mapperConfig,
18204
+ labelMap,
18205
+ finalColors,
18206
+ [],
18207
+ null
18208
+ );
18209
+ if (s.type === "bar") {
18210
+ return /* @__PURE__ */ jsx(
18211
+ Bar,
18212
+ {
18213
+ dataKey: key,
18214
+ name: label,
18215
+ fill: color,
18216
+ radius: [0, 4, 4, 0],
18217
+ onClick: handleBarClick,
18218
+ className: "cursor-pointer",
18219
+ style: { opacity: getSeriesOpacity(key) },
18220
+ activeBar: /* @__PURE__ */ jsx(
18221
+ Rectangle,
18222
+ {
18223
+ fill: color,
18224
+ stroke: color,
18225
+ strokeWidth: 2,
18226
+ opacity: 0.8
18227
+ }
18228
+ ),
18229
+ children: showLabels && labelsVisibility.bar !== false && highlightedSeries.size === 0 || highlightedSeries.has(key) ? /* @__PURE__ */ jsx(
18230
+ LabelList,
18231
+ {
18232
+ dataKey: key,
18233
+ content: (props) => {
18234
+ const inside = renderInsideBarLabel(
18235
+ color,
18236
+ finalValueFormatter
18237
+ );
18238
+ return inside(props);
18239
+ },
18240
+ offset: 0
18241
+ }
18242
+ ) : null
18243
+ },
18244
+ `bar-${key}`
18245
+ );
18246
+ }
18247
+ return null;
18248
+ })
18249
+ ]
18250
+ }
18251
+ )
18252
+ }
18253
+ )
18254
+ }
18255
+ )
18256
+ ] }),
18257
+ enableDraggableTooltips && activeTooltips.map((tooltip) => /* @__PURE__ */ jsx(
18258
+ DraggableTooltip_default,
18259
+ {
18260
+ id: tooltip.id,
18261
+ data: adaptDataForTooltip(tooltip.data, xAxisConfig.dataKey),
18262
+ position: tooltip.position,
18263
+ title,
18264
+ dataKeys: allKeys,
18265
+ finalColors,
18266
+ highlightedSeries,
18267
+ toggleHighlight,
18268
+ showOnlyHighlighted,
18269
+ onClose: (id) => setActiveTooltips((prev) => prev.filter((t) => t.id !== id)),
18270
+ onPositionChange: onTooltipPositionChange,
18271
+ periodLabel,
18272
+ dataLabel: "Dados do Per\xEDodo",
18273
+ valueFormatter: finalValueFormatter,
18274
+ categoryFormatter,
18275
+ globalTooltipCount: activeTooltips.length,
18276
+ onCloseAll: () => window.dispatchEvent(new Event("closeAllTooltips")),
18277
+ closeAllButtonPosition: "top-center",
18278
+ closeAllButtonVariant: "floating"
18279
+ },
18280
+ tooltip.id
18281
+ )),
18282
+ enableDraggableTooltips && activeTooltips.length > 1 && /* @__PURE__ */ jsx(
18283
+ CloseAllButton_default,
18284
+ {
18285
+ count: activeTooltips.length,
18286
+ onCloseAll: () => window.dispatchEvent(new Event("closeAllTooltips")),
18287
+ position: "top-center",
18288
+ variant: "floating"
18289
+ }
18290
+ )
18291
+ ]
18292
+ }
18293
+ );
18294
+ };
18295
+ var HorizontalChart_default = HorizontalChart;
17984
18296
  var defaultData = [
17985
18297
  { name: "Vendas", value: 4e3 },
17986
18298
  { name: "Marketing", value: 3e3 },
@@ -17988,7 +18300,7 @@ var defaultData = [
17988
18300
  { name: "Suporte", value: 1e3 },
17989
18301
  { name: "Outros", value: 800 }
17990
18302
  ];
17991
- var DEFAULT_COLORS3 = [
18303
+ var DEFAULT_COLORS4 = [
17992
18304
  "#55af7d",
17993
18305
  // verde do projeto
17994
18306
  "#8e68ff",
@@ -18046,7 +18358,7 @@ var CustomPieChart = ({
18046
18358
  centerX = "50%",
18047
18359
  centerY = "50%"
18048
18360
  }) => {
18049
- const finalColors = colors2 || DEFAULT_COLORS3;
18361
+ const finalColors = colors2 || DEFAULT_COLORS4;
18050
18362
  return /* @__PURE__ */ jsx("div", { className: cn("w-full rounded-lg bg-card p-4", className), children: /* @__PURE__ */ jsx(ResponsiveContainer, { width, height, children: /* @__PURE__ */ jsxs(PieChart, { children: [
18051
18363
  /* @__PURE__ */ jsx(
18052
18364
  Pie,
@@ -18343,4 +18655,4 @@ function Leaderboard({
18343
18655
  );
18344
18656
  }
18345
18657
 
18346
- export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CENTER_INDEX, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart_default as Chart, ChartTotalLegend_default as ChartTotalLegend, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton_default as CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, DefaultEndHour, DefaultEndHourAgenda, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent2 as DraggableEvent, DraggableTooltip_default as DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage_default as ErrorMessage, EventAgenda, EventCalendar, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, FilterButton, HideButton, Highlights_default as Highlights, HorizontalLegend_default as HorizontalLegend, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, ITEM_HEIGHT, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, LoadingBase, LockButton, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MonthViewAgenda, MoreButton, MultiCombobox, MultiSelect, MultiSelectBase, MultiSelectContentBase, MultiSelectGroupBase, MultiSelectItemBase, MultiSelectSeparatorBase, MultiSelectTriggerBase, MultiSelectValueBase, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NoData_default as NoData, NotificationButton, NumericInput, PeriodsDropdown_default as PeriodsDropdown, PieChart_default as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, ProgressCirclesBase, ProgressPanelsBase, ProgressSegmentsBase, RangePicker, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectEmpty, SelectGroupBase, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly_default as ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, StartHour, StartHourAgenda, StatusIndicator, SwitchBase, SystemTooltip_default as SystemTooltip, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, ThemeProviderBase, TimePicker, TimePickerInput, TimeSeries_default as TimeSeries, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple_default as TooltipSimple, TooltipTriggerBase, TooltipWithTotal_default as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, VISIBLE_ITEMS, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getItems, getMaxDataValue, getMinDataValue, getSpanningEventsForDay, getSpanningEventsForDayAgenda, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isMultiDayEventAgenda, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, normalizeAttendDate, renderInsideBarLabel, pillLabelRenderer_default as renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, sortEventsAgenda, toast, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartMinMax, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useTheme, useTimeSeriesRange, visualForItem };
18658
+ export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CENTER_INDEX, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart_default as Chart, ChartTotalLegend_default as ChartTotalLegend, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton_default as CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, DefaultEndHour, DefaultEndHourAgenda, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent2 as DraggableEvent, DraggableTooltip_default as DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage_default as ErrorMessage, EventAgenda, EventCalendar, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, FilterButton, HideButton, Highlights_default as Highlights, HorizontalChart_default as HorizontalChart, HorizontalLegend_default as HorizontalLegend, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, ITEM_HEIGHT, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, LoadingBase, LockButton, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MonthViewAgenda, MoreButton, MultiCombobox, MultiSelect, MultiSelectBase, MultiSelectContentBase, MultiSelectGroupBase, MultiSelectItemBase, MultiSelectSeparatorBase, MultiSelectTriggerBase, MultiSelectValueBase, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NoData_default as NoData, NotificationButton, NumericInput, PeriodsDropdown_default as PeriodsDropdown, PieChart_default as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, ProgressCirclesBase, ProgressPanelsBase, ProgressSegmentsBase, RangePicker, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectEmpty, SelectGroupBase, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly_default as ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, StartHour, StartHourAgenda, StatusIndicator, SwitchBase, SystemTooltip_default as SystemTooltip, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, ThemeProviderBase, TimePicker, TimePickerInput, TimeSeries_default as TimeSeries, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple_default as TooltipSimple, TooltipTriggerBase, TooltipWithTotal_default as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, VISIBLE_ITEMS, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getItems, getMaxDataValue, getMinDataValue, getSpanningEventsForDay, getSpanningEventsForDayAgenda, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isMultiDayEventAgenda, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, normalizeAttendDate, renderInsideBarLabel, pillLabelRenderer_default as renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, sortEventsAgenda, toast, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartMinMax, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useTheme, useTimeSeriesRange, visualForItem };