@acronis-platform/ui-react 0.60.0 → 0.62.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 (99) hide show
  1. package/README.md +5 -5
  2. package/dist/components/ui/app-shell/app-shell.js.map +1 -1
  3. package/dist/components/ui/area-chart/area-chart.js +209 -146
  4. package/dist/components/ui/area-chart/area-chart.js.map +1 -1
  5. package/dist/components/ui/avatar/avatar.js +26 -23
  6. package/dist/components/ui/avatar/avatar.js.map +1 -1
  7. package/dist/components/ui/bar-chart/bar-chart.js +595 -180
  8. package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
  9. package/dist/components/ui/calendar-panel/calendar-panel-utils.js +63 -0
  10. package/dist/components/ui/calendar-panel/calendar-panel-utils.js.map +1 -0
  11. package/dist/components/ui/calendar-panel/calendar-panel.js +260 -0
  12. package/dist/components/ui/calendar-panel/calendar-panel.js.map +1 -0
  13. package/dist/components/ui/category-bar/category-bar.js +98 -77
  14. package/dist/components/ui/category-bar/category-bar.js.map +1 -1
  15. package/dist/components/ui/chart/chart-format.js +144 -14
  16. package/dist/components/ui/chart/chart-format.js.map +1 -1
  17. package/dist/components/ui/chart/chart.js +204 -150
  18. package/dist/components/ui/chart/chart.js.map +1 -1
  19. package/dist/components/ui/composed-chart/composed-chart.js +422 -125
  20. package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
  21. package/dist/components/ui/confidence-cone/confidence-cone.js +308 -202
  22. package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
  23. package/dist/components/ui/filter-cards/filter-cards.js +25 -0
  24. package/dist/components/ui/filter-cards/filter-cards.js.map +1 -0
  25. package/dist/components/ui/funnel-chart/funnel-chart.js +245 -51
  26. package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
  27. package/dist/components/ui/histogram/histogram.js +85 -81
  28. package/dist/components/ui/histogram/histogram.js.map +1 -1
  29. package/dist/components/ui/line-chart/line-chart.js +227 -184
  30. package/dist/components/ui/line-chart/line-chart.js.map +1 -1
  31. package/dist/components/ui/metric/metric.js +88 -70
  32. package/dist/components/ui/metric/metric.js.map +1 -1
  33. package/dist/components/ui/pie-chart/pie-chart.js +234 -80
  34. package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
  35. package/dist/components/ui/radar-chart/radar-chart.js +210 -57
  36. package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
  37. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +358 -50
  38. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
  39. package/dist/components/ui/resizable/resizable.js +23 -11
  40. package/dist/components/ui/resizable/resizable.js.map +1 -1
  41. package/dist/components/ui/sankey-chart/sankey-chart.js +25 -18
  42. package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -1
  43. package/dist/components/ui/scatter-chart/scatter-chart.js +86 -78
  44. package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
  45. package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
  46. package/dist/components/ui/timeline/timeline.js +206 -142
  47. package/dist/components/ui/timeline/timeline.js.map +1 -1
  48. package/dist/components/ui/treemap/treemap.js +183 -59
  49. package/dist/components/ui/treemap/treemap.js.map +1 -1
  50. package/dist/index.js +446 -420
  51. package/dist/index.js.map +1 -1
  52. package/dist/node_modules/.pnpm/react-day-picker@10.0.1_@types_react@19.2.15_react@19.2.6/node_modules/react-day-picker/dist/esm/useDayPicker.js +3 -3
  53. package/dist/react.js +446 -420
  54. package/dist/react.js.map +1 -1
  55. package/dist/src/components/ui/area-chart/area-chart.d.ts +53 -3
  56. package/dist/src/components/ui/area-chart/index.d.ts +1 -1
  57. package/dist/src/components/ui/avatar/avatar.d.ts +1 -1
  58. package/dist/src/components/ui/bar-chart/bar-chart.d.ts +154 -16
  59. package/dist/src/components/ui/bar-chart/index.d.ts +1 -1
  60. package/dist/src/components/ui/button/button.d.ts +1 -1
  61. package/dist/src/components/ui/button-menu/button-menu.d.ts +1 -1
  62. package/dist/src/components/ui/calendar-panel/__tests__/calendar-panel-utils.test.d.ts +1 -0
  63. package/dist/src/components/ui/calendar-panel/calendar-panel-utils.d.ts +55 -0
  64. package/dist/src/components/ui/calendar-panel/calendar-panel.d.ts +112 -0
  65. package/dist/src/components/ui/calendar-panel/index.d.ts +1 -0
  66. package/dist/src/components/ui/chart/__tests__/chart-layout.d.ts +63 -0
  67. package/dist/src/components/ui/chart/__tests__/chart-layout.test.d.ts +1 -0
  68. package/dist/src/components/ui/chart/chart-format.d.ts +415 -0
  69. package/dist/src/components/ui/chart/chart.d.ts +9 -3
  70. package/dist/src/components/ui/chart/index.d.ts +2 -2
  71. package/dist/src/components/ui/composed-chart/composed-chart.d.ts +156 -7
  72. package/dist/src/components/ui/composed-chart/index.d.ts +1 -1
  73. package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +138 -20
  74. package/dist/src/components/ui/confidence-cone/index.d.ts +1 -1
  75. package/dist/src/components/ui/filter-cards/filter-cards.d.ts +11 -0
  76. package/dist/src/components/ui/filter-cards/index.d.ts +1 -0
  77. package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +201 -3
  78. package/dist/src/components/ui/funnel-chart/index.d.ts +1 -1
  79. package/dist/src/components/ui/histogram/histogram.d.ts +2 -2
  80. package/dist/src/components/ui/line-chart/index.d.ts +1 -1
  81. package/dist/src/components/ui/line-chart/line-chart.d.ts +51 -3
  82. package/dist/src/components/ui/pie-chart/index.d.ts +1 -1
  83. package/dist/src/components/ui/pie-chart/pie-chart.d.ts +145 -4
  84. package/dist/src/components/ui/radar-chart/index.d.ts +1 -1
  85. package/dist/src/components/ui/radar-chart/radar-chart.d.ts +219 -6
  86. package/dist/src/components/ui/radial-bar-chart/index.d.ts +1 -1
  87. package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +215 -9
  88. package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +2 -2
  89. package/dist/src/components/ui/timeline/index.d.ts +1 -1
  90. package/dist/src/components/ui/timeline/timeline.d.ts +79 -20
  91. package/dist/src/components/ui/treemap/index.d.ts +1 -1
  92. package/dist/src/components/ui/treemap/treemap.d.ts +68 -8
  93. package/dist/src/index.d.ts +2 -1
  94. package/dist/ui-react.css +1 -1
  95. package/package.json +2 -2
  96. package/dist/components/ui/search-global/search-global.js +0 -60
  97. package/dist/components/ui/search-global/search-global.js.map +0 -1
  98. package/dist/src/components/ui/search-global/index.d.ts +0 -1
  99. package/dist/src/components/ui/search-global/search-global.d.ts +0 -7
