@acronis-platform/ui-react 2.0.0 → 4.0.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.
Files changed (243) hide show
  1. package/dist/components/ui/accordion-container/accordion-container.js +144 -0
  2. package/dist/components/ui/accordion-container/accordion-container.js.map +1 -0
  3. package/dist/components/ui/app-shell-chat/app-shell-chat.js.map +1 -1
  4. package/dist/components/ui/area-chart/area-chart.js +141 -139
  5. package/dist/components/ui/area-chart/area-chart.js.map +1 -1
  6. package/dist/components/ui/avatar/avatar.js +33 -22
  7. package/dist/components/ui/avatar/avatar.js.map +1 -1
  8. package/dist/components/ui/bar-chart/bar-chart.js +295 -293
  9. package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
  10. package/dist/components/ui/card/card.js +150 -74
  11. package/dist/components/ui/card/card.js.map +1 -1
  12. package/dist/components/ui/card-section/card-section.js +111 -0
  13. package/dist/components/ui/card-section/card-section.js.map +1 -0
  14. package/dist/components/ui/category-bar/category-bar.js +109 -93
  15. package/dist/components/ui/category-bar/category-bar.js.map +1 -1
  16. package/dist/components/ui/chart/chart-palette.js +113 -0
  17. package/dist/components/ui/chart/chart-palette.js.map +1 -0
  18. package/dist/components/ui/chart/chart.js +176 -129
  19. package/dist/components/ui/chart/chart.js.map +1 -1
  20. package/dist/components/ui/chart-state/chart-state-illustrations.js +310 -0
  21. package/dist/components/ui/chart-state/chart-state-illustrations.js.map +1 -0
  22. package/dist/components/ui/chart-state/chart-state.js +48 -34
  23. package/dist/components/ui/chart-state/chart-state.js.map +1 -1
  24. package/dist/components/ui/chart-widget/chart-widget.js +87 -0
  25. package/dist/components/ui/chart-widget/chart-widget.js.map +1 -0
  26. package/dist/components/ui/composed-chart/composed-chart.js +117 -115
  27. package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
  28. package/dist/components/ui/confidence-cone/confidence-cone.js +166 -158
  29. package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
  30. package/dist/components/ui/data-table/data-table.js +4 -2
  31. package/dist/components/ui/data-table/data-table.js.map +1 -1
  32. package/dist/components/ui/empty-overlay/empty-overlay.js +49 -0
  33. package/dist/components/ui/empty-overlay/empty-overlay.js.map +1 -0
  34. package/dist/components/ui/funnel-chart/funnel-chart.js +162 -161
  35. package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
  36. package/dist/components/ui/histogram/histogram.js +94 -92
  37. package/dist/components/ui/histogram/histogram.js.map +1 -1
  38. package/dist/components/ui/input/input.js.map +1 -1
  39. package/dist/components/ui/label/label.js +2 -9
  40. package/dist/components/ui/label/label.js.map +1 -1
  41. package/dist/components/ui/line-chart/line-chart.js +143 -141
  42. package/dist/components/ui/line-chart/line-chart.js.map +1 -1
  43. package/dist/components/ui/metric/metric.js +74 -185
  44. package/dist/components/ui/metric/metric.js.map +1 -1
  45. package/dist/components/ui/page-content/page-content.js.map +1 -1
  46. package/dist/components/ui/pie-chart/pie-chart.js +201 -195
  47. package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
  48. package/dist/components/ui/radar-chart/radar-chart.js +133 -131
  49. package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
  50. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +297 -265
  51. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
  52. package/dist/components/ui/sankey-chart/sankey-chart.js +123 -101
  53. package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -1
  54. package/dist/components/ui/scatter-chart/scatter-chart.js +76 -74
  55. package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
  56. package/dist/components/ui/section/section.js +157 -31
  57. package/dist/components/ui/section/section.js.map +1 -1
  58. package/dist/components/ui/stepper/stepper.js +24 -24
  59. package/dist/components/ui/stepper/stepper.js.map +1 -1
  60. package/dist/components/ui/stepper-item/stepper-item.js +43 -24
  61. package/dist/components/ui/stepper-item/stepper-item.js.map +1 -1
  62. package/dist/components/ui/table/table.js +27 -27
  63. package/dist/components/ui/table/table.js.map +1 -1
  64. package/dist/components/ui/treemap/treemap.js +133 -124
  65. package/dist/components/ui/treemap/treemap.js.map +1 -1
  66. package/dist/components/ui/trend-indicator/trend-indicator.js +34 -69
  67. package/dist/components/ui/trend-indicator/trend-indicator.js.map +1 -1
  68. package/dist/components/ui/wizard/wizard.js +59 -0
  69. package/dist/components/ui/wizard/wizard.js.map +1 -0
  70. package/dist/hooks/use-wizard.js +75 -0
  71. package/dist/hooks/use-wizard.js.map +1 -0
  72. package/dist/index.js +540 -525
  73. package/dist/index.js.map +1 -1
  74. package/dist/llms/accordion-container.md +181 -0
  75. package/dist/llms/accordion.md +124 -0
  76. package/dist/llms/alert.md +225 -0
  77. package/dist/llms/app-shell-chat.md +415 -0
  78. package/dist/llms/area-chart.md +355 -0
  79. package/dist/llms/avatar.md +208 -0
  80. package/dist/llms/bar-chart.md +406 -0
  81. package/dist/llms/breadcrumb.md +326 -0
  82. package/dist/llms/button-group.md +298 -0
  83. package/dist/llms/button-icon-input.md +142 -0
  84. package/dist/llms/button-icon-menu.md +209 -0
  85. package/dist/llms/button-icon.md +128 -0
  86. package/dist/llms/button-menu.md +172 -0
  87. package/dist/llms/button.md +185 -0
  88. package/dist/llms/calendar-panel.md +733 -0
  89. package/dist/llms/calendar.md +188 -0
  90. package/dist/llms/card-filter.md +214 -0
  91. package/dist/llms/card-section.md +293 -0
  92. package/dist/llms/card.md +447 -0
  93. package/dist/llms/carousel-dialog.md +156 -0
  94. package/dist/llms/category-bar.md +193 -0
  95. package/dist/llms/chart-state.md +190 -0
  96. package/dist/llms/chart-widget.md +209 -0
  97. package/dist/llms/chart.md +182 -0
  98. package/dist/llms/checkbox.md +257 -0
  99. package/dist/llms/chip.md +195 -0
  100. package/dist/llms/combobox.md +164 -0
  101. package/dist/llms/composed-chart.md +508 -0
  102. package/dist/llms/confidence-cone.md +277 -0
  103. package/dist/llms/data-table.md +474 -0
  104. package/dist/llms/date-range-picker.md +272 -0
  105. package/dist/llms/description-list.md +131 -0
  106. package/dist/llms/dialog-footer-carousel.md +147 -0
  107. package/dist/llms/dialog-footer-default.md +142 -0
  108. package/dist/llms/dialog-root.md +246 -0
  109. package/dist/llms/dialog-welcome.md +223 -0
  110. package/dist/llms/dialog.md +403 -0
  111. package/dist/llms/dropdown-menu.md +193 -0
  112. package/dist/llms/empty-overlay.md +146 -0
  113. package/dist/llms/empty.md +156 -0
  114. package/dist/llms/field.md +185 -0
  115. package/dist/llms/filter-cards.md +157 -0
  116. package/dist/llms/filter-chips.md +323 -0
  117. package/dist/llms/filter-search.md +512 -0
  118. package/dist/llms/form.md +154 -0
  119. package/dist/llms/funnel-chart.md +333 -0
  120. package/dist/llms/grid.md +80 -0
  121. package/dist/llms/histogram.md +190 -0
  122. package/dist/llms/input-date-picker.md +203 -0
  123. package/dist/llms/input-otp.md +173 -0
  124. package/dist/llms/input-password.md +197 -0
  125. package/dist/llms/input-search.md +170 -0
  126. package/dist/llms/input-select.md +278 -0
  127. package/dist/llms/input-text-area.md +271 -0
  128. package/dist/llms/input-text.md +192 -0
  129. package/dist/llms/line-chart.md +369 -0
  130. package/dist/llms/link.md +209 -0
  131. package/dist/llms/loading.md +130 -0
  132. package/dist/llms/meter.md +177 -0
  133. package/dist/llms/metric.md +204 -0
  134. package/dist/llms/number-field.md +122 -0
  135. package/dist/llms/page-content.md +69 -0
  136. package/dist/llms/page-header.md +182 -0
  137. package/dist/llms/pagination.md +133 -0
  138. package/dist/llms/pie-chart.md +307 -0
  139. package/dist/llms/popover.md +252 -0
  140. package/dist/llms/progress-circle.md +126 -0
  141. package/dist/llms/progress.md +111 -0
  142. package/dist/llms/radar-chart.md +316 -0
  143. package/dist/llms/radial-bar-chart.md +319 -0
  144. package/dist/llms/radio.md +255 -0
  145. package/dist/llms/resizable.md +195 -0
  146. package/dist/llms/sankey-chart.md +208 -0
  147. package/dist/llms/scatter-chart.md +239 -0
  148. package/dist/llms/scroll-area.md +183 -0
  149. package/dist/llms/section.md +401 -0
  150. package/dist/llms/select.md +210 -0
  151. package/dist/llms/separator.md +87 -0
  152. package/dist/llms/sheet.md +202 -0
  153. package/dist/llms/sidebar-primary.md +360 -0
  154. package/dist/llms/sidebar-secondary.md +417 -0
  155. package/dist/llms/skeleton.md +81 -0
  156. package/dist/llms/slider.md +97 -0
  157. package/dist/llms/spinner.md +100 -0
  158. package/dist/llms/stack.md +80 -0
  159. package/dist/llms/stepper-item.md +309 -0
  160. package/dist/llms/stepper.md +251 -0
  161. package/dist/llms/switch.md +140 -0
  162. package/dist/llms/table.md +436 -0
  163. package/dist/llms/tabs.md +197 -0
  164. package/dist/llms/tag.md +139 -0
  165. package/dist/llms/timeline.md +361 -0
  166. package/dist/llms/timer.md +259 -0
  167. package/dist/llms/toast.md +241 -0
  168. package/dist/llms/toggle-group.md +121 -0
  169. package/dist/llms/toolbar.md +453 -0
  170. package/dist/llms/tooltip.md +164 -0
  171. package/dist/llms/treemap.md +254 -0
  172. package/dist/llms/trend-indicator.md +132 -0
  173. package/dist/llms/widget-placeholder.md +169 -0
  174. package/dist/llms/wizard.md +412 -0
  175. package/dist/llms.txt +142 -0
  176. package/dist/react.js +540 -525
  177. package/dist/react.js.map +1 -1
  178. package/dist/src/components/ui/accordion-container/accordion-container.d.ts +44 -0
  179. package/dist/src/components/ui/accordion-container/index.d.ts +1 -0
  180. package/dist/src/components/ui/area-chart/area-chart.d.ts +9 -4
  181. package/dist/src/components/ui/avatar/avatar.d.ts +27 -8
  182. package/dist/src/components/ui/bar-chart/bar-chart.d.ts +9 -4
  183. package/dist/src/components/ui/button/button.d.ts +1 -1
  184. package/dist/src/components/ui/card/card.d.ts +69 -8
  185. package/dist/src/components/ui/card/index.d.ts +1 -1
  186. package/dist/src/components/ui/card-section/card-section.d.ts +50 -0
  187. package/dist/src/components/ui/card-section/index.d.ts +1 -0
  188. package/dist/src/components/ui/category-bar/category-bar.d.ts +10 -4
  189. package/dist/src/components/ui/chart/__stories__/palette-control.d.ts +48 -0
  190. package/dist/src/components/ui/chart/__tests__/chart-palette.test.d.ts +1 -0
  191. package/dist/src/components/ui/chart/chart-palette.d.ts +128 -0
  192. package/dist/src/components/ui/chart/chart.d.ts +66 -15
  193. package/dist/src/components/ui/chart/index.d.ts +4 -2
  194. package/dist/src/components/ui/chart-state/chart-state-illustrations.d.ts +6 -0
  195. package/dist/src/components/ui/chart-state/chart-state.d.ts +13 -2
  196. package/dist/src/components/ui/chart-state/index.d.ts +1 -0
  197. package/dist/src/components/ui/chart-widget/chart-widget.d.ts +64 -0
  198. package/dist/src/components/ui/chart-widget/index.d.ts +1 -0
  199. package/dist/src/components/ui/composed-chart/composed-chart.d.ts +12 -7
  200. package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +10 -5
  201. package/dist/src/components/ui/dialog/dialog.d.ts +1 -1
  202. package/dist/src/components/ui/empty-overlay/empty-overlay.d.ts +20 -0
  203. package/dist/src/components/ui/empty-overlay/index.d.ts +2 -0
  204. package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +11 -5
  205. package/dist/src/components/ui/grid/grid.d.ts +1 -1
  206. package/dist/src/components/ui/histogram/histogram.d.ts +10 -4
  207. package/dist/src/components/ui/label/index.d.ts +1 -1
  208. package/dist/src/components/ui/label/label.d.ts +1 -5
  209. package/dist/src/components/ui/line-chart/line-chart.d.ts +9 -4
  210. package/dist/src/components/ui/metric/metric.d.ts +13 -14
  211. package/dist/src/components/ui/pie-chart/pie-chart.d.ts +17 -8
  212. package/dist/src/components/ui/radar-chart/radar-chart.d.ts +10 -5
  213. package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +17 -6
  214. package/dist/src/components/ui/sankey-chart/sankey-chart.d.ts +10 -5
  215. package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +10 -5
  216. package/dist/src/components/ui/section/index.d.ts +1 -1
  217. package/dist/src/components/ui/section/section.d.ts +75 -6
  218. package/dist/src/components/ui/sheet/sheet.d.ts +1 -1
  219. package/dist/src/components/ui/stack/stack.d.ts +1 -1
  220. package/dist/src/components/ui/stepper-item/stepper-item.d.ts +6 -5
  221. package/dist/src/components/ui/tag/tag.d.ts +1 -1
  222. package/dist/src/components/ui/treemap/treemap.d.ts +11 -5
  223. package/dist/src/components/ui/trend-indicator/trend-indicator.d.ts +3 -7
  224. package/dist/src/components/ui/wizard/index.d.ts +1 -0
  225. package/dist/src/components/ui/wizard/wizard.d.ts +6 -0
  226. package/dist/src/hooks/index.d.ts +1 -0
  227. package/dist/src/hooks/use-wizard.d.ts +80 -0
  228. package/dist/src/index.d.ts +5 -3
  229. package/dist/ui-react.css +1 -1
  230. package/package.json +12 -6
  231. package/dist/components/ui/app-shell/app-shell.js +0 -75
  232. package/dist/components/ui/app-shell/app-shell.js.map +0 -1
  233. package/dist/components/ui/auth-layout/auth-layout.js +0 -56
  234. package/dist/components/ui/auth-layout/auth-layout.js.map +0 -1
  235. package/dist/components/ui/collapsible/collapsible.js +0 -22
  236. package/dist/components/ui/collapsible/collapsible.js.map +0 -1
  237. package/dist/src/components/ui/app-shell/app-shell.d.ts +0 -8
  238. package/dist/src/components/ui/app-shell/index.d.ts +0 -1
  239. package/dist/src/components/ui/auth-layout/auth-layout.d.ts +0 -6
  240. package/dist/src/components/ui/auth-layout/index.d.ts +0 -1
  241. package/dist/src/components/ui/collapsible/collapsible.d.ts +0 -5
  242. package/dist/src/components/ui/collapsible/index.d.ts +0 -1
  243. package/dist/src/components/ui/label/label.docs.d.ts +0 -10