@@ -1,8 +1,8 @@
1
1
  import { jsxs as t, jsx as e, Fragment as k } from "react/jsx-runtime";
2
- import * as n from "react";
2
+ import * as i from "react";
3
3
  import { cva as S } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
4
4
  import { CircleInfoIcon as I } from "@acronis-platform/icons-react/stroke-mono";
5
- import { cn as a } from "../../../lib/utils.js";
5
+ import { cn as r } from "../../../lib/utils.js";
6
6
  import { Card as _ } from "../card/card.js";
7
7
  import { Tooltip as z, TooltipTrigger as T, TooltipContent as A } from "../tooltip/tooltip.js";
8
8
  import { Skeleton as Z } from "../skeleton/skeleton.js";
@@ -28,84 +28,130 @@ const j = S("flex flex-col", {
28
28
  size: "medium",
29
29
  status: "neutral"
30
30
  }
31
- }), y = {
31
+ }), B = {
32
32
  small: "text-[10px]",
33
33
  medium: "text-[11px]",
34
34
  large: "text-xs"
35
- }, B = {
35
+ }, M = {
36
36
  small: "text-2xl",
37
37
  medium: "text-3xl",
38
38
  large: "text-4xl"
39
- }, C = {
39
+ }, V = {
40
40
  small: "text-sm",
41
41
  medium: "text-base",
42
42
  large: "text-lg"
43
- }, G = {
43
+ }, y = {
44
44
  small: "text-xs",
45
45
  medium: "text-xs",
46
46
  large: "text-sm"
47
- }, L = {
47
+ }, C = {
48
48
  small: "size-7",
49
49
  medium: "size-8",
50
50
  large: "size-10"
51
- }, U = {
51
+ }, G = {
52
52
  small: 14,
53
53
  medium: 16,
54
54
  large: 20
55
- }, V = {
55
+ }, L = {
56
56
  small: "h-6 w-16",
57
57
  medium: "h-8 w-20",
58
58
  large: "h-10 w-28"
59
- }, D = {
59
+ }, U = {
60
60
  neutral: "bg-[var(--ui-background-status-neutral-pressed)] text-[var(--ui-text-on-status-neutral)]",
61
61
  info: "bg-[var(--ui-background-status-info-pressed)] text-[var(--ui-text-on-status-info)]",
62
62
  success: "bg-[var(--ui-background-status-success-pressed)] text-[var(--ui-text-on-status-success)]",
63
63
  warning: "bg-[var(--ui-background-status-warning-pressed)] text-[var(--ui-text-on-status-warning)]",
64
64
  danger: "bg-[var(--ui-background-status-danger-pressed)] text-[var(--ui-text-on-status-danger)]",
65
65
  critical: "bg-[var(--ui-background-status-critical-pressed)] text-[var(--ui-text-on-status-critical)]"
66
- }, M = n.forwardRef(
66
+ };
67
+ function D({
68
+ icon: s,
69
+ size: a,
70
+ status: n
71
+ }) {
72
+ return /* @__PURE__ */ e(
73
+ "span",
74
+ {
75
+ "aria-hidden": !0,
76
+ className: r(
77
+ "flex shrink-0 items-center justify-center rounded-lg [&_svg]:shrink-0",
78
+ C[a],
79
+ U[n]
80
+ ),
81
+ children: i.isValidElement(s) ? i.cloneElement(s, {
82
+ size: G[a]
83
+ }) : s
84
+ }
85
+ );
86
+ }
87
+ function O({
88
+ value: s,
89
+ unit: a,
90
+ size: n
91
+ }) {
92
+ return /* @__PURE__ */ t(k, { children: [
93
+ /* @__PURE__ */ e(
94
+ "span",
95
+ {
96
+ className: r(
97
+ "font-bold leading-none tabular-nums text-foreground",
98
+ M[n]
99
+ ),
100
+ children: s
101
+ }
102
+ ),
103
+ a != null && /* @__PURE__ */ e(
104
+ "span",
105
+ {
106
+ className: r("font-medium text-muted-foreground", V[n]),
107
+ children: a
108
+ }
109
+ )
110
+ ] });
111
+ }
112
+ const P = i.forwardRef(
67
113
  ({
68
- className: f,
69
- label: p,
70
- value: h,
71
- unit: l,
72
- caption: i,
73
- trend: c,
114
+ className: s,
115
+ label: a,
116
+ value: n,
117
+ unit: h,
118
+ caption: c,
119
+ trend: u,
74
120
  supportingText: m,
75
121
  badge: d,
76
- icon: r,
77
- tooltip: u,
122
+ icon: o,
123
+ tooltip: g,
78
124
  tooltipLabel: v = "More information",
79
125
  loading: N = !1,
80
- size: o,
81
- status: x,
126
+ size: x,
127
+ status: f,
82
128
  children: b,
83
129
  ...w
84
130
  }, E) => {
85
- const s = o ?? "medium", g = x ?? "neutral";
131
+ const l = x ?? "medium", p = f ?? "neutral";
86
132
  return /* @__PURE__ */ t(
87
133
  _,
88
134
  {
89
135
  ref: E,
90
- "data-size": s,
91
- "data-status": g,
92
- className: a("flex flex-col p-4", f),
136
+ "data-size": l,
137
+ "data-status": p,
138
+ className: r("flex flex-col p-4", s),
93
139
  ...w,
94
140
  children: [
95
- /* @__PURE__ */ t("div", { className: a(j({ size: o, status: x })), children: [
141
+ /* @__PURE__ */ t("div", { className: r(j({ size: x, status: f })), children: [
96
142
  /* @__PURE__ */ t("div", { className: "flex items-center justify-between gap-2", children: [
97
143
  /* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-1.5", children: [
98
144
  /* @__PURE__ */ e(
99
145
  "span",
100
146
  {
101
- className: a(
147
+ className: r(
102
148
  "min-w-0 truncate font-bold uppercase leading-none tracking-wide text-muted-foreground",
103
- y[s]
149
+ B[l]
104
150
  ),
105
- children: p
151
+ children: a
106
152
  }
107
153
  ),
108
- u != null && /* @__PURE__ */ t(z, { children: [
154
+ g != null && /* @__PURE__ */ t(z, { children: [
109
155
  /* @__PURE__ */ e(
110
156
  T,
111
157
  {
@@ -114,60 +160,32 @@ const j = S("flex flex-col", {
114
160
  children: /* @__PURE__ */ e(I, { size: 16, "aria-hidden": !0 })
115
161
  }
116
162
  ),
117
- /* @__PURE__ */ e(A, { children: u })
163
+ /* @__PURE__ */ e(A, { children: g })
118
164
  ] })
119
165
  ] }),
120
- i != null && /* @__PURE__ */ e("div", { className: "shrink-0", children: i })
166
+ c != null && /* @__PURE__ */ e("div", { className: "shrink-0", children: c })
121
167
  ] }),
122
168
  /* @__PURE__ */ t("div", { className: "flex items-center justify-between gap-3", children: [
123
169
  /* @__PURE__ */ t("div", { className: "flex min-w-0 items-center gap-2", children: [
124
- r != null && /* @__PURE__ */ e(
125
- "span",
170
+ o != null && /* @__PURE__ */ e(
171
+ D,
126
172
  {
127
- "aria-hidden": !0,
128
- className: a(
129
- "flex shrink-0 items-center justify-center rounded-lg [&_svg]:shrink-0",
130
- L[s],
131
- D[g]
132
- ),
133
- children: n.isValidElement(r) ? n.cloneElement(
134
- r,
135
- { size: U[s] }
136
- ) : r
173
+ icon: o,
174
+ size: l,
175
+ status: p
137
176
  }
138
177
  ),
139
178
  /* @__PURE__ */ t("div", { className: "flex min-w-0 items-baseline gap-1", children: [
140
- N ? /* @__PURE__ */ e(Z, { className: V[s] }) : /* @__PURE__ */ t(k, { children: [
141
- /* @__PURE__ */ e(
142
- "span",
143
- {
144
- className: a(
145
- "font-bold leading-none tabular-nums text-foreground",
146
- B[s]
147
- ),
148
- children: h
149
- }
150
- ),
151
- l != null && /* @__PURE__ */ e(
152
- "span",
153
- {
154
- className: a(
155
- "font-medium text-muted-foreground",
156
- C[s]
157
- ),
158
- children: l
159
- }
160
- )
161
- ] }),
179
+ N ? /* @__PURE__ */ e(Z, { className: L[l] }) : /* @__PURE__ */ e(O, { value: n, unit: h, size: l }),
162
180
  d != null && /* @__PURE__ */ e("span", { className: "ms-1 self-center", children: d })
163
181
  ] })
164
182
  ] }),
165
- c != null && /* @__PURE__ */ e("div", { className: "shrink-0", children: c })
183
+ u != null && /* @__PURE__ */ e("div", { className: "shrink-0", children: u })
166
184
  ] }),
167
185
  m != null && /* @__PURE__ */ e(
168
186
  "div",
169
187
  {
170
- className: a("text-muted-foreground", G[s]),
188
+ className: r("text-muted-foreground", y[l]),
171
189
  children: m
172
190
  }
173
191
  )
@@ -178,8 +196,8 @@ const j = S("flex flex-col", {
178
196
  );
179
197
  }
180
198
  );
181
- M.displayName = "Metric";
199
+ P.displayName = "Metric";
182
200
  export {
183
- M as Metric
201
+ P as Metric
184
202
  };
185
203
  //# sourceMappingURL=metric.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"metric.js","sources":["../../../../src/components/ui/metric/metric.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CircleInfoIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\nimport { Card } from '../card';\nimport { Skeleton } from '../skeleton';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../tooltip';\n\n// A presentational metric / statistic, laid out after the Figma MetricCard node:\n// a label row (label + an optional top-right caption) over a value row (an\n// optional status-tinted icon badge + the value + unit on the left, an optional\n// trend on the right), with optional supporting text below. It owns visual\n// hierarchy and layout only — it never computes or formats the value, converts\n// units, or decides whether a value is good or bad; the consumer passes\n// ready-to-render nodes and a resolved `status`, and composes a `TrendIndicator`\n// into the trend slot. `status` tints the icon badge (a subtle cue, not a full\n// color fill). No dedicated token tier — colors are semantic `--ui-*` tokens and\n// geometry uses the Tailwind scale.\nconst metricVariants = cva('flex flex-col', {\n variants: {\n size: {\n small: 'gap-1',\n medium: 'gap-1.5',\n large: 'gap-2',\n },\n // Semantic status — drives the icon badge tint (see STATUS_BADGE). Kept as a\n // cva axis so the enum is spec-conformant; the tint is applied on the badge.\n status: {\n neutral: '',\n info: '',\n success: '',\n warning: '',\n danger: '',\n critical: '',\n },\n },\n defaultVariants: {\n size: 'medium',\n status: 'neutral',\n },\n});\n\nconst LABEL_SIZE = {\n small: 'text-[10px]',\n medium: 'text-[11px]',\n large: 'text-xs',\n} as const;\n\nconst VALUE_SIZE = {\n small: 'text-2xl',\n medium: 'text-3xl',\n large: 'text-4xl',\n} as const;\n\nconst UNIT_SIZE = {\n small: 'text-sm',\n medium: 'text-base',\n large: 'text-lg',\n} as const;\n\nconst SUPPORTING_SIZE = {\n small: 'text-xs',\n medium: 'text-xs',\n large: 'text-sm',\n} as const;\n\nconst BADGE_SIZE = {\n small: 'size-7',\n medium: 'size-8',\n large: 'size-10',\n} as const;\n\n// icons-react icons size themselves from a `size` prop (which also picks the\n// designed stroke weight) — CSS can't do that reliably — so the badge icon is\n// cloned to the right px for the Metric size.\nconst BADGE_ICON_PX = {\n small: 14,\n medium: 16,\n large: 20,\n} as const;\n\nconst SKELETON_SIZE = {\n small: 'h-6 w-16',\n medium: 'h-8 w-20',\n large: 'h-10 w-28',\n} as const;\n\n// The badge pairs the status \"pressed\" background tint with its matching icon\n// color (the same pairing the design uses for status icon chips).\nconst STATUS_BADGE = {\n neutral:\n 'bg-[var(--ui-background-status-neutral-pressed)] text-[var(--ui-text-on-status-neutral)]',\n info: 'bg-[var(--ui-background-status-info-pressed)] text-[var(--ui-text-on-status-info)]',\n success:\n 'bg-[var(--ui-background-status-success-pressed)] text-[var(--ui-text-on-status-success)]',\n warning:\n 'bg-[var(--ui-background-status-warning-pressed)] text-[var(--ui-text-on-status-warning)]',\n danger:\n 'bg-[var(--ui-background-status-danger-pressed)] text-[var(--ui-text-on-status-danger)]',\n critical:\n 'bg-[var(--ui-background-status-critical-pressed)] text-[var(--ui-text-on-status-critical)]',\n} as const;\n\nexport interface MetricProps\n extends React.ComponentProps<'div'>,\n VariantProps<typeof metricVariants> {\n /** What the value measures — e.g. \"Gross margin\". Rendered as an uppercase note heading. */\n label: React.ReactNode;\n /**\n * The primary value, already formatted (`73`, `\"94%\"`, `\"$72K\"`, `\"2.8\"`).\n * The kit does not format currency, units, or decimals.\n */\n value: React.ReactNode;\n /** Unit shown next to the value at a smaller, muted size — e.g. `\"%\"`, `\"hours\"`. */\n unit?: React.ReactNode;\n /** A top-right caption aligned with the label — e.g. a timeframe `Tag` (\"Last 30 days\"). */\n caption?: React.ReactNode;\n /** A trend slot on the right of the value — typically a `TrendIndicator`. */\n trend?: React.ReactNode;\n /** Secondary line below the value — e.g. \"Target: 99%\". */\n supportingText?: React.ReactNode;\n /** A small badge / metadata slot beside the value — e.g. a `Tag`. */\n badge?: React.ReactNode;\n /** Icon rendered in a status-tinted badge before the value. */\n icon?: React.ReactNode;\n /** Contextual hint on an info affordance next to the label (Base UI Tooltip). */\n tooltip?: React.ReactNode;\n /** Accessible name for the info affordance that reveals `tooltip`. */\n tooltipLabel?: string;\n /** Show a skeleton in place of the value, preserving its space. */\n loading?: boolean;\n /** Card body below the header — e.g. a chart, a Separator, an insight line. */\n children?: React.ReactNode;\n}\n\nconst Metric = React.forwardRef<HTMLDivElement, MetricProps>(\n (\n {\n className,\n label,\n value,\n unit,\n caption,\n trend,\n supportingText,\n badge,\n icon,\n tooltip,\n tooltipLabel = 'More information',\n loading = false,\n size,\n status,\n children,\n ...props\n },\n ref\n ) => {\n const resolvedSize = size ?? 'medium';\n const resolvedStatus = status ?? 'neutral';\n\n return (\n <Card\n ref={ref}\n data-size={resolvedSize}\n data-status={resolvedStatus}\n className={cn('flex flex-col p-4', className)}\n {...props}\n >\n <div className={cn(metricVariants({ size, status }))}>\n {/* Label row: label (+ optional info) on the left, caption on the right. */}\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <span\n className={cn(\n 'min-w-0 truncate font-bold uppercase leading-none tracking-wide text-muted-foreground',\n LABEL_SIZE[resolvedSize]\n )}\n >\n {label}\n </span>\n {tooltip != null && (\n <Tooltip>\n <TooltipTrigger\n aria-label={tooltipLabel}\n className=\"inline-flex shrink-0 cursor-default appearance-none border-0 bg-transparent p-0 text-muted-foreground\"\n >\n <CircleInfoIcon size={16} aria-hidden />\n </TooltipTrigger>\n <TooltipContent>{tooltip}</TooltipContent>\n </Tooltip>\n )}\n </div>\n {caption != null && <div className=\"shrink-0\">{caption}</div>}\n </div>\n\n {/* Value row: badge + value + unit on the left, trend on the right. */}\n <div className=\"flex items-center justify-between gap-3\">\n <div className=\"flex min-w-0 items-center gap-2\">\n {icon != null && (\n <span\n aria-hidden\n className={cn(\n 'flex shrink-0 items-center justify-center rounded-lg [&_svg]:shrink-0',\n BADGE_SIZE[resolvedSize],\n STATUS_BADGE[resolvedStatus]\n )}\n >\n {React.isValidElement(icon)\n ? React.cloneElement(\n icon as React.ReactElement<{ size?: number }>,\n { size: BADGE_ICON_PX[resolvedSize] }\n )\n : icon}\n </span>\n )}\n <div className=\"flex min-w-0 items-baseline gap-1\">\n {loading ? (\n <Skeleton className={SKELETON_SIZE[resolvedSize]} />\n ) : (\n <>\n <span\n className={cn(\n 'font-bold leading-none tabular-nums text-foreground',\n VALUE_SIZE[resolvedSize]\n )}\n >\n {value}\n </span>\n {unit != null && (\n <span\n className={cn(\n 'font-medium text-muted-foreground',\n UNIT_SIZE[resolvedSize]\n )}\n >\n {unit}\n </span>\n )}\n </>\n )}\n {badge != null && <span className=\"ms-1 self-center\">{badge}</span>}\n </div>\n </div>\n {trend != null && <div className=\"shrink-0\">{trend}</div>}\n </div>\n\n {supportingText != null && (\n <div\n className={cn('text-muted-foreground', SUPPORTING_SIZE[resolvedSize])}\n >\n {supportingText}\n </div>\n )}\n </div>\n {children}\n </Card>\n );\n }\n);\nMetric.displayName = 'Metric';\n\nexport { Metric };\n"],"names":["metricVariants","cva","LABEL_SIZE","VALUE_SIZE","UNIT_SIZE","SUPPORTING_SIZE","BADGE_SIZE","BADGE_ICON_PX","SKELETON_SIZE","STATUS_BADGE","Metric","React","className","label","value","unit","caption","trend","supportingText","badge","icon","tooltip","tooltipLabel","loading","size","status","children","props","ref","resolvedSize","resolvedStatus","jsxs","Card","cn","jsx","Tooltip","TooltipTrigger","CircleInfoIcon","TooltipContent","Skeleton","Fragment"],"mappings":";;;;;;;;AAqBA,MAAMA,IAAiBC,EAAI,iBAAiB;AAAA,EAC1C,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,IAAA;AAAA;AAAA;AAAA,IAIT,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,MAAM;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AAA;AAAA,EAGP;AACF;AACAhB,EAAO,cAAc;"}
1
+ {"version":3,"file":"metric.js","sources":["../../../../src/components/ui/metric/metric.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CircleInfoIcon } from '@acronis-platform/icons-react/stroke-mono';\n\nimport { cn } from '@/lib/utils';\nimport { Card } from '../card';\nimport { Skeleton } from '../skeleton';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '../tooltip';\n\n// A presentational metric / statistic, laid out after the Figma MetricCard node:\n// a label row (label + an optional top-right caption) over a value row (an\n// optional status-tinted icon badge + the value + unit on the left, an optional\n// trend on the right), with optional supporting text below. It owns visual\n// hierarchy and layout only — it never computes or formats the value, converts\n// units, or decides whether a value is good or bad; the consumer passes\n// ready-to-render nodes and a resolved `status`, and composes a `TrendIndicator`\n// into the trend slot. `status` tints the icon badge (a subtle cue, not a full\n// color fill). No dedicated token tier — colors are semantic `--ui-*` tokens and\n// geometry uses the Tailwind scale.\nconst metricVariants = cva('flex flex-col', {\n variants: {\n size: {\n small: 'gap-1',\n medium: 'gap-1.5',\n large: 'gap-2',\n },\n // Semantic status — drives the icon badge tint (see STATUS_BADGE). Kept as a\n // cva axis so the enum is spec-conformant; the tint is applied on the badge.\n status: {\n neutral: '',\n info: '',\n success: '',\n warning: '',\n danger: '',\n critical: '',\n },\n },\n defaultVariants: {\n size: 'medium',\n status: 'neutral',\n },\n});\n\nconst LABEL_SIZE = {\n small: 'text-[10px]',\n medium: 'text-[11px]',\n large: 'text-xs',\n} as const;\n\nconst VALUE_SIZE = {\n small: 'text-2xl',\n medium: 'text-3xl',\n large: 'text-4xl',\n} as const;\n\nconst UNIT_SIZE = {\n small: 'text-sm',\n medium: 'text-base',\n large: 'text-lg',\n} as const;\n\nconst SUPPORTING_SIZE = {\n small: 'text-xs',\n medium: 'text-xs',\n large: 'text-sm',\n} as const;\n\nconst BADGE_SIZE = {\n small: 'size-7',\n medium: 'size-8',\n large: 'size-10',\n} as const;\n\n// icons-react icons size themselves from a `size` prop (which also picks the\n// designed stroke weight) — CSS can't do that reliably — so the badge icon is\n// cloned to the right px for the Metric size.\nconst BADGE_ICON_PX = {\n small: 14,\n medium: 16,\n large: 20,\n} as const;\n\nconst SKELETON_SIZE = {\n small: 'h-6 w-16',\n medium: 'h-8 w-20',\n large: 'h-10 w-28',\n} as const;\n\n// The badge pairs the status \"pressed\" background tint with its matching icon\n// color (the same pairing the design uses for status icon chips).\nconst STATUS_BADGE = {\n neutral:\n 'bg-[var(--ui-background-status-neutral-pressed)] text-[var(--ui-text-on-status-neutral)]',\n info: 'bg-[var(--ui-background-status-info-pressed)] text-[var(--ui-text-on-status-info)]',\n success:\n 'bg-[var(--ui-background-status-success-pressed)] text-[var(--ui-text-on-status-success)]',\n warning:\n 'bg-[var(--ui-background-status-warning-pressed)] text-[var(--ui-text-on-status-warning)]',\n danger:\n 'bg-[var(--ui-background-status-danger-pressed)] text-[var(--ui-text-on-status-danger)]',\n critical:\n 'bg-[var(--ui-background-status-critical-pressed)] text-[var(--ui-text-on-status-critical)]',\n} as const;\n\nexport interface MetricProps\n extends React.ComponentProps<'div'>,\n VariantProps<typeof metricVariants> {\n /** What the value measures — e.g. \"Gross margin\". Rendered as an uppercase note heading. */\n label: React.ReactNode;\n /**\n * The primary value, already formatted (`73`, `\"94%\"`, `\"$72K\"`, `\"2.8\"`).\n * The kit does not format currency, units, or decimals.\n */\n value: React.ReactNode;\n /** Unit shown next to the value at a smaller, muted size — e.g. `\"%\"`, `\"hours\"`. */\n unit?: React.ReactNode;\n /** A top-right caption aligned with the label — e.g. a timeframe `Tag` (\"Last 30 days\"). */\n caption?: React.ReactNode;\n /** A trend slot on the right of the value — typically a `TrendIndicator`. */\n trend?: React.ReactNode;\n /** Secondary line below the value — e.g. \"Target: 99%\". */\n supportingText?: React.ReactNode;\n /** A small badge / metadata slot beside the value — e.g. a `Tag`. */\n badge?: React.ReactNode;\n /** Icon rendered in a status-tinted badge before the value. */\n icon?: React.ReactNode;\n /** Contextual hint on an info affordance next to the label (Base UI Tooltip). */\n tooltip?: React.ReactNode;\n /** Accessible name for the info affordance that reveals `tooltip`. */\n tooltipLabel?: string;\n /** Show a skeleton in place of the value, preserving its space. */\n loading?: boolean;\n /** Card body below the header — e.g. a chart, a Separator, an insight line. */\n children?: React.ReactNode;\n}\n\n// Every size-keyed lookup above (LABEL/VALUE/UNIT/SUPPORTING/BADGE/SKELETON) is\n// keyed by the `size` cva axis, so the vocabulary is derived from that axis\n// rather than from whichever one map a given helper happens to index.\ntype MetricSize = NonNullable<VariantProps<typeof metricVariants>['size']>;\ntype MetricStatus = keyof typeof STATUS_BADGE;\n\n/**\n * The status-tinted icon chip beside the value.\n *\n * The icon is cloned rather than sized in CSS because icons-react icons pick\n * their designed stroke weight from the `size` prop — scaling them with CSS\n * would thin or thicken the stroke off-design.\n */\nfunction MetricIconBadge({\n icon,\n size,\n status,\n}: {\n icon: React.ReactNode;\n size: MetricSize;\n status: MetricStatus;\n}) {\n return (\n <span\n aria-hidden\n className={cn(\n 'flex shrink-0 items-center justify-center rounded-lg [&_svg]:shrink-0',\n BADGE_SIZE[size],\n STATUS_BADGE[status]\n )}\n >\n {React.isValidElement(icon)\n ? React.cloneElement(icon as React.ReactElement<{ size?: number }>, {\n size: BADGE_ICON_PX[size],\n })\n : icon}\n </span>\n );\n}\n\n/** The headline number and its unit, sharing one baseline. */\nfunction MetricValue({\n value,\n unit,\n size,\n}: {\n value: React.ReactNode;\n unit?: React.ReactNode;\n size: MetricSize;\n}) {\n return (\n <>\n <span\n className={cn(\n 'font-bold leading-none tabular-nums text-foreground',\n VALUE_SIZE[size]\n )}\n >\n {value}\n </span>\n {unit != null && (\n <span\n className={cn('font-medium text-muted-foreground', UNIT_SIZE[size])}\n >\n {unit}\n </span>\n )}\n </>\n );\n}\n\nconst Metric = React.forwardRef<HTMLDivElement, MetricProps>(\n (\n {\n className,\n label,\n value,\n unit,\n caption,\n trend,\n supportingText,\n badge,\n icon,\n tooltip,\n tooltipLabel = 'More information',\n loading = false,\n size,\n status,\n children,\n ...props\n },\n ref\n ) => {\n const resolvedSize = size ?? 'medium';\n const resolvedStatus = status ?? 'neutral';\n\n return (\n <Card\n ref={ref}\n data-size={resolvedSize}\n data-status={resolvedStatus}\n className={cn('flex flex-col p-4', className)}\n {...props}\n >\n <div className={cn(metricVariants({ size, status }))}>\n {/* Label row: label (+ optional info) on the left, caption on the right. */}\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <span\n className={cn(\n 'min-w-0 truncate font-bold uppercase leading-none tracking-wide text-muted-foreground',\n LABEL_SIZE[resolvedSize]\n )}\n >\n {label}\n </span>\n {tooltip != null && (\n <Tooltip>\n <TooltipTrigger\n aria-label={tooltipLabel}\n className=\"inline-flex shrink-0 cursor-default appearance-none border-0 bg-transparent p-0 text-muted-foreground\"\n >\n <CircleInfoIcon size={16} aria-hidden />\n </TooltipTrigger>\n <TooltipContent>{tooltip}</TooltipContent>\n </Tooltip>\n )}\n </div>\n {caption != null && <div className=\"shrink-0\">{caption}</div>}\n </div>\n\n {/* Value row: badge + value + unit on the left, trend on the right. */}\n <div className=\"flex items-center justify-between gap-3\">\n <div className=\"flex min-w-0 items-center gap-2\">\n {icon != null && (\n <MetricIconBadge\n icon={icon}\n size={resolvedSize}\n status={resolvedStatus}\n />\n )}\n <div className=\"flex min-w-0 items-baseline gap-1\">\n {loading ? (\n <Skeleton className={SKELETON_SIZE[resolvedSize]} />\n ) : (\n <MetricValue value={value} unit={unit} size={resolvedSize} />\n )}\n {badge != null && <span className=\"ms-1 self-center\">{badge}</span>}\n </div>\n </div>\n {trend != null && <div className=\"shrink-0\">{trend}</div>}\n </div>\n\n {supportingText != null && (\n <div\n className={cn('text-muted-foreground', SUPPORTING_SIZE[resolvedSize])}\n >\n {supportingText}\n </div>\n )}\n </div>\n {children}\n </Card>\n );\n }\n);\nMetric.displayName = 'Metric';\n\nexport { Metric };\n"],"names":["metricVariants","cva","LABEL_SIZE","VALUE_SIZE","UNIT_SIZE","SUPPORTING_SIZE","BADGE_SIZE","BADGE_ICON_PX","SKELETON_SIZE","STATUS_BADGE","MetricIconBadge","icon","size","status","jsx","cn","React","MetricValue","value","unit","jsxs","Fragment","Metric","className","label","caption","trend","supportingText","badge","tooltip","tooltipLabel","loading","children","props","ref","resolvedSize","resolvedStatus","Card","Tooltip","TooltipTrigger","CircleInfoIcon","TooltipContent","Skeleton"],"mappings":";;;;;;;;AAqBA,MAAMA,IAAiBC,EAAI,iBAAiB;AAAA,EAC1C,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,OAAO;AAAA,IAAA;AAAA;AAAA;AAAA,IAIT,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,MACT,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,UAAU;AAAA,IAAA;AAAA,EACZ;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,QAAQ;AAAA,EAAA;AAEZ,CAAC,GAEKC,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,IAAY;AAAA,EAChB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,IAAkB;AAAA,EACtB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,IAAa;AAAA,EACjB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GAKMC,IAAgB;AAAA,EACpB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GAEMC,IAAgB;AAAA,EACpB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT,GAIMC,IAAe;AAAA,EACnB,SACE;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