@@ -1,180 +1,187 @@
1
- import { jsx as r, jsxs as x, Fragment as E } from "react/jsx-runtime";
2
- import * as m from "react";
3
- import { ComposedChart as Fe, CartesianGrid as Ke, Text as Re, XAxis as Le, YAxis as Ne, ReferenceArea as Me, ReferenceLine as B, Area as z, Line as H } from "recharts";
4
- import { cn as Oe } from "../../../lib/utils.js";
5
- import { resolveAnimation as Xe, resolveRotatedTickAnchor as _e, CHART_LABEL_FONT_SIZE as Se, resolveXAxisTitle as Ee, resolveXAxisHeight as Be, resolveYAxisTitle as ze, resolveAxisDomain as He } from "../chart/chart-format.js";
6
- import { ChartContainer as je, ChartTooltip as j, ChartTooltipContent as we, ChartLegend as Ie, ChartLegendContent as Pe } from "../chart/chart.js";
7
- const w = "__cone", A = (t) => `${w}:${t}`;
8
- function I(t) {
1
+ import { jsx as r, jsxs as A, Fragment as B } from "react/jsx-runtime";
2
+ import * as v from "react";
3
+ import { ComposedChart as Ke, CartesianGrid as Re, Text as Le, XAxis as Ne, YAxis as Me, ReferenceArea as Oe, ReferenceLine as z, Area as H, Line as j } from "recharts";
4
+ import { cn as Xe } from "../../../lib/utils.js";
5
+ import { resolveAnimation as _e, resolveRotatedTickAnchor as Se, CHART_LABEL_FONT_SIZE as Ee, resolveXAxisTitle as Be, resolveXAxisHeight as ze, resolveYAxisTitle as He, resolveAxisDomain as je } from "../chart/chart-format.js";
6
+ import { ChartContainer as we, ChartTooltip as w, ChartTooltipContent as Ie, ChartLegend as Pe, ChartLegendContent as We } from "../chart/chart.js";
7
+ const I = "__cone", x = (t) => `${I}:${t}`;
8
+ function P(t) {
9
9
  return t == null ? void 0 : t.filter(
10
- (o) => !(typeof o.dataKey == "string" && o.dataKey.startsWith(w))
10
+ (o) => !(typeof o.dataKey == "string" && o.dataKey.startsWith(I))
11
11
  );
12
12
  }
13
- function We(t, o) {
13
+ function Ye(t, o) {
14
14
  return t == null ? void 0 : t.filter(
15
- (n) => typeof n.dataKey == "string" && o.includes(n.dataKey)
15
+ (a) => typeof a.dataKey == "string" && o.includes(a.dataKey)
16
16
  );
17
17
  }
18
- function Ye(t) {
19
- return function(n) {
18
+ function Ge(t) {
19
+ return function(a) {
20
20
  const l = {
21
- ...n,
22
- payload: I(n.payload)
21
+ ...a,
22
+ payload: P(a.payload)
23
23
  };
24
- return typeof t == "function" ? m.createElement(
24
+ return typeof t == "function" ? v.createElement(
25
25
  t,
26
26
  l
27
- ) : m.cloneElement(t, l);
27
+ ) : v.cloneElement(t, l);
28
28
  };
29
29
  }
30
- function Ge(t, o, n) {
31
- return t.filter((l) => o.some(({ forecastKey: c }) => typeof l[c] == "number")).map((l) => l[n]);
30
+ function Ze(t, o, a) {
31
+ return t.filter(
32
+ (l) => o.some(({ forecastKey: c }) => typeof l[c] == "number")
33
+ ).map((l) => l[a]);
32
34
  }
33
- function Ze(t, o, n) {
35
+ function qe(t, o, a) {
34
36
  return function({
35
37
  payload: c,
36
- index: v,
38
+ index: f,
37
39
  ...y
38
40
  }) {
39
- const f = c == null ? void 0 : c.value;
41
+ const s = c == null ? void 0 : c.value;
40
42
  return /* @__PURE__ */ r(
41
- Re,
43
+ Le,
42
44
  {
43
45
  ...y,
44
- style: f != null && t.has(f) ? { fontStyle: "italic", fill: o } : void 0,
45
- children: n && f != null ? n(f, v) : f
46
+ style: s != null && t.has(s) ? { fontStyle: "italic", fill: o } : void 0,
47
+ children: a && s != null ? a(s, f) : s
46
48
  }
47
49
  );
48
50
  };
49
51
  }
50
- const qe = m.forwardRef(
52
+ const Je = v.forwardRef(
51
53
  ({
52
54
  className: t,
53
55
  config: o,
54
- data: n,
55
- xKey: l,
56
- series: c,
57
- actualKey: v,
58
- forecastKey: y,
59
- lowerKey: f,
60
- upperKey: C,
61
- xAxisLabel: $,
62
- yAxisLabel: D,
63
- yUnit: P,
64
- actualType: F = "area",
65
- strokeWidth: K = 2,
56
+ palette: a,
57
+ data: l,
58
+ xKey: c,
59
+ series: f,
60
+ actualKey: y,
61
+ forecastKey: s,
62
+ lowerKey: C,
63
+ upperKey: $,
64
+ xAxisLabel: D,
65
+ yAxisLabel: F,
66
+ yUnit: W,
67
+ actualType: K = "area",
68
+ strokeWidth: R = 2,
66
69
  showDots: p = !1,
67
- styleForecastTicks: W = !1,
70
+ styleForecastTicks: Y = !1,
68
71
  referenceLine: h,
69
- showForecastRegion: Y = !0,
70
- showGrid: G = !0,
71
- showTooltip: Z = !0,
72
- showLegend: q = !0,
73
- showXAxis: J = !0,
74
- showYAxis: Q = !0,
75
- xTickFormatter: R,
76
- yTickFormatter: U,
72
+ showForecastRegion: G = !0,
73
+ showGrid: Z = !0,
74
+ showTooltip: q = !0,
75
+ showLegend: J = !0,
76
+ showXAxis: Q = !0,
77
+ showYAxis: U = !0,
78
+ xTickFormatter: L,
79
+ yTickFormatter: V,
77
80
  xAxisAngle: g,
78
- xAxisInterval: V,
79
- yAxisTickCount: ee,
80
- yAxisDomain: te,
81
- gridDashed: re,
81
+ xAxisInterval: ee,
82
+ yAxisTickCount: te,
83
+ yAxisDomain: re,
84
+ gridDashed: ne,
82
85
  gridHorizontal: oe,
83
- gridVertical: ne,
86
+ gridVertical: ae,
84
87
  tooltipContent: T,
85
- animate: ae,
86
- animationDuration: le,
88
+ animate: le,
89
+ animationDuration: ie,
87
90
  animationBegin: ce,
88
- animationEasing: ie,
89
- ...se
90
- }, ue) => {
91
- var O, X;
92
- const s = m.useMemo(() => c != null && c.length ? c : !v || !y ? [] : [{ actualKey: v, forecastKey: y, lowerKey: f, upperKey: C }], [c, v, y, f, C]), b = Xe({
93
- animate: ae,
94
- animationDuration: le,
91
+ animationEasing: se,
92
+ ...ue
93
+ }, fe) => {
94
+ var X, _;
95
+ const u = v.useMemo(() => f != null && f.length ? f : !y || !s ? [] : [{ actualKey: y, forecastKey: s, lowerKey: C, upperKey: $ }], [f, y, s, C, $]), b = _e({
96
+ animate: le,
97
+ animationDuration: ie,
95
98
  animationBegin: ce,
96
- animationEasing: ie
97
- }), L = m.useMemo(
98
- () => T ? Ye(T) : void 0,
99
+ animationEasing: se
100
+ }), N = v.useMemo(
101
+ () => T ? Ge(T) : void 0,
99
102
  [T]
100
- ), fe = Ee($), de = ze(D), me = He(te), ve = m.useMemo(() => {
103
+ ), de = Be(D), me = He(F), ve = je(re), ye = v.useMemo(() => {
101
104
  let e;
102
- for (const { actualKey: a, forecastKey: i } of s) {
103
- const u = o[a], d = o[i];
104
- !u || !d || (e ?? (e = { ...o }), e[i] = {
105
- label: d.label,
106
- icon: d.icon,
107
- ...u.theme ? { theme: u.theme } : { color: u.color }
105
+ for (const { actualKey: n, forecastKey: i } of u) {
106
+ const d = o[n], m = o[i];
107
+ !d || !m || (e ?? (e = { ...o }), e[i] = {
108
+ label: m.label,
109
+ icon: m.icon,
110
+ tone: { sameAs: n }
108
111
  });
109
112
  }
110
113
  return e ?? o;
111
- }, [o, s]), ye = Be($, g), pe = n.map((e) => {
112
- const a = { ...e };
113
- for (const { actualKey: i, lowerKey: u, upperKey: d } of s) {
114
- if (!u || !d) continue;
115
- const _ = e[u], S = e[d];
116
- a[A(i)] = typeof _ == "number" && typeof S == "number" ? [_, S] : void 0;
114
+ }, [o, u]), pe = ze(D, g), he = l.map((e) => {
115
+ const n = { ...e };
116
+ for (const {
117
+ actualKey: i,
118
+ lowerKey: d,
119
+ upperKey: m
120
+ } of u) {
121
+ if (!d || !m) continue;
122
+ const S = e[d], E = e[m];
123
+ n[x(i)] = typeof S == "number" && typeof E == "number" ? [S, E] : void 0;
117
124
  }
118
- return a;
119
- }), N = Ge(n, s, l), k = Y ? N[0] : void 0, M = (O = n[n.length - 1]) == null ? void 0 : O[l], he = Ze(
120
- new Set(N),
121
- `var(--color-${(X = s[0]) == null ? void 0 : X.actualKey})`,
122
- R
123
- ), ke = h ? Array.isArray(h) ? h : [h] : [], ge = () => /* @__PURE__ */ x(E, { children: [
125
+ return n;
126
+ }), M = Ze(l, u, c), k = G ? M[0] : void 0, O = (X = l[l.length - 1]) == null ? void 0 : X[c], ke = qe(
127
+ new Set(M),
128
+ `var(--color-${(_ = u[0]) == null ? void 0 : _.actualKey})`,
129
+ L
130
+ ), ge = h ? Array.isArray(h) ? h : [h] : [], Te = () => /* @__PURE__ */ A(B, { children: [
124
131
  /* @__PURE__ */ r(
125
- Le,
132
+ Ne,
126
133
  {
127
- dataKey: l,
134
+ dataKey: c,
128
135
  type: "category",
129
- hide: !J,
136
+ hide: !Q,
130
137
  tickLine: !1,
131
138
  axisLine: !1,
132
139
  tickMargin: 8,
133
- tickFormatter: R,
134
- tick: W ? he : void 0,
140
+ tickFormatter: L,
141
+ tick: Y ? ke : void 0,
135
142
  angle: g,
136
- interval: V,
137
- textAnchor: _e(g),
138
- height: ye,
139
- label: fe
143
+ interval: ee,
144
+ textAnchor: Se(g),
145
+ height: pe,
146
+ label: de
140
147
  }
141
148
  ),
142
149
  /* @__PURE__ */ r(
143
- Ne,
150
+ Me,
144
151
  {
145
152
  type: "number",
146
- hide: !Q,
153
+ hide: !U,
147
154
  tickLine: !1,
148
155
  axisLine: !1,
149
- unit: P,
150
- tickFormatter: U,
151
- tickCount: ee,
152
- domain: me,
153
- width: D ? 72 : void 0,
154
- label: de
156
+ unit: W,
157
+ tickFormatter: V,
158
+ tickCount: te,
159
+ domain: ve,
160
+ width: F ? 72 : void 0,
161
+ label: me
155
162
  }
156
163
  )
157
- ] }), Te = () => /* @__PURE__ */ x(E, { children: [
158
- k != null && M != null && /* @__PURE__ */ r(
159
- Me,
164
+ ] }), be = () => /* @__PURE__ */ A(B, { children: [
165
+ k != null && O != null && /* @__PURE__ */ r(
166
+ Oe,
160
167
  {
161
168
  x1: k,
162
- x2: M,
169
+ x2: O,
163
170
  fill: "var(--ui-background-surface-secondary)",
164
171
  fillOpacity: 0.5,
165
172
  ifOverflow: "extendDomain"
166
173
  }
167
174
  ),
168
175
  k != null && /* @__PURE__ */ r(
169
- B,
176
+ z,
170
177
  {
171
178
  x: k,
172
179
  stroke: "var(--ui-border-on-surface-border)",
173
180
  strokeDasharray: "4 4"
174
181
  }
175
182
  )
176
- ] }), be = (e, a) => /* @__PURE__ */ r(
177
- B,
183
+ ] }), Ae = (e, n) => /* @__PURE__ */ r(
184
+ z,
178
185
  {
179
186
  y: e.value,
180
187
  stroke: "var(--ui-text-on-surface-secondary)",
@@ -184,49 +191,49 @@ const qe = m.forwardRef(
184
191
  value: e.label,
185
192
  position: "insideTopRight",
186
193
  fill: "var(--ui-text-on-surface-secondary)",
187
- fontSize: Se
194
+ fontSize: Ee
188
195
  } : void 0
189
196
  },
190
- `${e.label ?? "threshold"}-${a}`
191
- ), xe = () => L ? (
197
+ `${e.label ?? "threshold"}-${n}`
198
+ ), xe = () => N ? (
192
199
  // Strips the synthetic band before the caller's tooltip sees it — the
193
200
  // `__cone` series feeds the Area, not the tooltip.
194
- /* @__PURE__ */ r(j, { content: L })
201
+ /* @__PURE__ */ r(w, { content: N })
195
202
  ) : /* @__PURE__ */ r(
196
- j,
203
+ w,
197
204
  {
198
205
  content: (e) => /* @__PURE__ */ r(
199
- we,
206
+ Ie,
200
207
  {
201
208
  active: e.active,
202
209
  label: e.label,
203
- payload: I(e.payload)
210
+ payload: P(e.payload)
204
211
  }
205
212
  )
206
213
  }
207
- ), Ae = () => /* @__PURE__ */ r(
208
- Ie,
214
+ ), Ce = () => /* @__PURE__ */ r(
215
+ Pe,
209
216
  {
210
217
  content: (e) => /* @__PURE__ */ r(
211
- Pe,
218
+ We,
212
219
  {
213
220
  verticalAlign: e.verticalAlign,
214
- payload: We(
221
+ payload: Ye(
215
222
  e.payload,
216
- s.map((a) => a.actualKey)
223
+ u.map((n) => n.actualKey)
217
224
  )
218
225
  }
219
226
  )
220
227
  }
221
- ), Ce = ({
228
+ ), $e = ({
222
229
  actualKey: e,
223
- lowerKey: a,
230
+ lowerKey: n,
224
231
  upperKey: i
225
- }) => a && i ? /* @__PURE__ */ r(
226
- z,
232
+ }) => n && i ? /* @__PURE__ */ r(
233
+ H,
227
234
  {
228
235
  "data-slot": "confidence-cone-band",
229
- dataKey: A(e),
236
+ dataKey: x(e),
230
237
  type: "monotone",
231
238
  stroke: "none",
232
239
  fill: `var(--color-${e})`,
@@ -238,9 +245,9 @@ const qe = m.forwardRef(
238
245
  legendType: "none",
239
246
  tooltipType: "none"
240
247
  },
241
- A(e)
242
- ) : null, $e = ({ actualKey: e }) => {
243
- const a = F === "line" ? H : z, i = F === "line" ? void 0 : { fill: `var(--color-${e})`, fillOpacity: 0.15 }, u = p ? {
248
+ x(e)
249
+ ) : null, De = ({ actualKey: e }) => {
250
+ const n = K === "line" ? j : H, i = K === "line" ? void 0 : { fill: `var(--color-${e})`, fillOpacity: 0.15 }, d = p ? {
244
251
  r: 3,
245
252
  fill: `var(--color-${e})`,
246
253
  fillOpacity: 1,
@@ -248,14 +255,14 @@ const qe = m.forwardRef(
248
255
  strokeWidth: 2
249
256
  } : !1;
250
257
  return /* @__PURE__ */ r(
251
- a,
258
+ n,
252
259
  {
253
260
  dataKey: e,
254
261
  type: "monotone",
255
262
  stroke: `var(--color-${e})`,
256
- strokeWidth: K,
263
+ strokeWidth: R,
257
264
  ...i,
258
- dot: u,
265
+ dot: d,
259
266
  activeDot: p ? { r: 5 } : !1,
260
267
  connectNulls: !0,
261
268
  ...b,
@@ -263,9 +270,9 @@ const qe = m.forwardRef(
263
270
  },
264
271
  e
265
272
  );
266
- }, De = ({
273
+ }, Fe = ({
267
274
  actualKey: e,
268
- forecastKey: a
275
+ forecastKey: n
269
276
  }) => {
270
277
  const i = p ? {
271
278
  r: 3,
@@ -275,55 +282,56 @@ const qe = m.forwardRef(
275
282
  strokeDasharray: "none"
276
283
  } : !1;
277
284
  return /* @__PURE__ */ r(
278
- H,
285
+ j,
279
286
  {
280
- dataKey: a,
287
+ dataKey: n,
281
288
  type: "monotone",
282
289
  stroke: `var(--color-${e})`,
283
- strokeWidth: K,
290
+ strokeWidth: R,
284
291
  strokeDasharray: "5 5",
285
292
  dot: i,
286
293
  activeDot: p ? { r: 5 } : !1,
287
294
  connectNulls: !0,
288
295
  ...b
289
296
  },
290
- a
297
+ n
291
298
  );
292
299
  };
293
- return /* @__PURE__ */ r("div", { ref: ue, className: Oe(t), ...se, children: /* @__PURE__ */ r(
294
- je,
300
+ return /* @__PURE__ */ r("div", { ref: fe, className: Xe(t), ...ue, children: /* @__PURE__ */ r(
301
+ we,
295
302
  {
296
- config: ve,
303
+ config: ye,
304
+ palette: a,
297
305
  className: "size-full [&_.recharts-label]:fill-foreground",
298
- children: /* @__PURE__ */ x(Fe, { data: pe, children: [
299
- G && /* @__PURE__ */ r(
300
- Ke,
306
+ children: /* @__PURE__ */ A(Ke, { data: he, children: [
307
+ Z && /* @__PURE__ */ r(
308
+ Re,
301
309
  {
302
310
  horizontal: oe ?? !0,
303
- vertical: ne ?? !1,
304
- strokeDasharray: re ? "3 3" : void 0
311
+ vertical: ae ?? !1,
312
+ strokeDasharray: ne ? "3 3" : void 0
305
313
  }
306
314
  ),
307
- ge(),
308
315
  Te(),
309
- ke.map(be),
310
- Z && xe(),
311
- q && Ae(),
312
- s.map(Ce),
313
- s.map($e),
314
- s.map(De)
316
+ be(),
317
+ ge.map(Ae),
318
+ q && xe(),
319
+ J && Ce(),
320
+ u.map($e),
321
+ u.map(De),
322
+ u.map(Fe)
315
323
  ] })
316
324
  }
317
325
  ) });
318
326
  }
319
327
  );
320
- qe.displayName = "ConfidenceCone";
328
+ Je.displayName = "ConfidenceCone";
321
329
  export {
322
- qe as ConfidenceCone,
323
- Ye as createConeTooltip,
324
- Ze as createForecastTick,
325
- I as dropConeBand,
326
- Ge as forecastPeriodX,
327
- We as keepMetricSeries
330
+ Je as ConfidenceCone,
331
+ Ge as createConeTooltip,
332
+ qe as createForecastTick,
333
+ P as dropConeBand,
334
+ Ze as forecastPeriodX,
335
+ Ye as keepMetricSeries
328
336
  };
329
337
  //# sourceMappingURL=confidence-cone.js.map