@acronis-platform/ui-react 0.58.0 → 0.61.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 (118) 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 +210 -119
  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 -149
  8. package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
  9. package/dist/components/ui/calendar/calendar.js +17 -15
  10. package/dist/components/ui/calendar/calendar.js.map +1 -1
  11. package/dist/components/ui/carousel-dialog/carousel-dialog.js +87 -0
  12. package/dist/components/ui/carousel-dialog/carousel-dialog.js.map +1 -0
  13. package/dist/components/ui/category-bar/category-bar.js +147 -0
  14. package/dist/components/ui/category-bar/category-bar.js.map +1 -0
  15. package/dist/components/ui/chart/chart-format.js +170 -0
  16. package/dist/components/ui/chart/chart-format.js.map +1 -0
  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 +423 -98
  20. package/dist/components/ui/composed-chart/composed-chart.js.map +1 -1
  21. package/dist/components/ui/confidence-cone/confidence-cone.js +306 -172
  22. package/dist/components/ui/confidence-cone/confidence-cone.js.map +1 -1
  23. package/dist/components/ui/dialog/dialog.js +29 -29
  24. package/dist/components/ui/dialog/dialog.js.map +1 -1
  25. package/dist/components/ui/dialog-footer-carousel/dialog-footer-carousel.js +57 -0
  26. package/dist/components/ui/dialog-footer-carousel/dialog-footer-carousel.js.map +1 -0
  27. package/dist/components/ui/dialog-footer-default/dialog-footer-default.js +1 -1
  28. package/dist/components/ui/dialog-footer-default/dialog-footer-default.js.map +1 -1
  29. package/dist/components/ui/dialog-welcome/dialog-welcome.js +272 -0
  30. package/dist/components/ui/dialog-welcome/dialog-welcome.js.map +1 -0
  31. package/dist/components/ui/funnel-chart/funnel-chart.js +245 -51
  32. package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
  33. package/dist/components/ui/histogram/histogram.js +96 -64
  34. package/dist/components/ui/histogram/histogram.js.map +1 -1
  35. package/dist/components/ui/input/input.js.map +1 -1
  36. package/dist/components/ui/line-chart/line-chart.js +230 -159
  37. package/dist/components/ui/line-chart/line-chart.js.map +1 -1
  38. package/dist/components/ui/metric/metric.js +88 -70
  39. package/dist/components/ui/metric/metric.js.map +1 -1
  40. package/dist/components/ui/pie-chart/pie-chart.js +234 -80
  41. package/dist/components/ui/pie-chart/pie-chart.js.map +1 -1
  42. package/dist/components/ui/radar-chart/radar-chart.js +210 -57
  43. package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
  44. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js +358 -50
  45. package/dist/components/ui/radial-bar-chart/radial-bar-chart.js.map +1 -1
  46. package/dist/components/ui/sankey-chart/sankey-chart.js +199 -0
  47. package/dist/components/ui/sankey-chart/sankey-chart.js.map +1 -0
  48. package/dist/components/ui/scatter-chart/scatter-chart.js +86 -50
  49. package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
  50. package/dist/components/ui/timeline/timeline.js +206 -142
  51. package/dist/components/ui/timeline/timeline.js.map +1 -1
  52. package/dist/components/ui/toolbar/toolbar.js +82 -92
  53. package/dist/components/ui/toolbar/toolbar.js.map +1 -1
  54. package/dist/components/ui/treemap/treemap.js +183 -59
  55. package/dist/components/ui/treemap/treemap.js.map +1 -1
  56. package/dist/index.js +481 -439
  57. package/dist/index.js.map +1 -1
  58. package/dist/lib/breakpoints.js +9 -6
  59. package/dist/lib/breakpoints.js.map +1 -1
  60. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.6/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +25 -0
  61. package/dist/node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.6/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js.map +1 -0
  62. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +36 -0
  63. package/dist/node_modules/.pnpm/embla-carousel-reactive-utils@8.6.0_embla-carousel@8.6.0/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js.map +1 -0
  64. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js +1205 -0
  65. package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/embla-carousel.esm.js.map +1 -0
  66. package/dist/react.js +481 -439
  67. package/dist/react.js.map +1 -1
  68. package/dist/src/components/ui/area-chart/area-chart.d.ts +52 -17
  69. package/dist/src/components/ui/area-chart/index.d.ts +1 -1
  70. package/dist/src/components/ui/avatar/avatar.d.ts +1 -1
  71. package/dist/src/components/ui/bar-chart/bar-chart.d.ts +152 -29
  72. package/dist/src/components/ui/bar-chart/index.d.ts +1 -1
  73. package/dist/src/components/ui/button/button.d.ts +1 -1
  74. package/dist/src/components/ui/button-menu/button-menu.d.ts +1 -1
  75. package/dist/src/components/ui/carousel-dialog/carousel-dialog.d.ts +28 -0
  76. package/dist/src/components/ui/carousel-dialog/index.d.ts +1 -0
  77. package/dist/src/components/ui/category-bar/category-bar.d.ts +51 -0
  78. package/dist/src/components/ui/category-bar/index.d.ts +1 -0
  79. package/dist/src/components/ui/chart/__tests__/chart-format.test.d.ts +1 -0
  80. package/dist/src/components/ui/chart/__tests__/chart-layout.d.ts +63 -0
  81. package/dist/src/components/ui/chart/__tests__/chart-layout.test.d.ts +1 -0
  82. package/dist/src/components/ui/chart/chart-format.d.ts +526 -0
  83. package/dist/src/components/ui/chart/chart.d.ts +11 -3
  84. package/dist/src/components/ui/chart/index.d.ts +3 -1
  85. package/dist/src/components/ui/composed-chart/composed-chart.d.ts +154 -20
  86. package/dist/src/components/ui/composed-chart/index.d.ts +1 -1
  87. package/dist/src/components/ui/confidence-cone/confidence-cone.d.ts +138 -37
  88. package/dist/src/components/ui/confidence-cone/index.d.ts +1 -1
  89. package/dist/src/components/ui/dialog-footer-carousel/dialog-footer-carousel.d.ts +9 -0
  90. package/dist/src/components/ui/dialog-footer-carousel/index.d.ts +1 -0
  91. package/dist/src/components/ui/dialog-welcome/dialog-welcome.d.ts +54 -0
  92. package/dist/src/components/ui/dialog-welcome/dialog-welcome.docs.d.ts +55 -0
  93. package/dist/src/components/ui/dialog-welcome/index.d.ts +1 -0
  94. package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +201 -3
  95. package/dist/src/components/ui/funnel-chart/index.d.ts +1 -1
  96. package/dist/src/components/ui/histogram/histogram.d.ts +2 -17
  97. package/dist/src/components/ui/line-chart/index.d.ts +1 -1
  98. package/dist/src/components/ui/line-chart/line-chart.d.ts +50 -17
  99. package/dist/src/components/ui/pie-chart/index.d.ts +1 -1
  100. package/dist/src/components/ui/pie-chart/pie-chart.d.ts +145 -4
  101. package/dist/src/components/ui/radar-chart/index.d.ts +1 -1
  102. package/dist/src/components/ui/radar-chart/radar-chart.d.ts +219 -6
  103. package/dist/src/components/ui/radial-bar-chart/index.d.ts +1 -1
  104. package/dist/src/components/ui/radial-bar-chart/radial-bar-chart.d.ts +215 -9
  105. package/dist/src/components/ui/sankey-chart/index.d.ts +2 -0
  106. package/dist/src/components/ui/sankey-chart/sankey-chart.d.ts +69 -0
  107. package/dist/src/components/ui/scatter-chart/scatter-chart.d.ts +2 -17
  108. package/dist/src/components/ui/timeline/index.d.ts +1 -1
  109. package/dist/src/components/ui/timeline/timeline.d.ts +79 -20
  110. package/dist/src/components/ui/treemap/index.d.ts +1 -1
  111. package/dist/src/components/ui/treemap/treemap.d.ts +68 -8
  112. package/dist/src/index.d.ts +5 -1
  113. package/dist/ui-react.css +1 -1
  114. package/package.json +5 -4
  115. package/dist/components/ui/search-global/search-global.js +0 -60
  116. package/dist/components/ui/search-global/search-global.js.map +0 -1
  117. package/dist/src/components/ui/search-global/index.d.ts +0 -1
  118. package/dist/src/components/ui/search-global/search-global.d.ts +0 -7
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # @acronis-platform/ui-react
2
2
 
3
- The next-generation Acronis React component library — a **Base UI**
4
- implementation, themed by [`@acronis-platform/tokens-pd`](../tokens-pd)
5
- (generated from [`@acronis-platform/design-tokens`](../design-tokens)).
3
+ The Acronis React component library — a **Base UI** implementation, themed by
4
+ [`@acronis-platform/tokens-pd`](../tokens-pd) (generated from
5
+ [`@acronis-platform/design-tokens`](../design-tokens)).
6
6
 
7
- > Early days: this package is being built out component by component. See
8
- > [`AGENTS.md`](./AGENTS.md) for conventions.
7
+ > This package is under active development toward v1 and grows component by
8
+ > component. See [`AGENTS.md`](./AGENTS.md) for conventions.
9
9
 
10
10
  ## Install
11
11
 
@@ -1 +1 @@
1
- {"version":3,"file":"app-shell.js","sources":["../../../../src/components/ui/app-shell/app-shell.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// The full-page application scaffold from the Figma App Shell (node 2782-1495):\n// a left sidebar column (holds SidebarPrimary, optionally a secondary menu) beside\n// a body column of a sticky header (with the global search) over the scrolling\n// main content. Layout-only — the rich parts come from SidebarPrimary /\n// SidebarSecondary / SearchGlobal placed inside these slots. Surfaces use the\n// shared `--ui-*` tokens (bg-background / border-border; a bare `border` is\n// transparent in ui-react, so borders name `border-border`).\n\nconst AppShell = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"app-shell\"\n className={cn('flex min-h-screen w-full bg-background', className)}\n {...props}\n />\n));\nAppShell.displayName = 'AppShell';\n\nconst AppShellSidebar = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <aside\n ref={ref}\n data-slot=\"app-shell-sidebar\"\n className={cn('flex shrink-0', className)}\n {...props}\n />\n));\nAppShellSidebar.displayName = 'AppShellSidebar';\n\nconst AppShellBody = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"app-shell-body\"\n className={cn('flex min-w-0 flex-1 flex-col', className)}\n {...props}\n />\n));\nAppShellBody.displayName = 'AppShellBody';\n\nconst AppShellHeader = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <header\n ref={ref}\n data-slot=\"app-shell-header\"\n className={cn(\n 'sticky top-0 z-10 flex h-16 shrink-0 items-center gap-4 border-b border-border bg-background px-6',\n className\n )}\n {...props}\n />\n));\nAppShellHeader.displayName = 'AppShellHeader';\n\nconst AppShellMain = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <main\n ref={ref}\n data-slot=\"app-shell-main\"\n className={cn('flex-1 overflow-auto', className)}\n {...props}\n />\n));\nAppShellMain.displayName = 'AppShellMain';\n\nconst AppShellFooter = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <footer\n ref={ref}\n data-slot=\"app-shell-footer\"\n className={cn('shrink-0 border-t border-border bg-background px-6 py-4', className)}\n {...props}\n />\n));\nAppShellFooter.displayName = 'AppShellFooter';\n\nexport {\n AppShell,\n AppShellSidebar,\n AppShellBody,\n AppShellHeader,\n AppShellMain,\n AppShellFooter,\n};\n"],"names":["AppShell","React","className","props","ref","jsx","cn","AppShellSidebar","AppShellBody","AppShellHeader","AppShellMain","AppShellFooter"],"mappings":";;;AAYA,MAAMA,IAAWC,EAAM,WAGrB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,E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,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,2DAA2DJ,CAAS;AAAA,IACjF,GAAGC;AAAA,EAAA;AACN,CACD;AACDQ,EAAe,cAAc;"}
1
+ {"version":3,"file":"app-shell.js","sources":["../../../../src/components/ui/app-shell/app-shell.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/lib/utils';\n\n// The full-page application scaffold from the Figma App Shell (node 2782-1495):\n// a left sidebar column (holds SidebarPrimary, optionally a secondary menu) beside\n// a body column of a sticky header over the scrolling main content. Layout-only\n// — the rich parts come from SidebarPrimary / SidebarSecondary placed inside\n// these slots. Surfaces use the shared `--ui-*` tokens (bg-background /\n// border-border; a bare `border` is transparent in ui-react, so borders name\n// `border-border`).\n\nconst AppShell = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"app-shell\"\n className={cn('flex min-h-screen w-full bg-background', className)}\n {...props}\n />\n));\nAppShell.displayName = 'AppShell';\n\nconst AppShellSidebar = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <aside\n ref={ref}\n data-slot=\"app-shell-sidebar\"\n className={cn('flex shrink-0', className)}\n {...props}\n />\n));\nAppShellSidebar.displayName = 'AppShellSidebar';\n\nconst AppShellBody = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-slot=\"app-shell-body\"\n className={cn('flex min-w-0 flex-1 flex-col', className)}\n {...props}\n />\n));\nAppShellBody.displayName = 'AppShellBody';\n\nconst AppShellHeader = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <header\n ref={ref}\n data-slot=\"app-shell-header\"\n className={cn(\n 'sticky top-0 z-10 flex h-16 shrink-0 items-center gap-4 border-b border-border bg-background px-6',\n className\n )}\n {...props}\n />\n));\nAppShellHeader.displayName = 'AppShellHeader';\n\nconst AppShellMain = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <main\n ref={ref}\n data-slot=\"app-shell-main\"\n className={cn('flex-1 overflow-auto', className)}\n {...props}\n />\n));\nAppShellMain.displayName = 'AppShellMain';\n\nconst AppShellFooter = React.forwardRef<\n HTMLElement,\n React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n <footer\n ref={ref}\n data-slot=\"app-shell-footer\"\n className={cn('shrink-0 border-t border-border bg-background px-6 py-4', className)}\n {...props}\n />\n));\nAppShellFooter.displayName = 'AppShellFooter';\n\nexport {\n AppShell,\n AppShellSidebar,\n AppShellBody,\n AppShellHeader,\n AppShellMain,\n AppShellFooter,\n};\n"],"names":["AppShell","React","className","props","ref","jsx","cn","AppShellSidebar","AppShellBody","AppShellHeader","AppShellMain","AppShellFooter"],"mappings":";;;AAYA,MAAMA,IAAWC,EAAM,WAGrB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,0CAA0CJ,CAAS;AAAA,IAChE,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAS,cAAc;AAEvB,MAAMO,IAAkBN,EAAM,WAG5B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,iBAAiBJ,CAAS;AAAA,IACvC,GAAGC;AAAA,EAAA;AACN,CACD;AACDI,EAAgB,cAAc;AAE9B,MAAMC,IAAeP,EAAM,WAGzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,gCAAgCJ,CAAS;AAAA,IACtD,GAAGC;AAAA,EAAA;AACN,CACD;AACDK,EAAa,cAAc;AAE3B,MAAMC,IAAiBR,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDM,EAAe,cAAc;AAE7B,MAAMC,IAAeT,EAAM,WAGzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,wBAAwBJ,CAAS;AAAA,IAC9C,GAAGC;AAAA,EAAA;AACN,CACD;AACDO,EAAa,cAAc;AAE3B,MAAMC,IAAiBV,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,aAAU;AAAA,IACV,WAAWE,EAAG,2DAA2DJ,CAAS;AAAA,IACjF,GAAGC;AAAA,EAAA;AACN,CACD;AACDQ,EAAe,cAAc;"}
@@ -1,10 +1,11 @@
1
- import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
- import * as f from "react";
3
- import { cva as R } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
4
- import { AreaChart as V, CartesianGrid as k, XAxis as w, YAxis as z, Area as B } from "recharts";
5
- import { cn as K } from "../../../lib/utils.js";
6
- import { ChartContainer as M, ChartTooltip as S, ChartTooltipContent as X, ChartLegend as Y, ChartLegendContent as _ } from "../chart/chart.js";
7
- const b = R("", {
1
+ import { jsx as r, jsxs as $ } from "react/jsx-runtime";
2
+ import * as T from "react";
3
+ import { cva as pe } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
4
+ import { AreaChart as ue, CartesianGrid as ve, XAxis as Le, YAxis as Ce, Area as Ae, LabelList as be, ReferenceLine as Re, Brush as xe } from "recharts";
5
+ import { cn as Te } from "../../../lib/utils.js";
6
+ import { resolveAnimation as $e, resolveCartesianLabelPosition as ye, CHART_LABEL_MARGIN as De, resolveRotatedTickAnchor as Pe, CHART_LABEL_FONT_SIZE as ke, resolveLabelFillClass as Fe, toLabelFormatter as Ne, resolveChartReferenceValue as Oe, resolveReferenceLineProps as _e, resolveBrushProps as Ge, resolveXAxisTitle as Ie, resolveXAxisHeight as we, resolveYAxisTitle as ze, resolveAxisDomain as Be, toReferenceLineList as He } from "../chart/chart-format.js";
7
+ import { ChartContainer as je, ChartTooltip as Ee, ChartTooltipContent as Ve, ChartLegend as Xe, ChartLegendContent as Me } from "../chart/chart.js";
8
+ const We = pe("", {
8
9
  variants: {
9
10
  layout: {
10
11
  single: "",
@@ -19,131 +20,221 @@ const b = R("", {
19
20
  layout: "single",
20
21
  fill: "gradient"
21
22
  }
22
- }), q = f.forwardRef(
23
+ });
24
+ function Ye({
25
+ dataKeys: s,
26
+ gradientId: n,
27
+ colorFor: i
28
+ }) {
29
+ return /* @__PURE__ */ r("defs", { children: s.map((a) => /* @__PURE__ */ $(
30
+ "linearGradient",
31
+ {
32
+ id: `${n}-${a}`,
33
+ x1: "0",
34
+ y1: "0",
35
+ x2: "0",
36
+ y2: "1",
37
+ children: [
38
+ /* @__PURE__ */ r("stop", { offset: "5%", stopColor: i(a), stopOpacity: 0.8 }),
39
+ /* @__PURE__ */ r("stop", { offset: "95%", stopColor: i(a), stopOpacity: 0.1 })
40
+ ]
41
+ },
42
+ a
43
+ )) });
44
+ }
45
+ const Ke = T.forwardRef(
23
46
  ({
24
- className: p,
25
- config: m,
26
- data: h,
27
- dataKeys: s,
28
- xKey: g,
29
- xAxisLabel: e,
30
- yAxisLabel: r,
31
- yUnit: v,
32
- layout: i = "single",
33
- fill: o = "gradient",
34
- curve: C = "monotone",
35
- strokeWidth: u = 2,
36
- fillOpacity: $ = 0.4,
37
- showDots: l = !1,
38
- connectNulls: A = !1,
39
- showGrid: x = !0,
40
- showTooltip: y = !0,
41
- showLegend: T = !0,
42
- tooltipContent: G,
43
- ...I
44
- }, L) => {
45
- const N = i === "stacked", n = o === "gradient", O = e ? { value: e, position: "insideBottom", offset: 0 } : void 0, j = r ? {
46
- value: r,
47
- angle: -90,
48
- position: "insideLeft",
49
- style: { textAnchor: "middle" }
50
- } : void 0, d = `area-gradient-${f.useId().replace(/:/g, "")}`;
51
- return /* @__PURE__ */ t(
47
+ className: s,
48
+ config: n,
49
+ data: i,
50
+ dataKeys: a,
51
+ xKey: p,
52
+ xAxisLabel: u,
53
+ yAxisLabel: v,
54
+ yUnit: y,
55
+ layout: c = "single",
56
+ fill: d = "gradient",
57
+ curve: D = "monotone",
58
+ strokeWidth: P = 2,
59
+ fillOpacity: k = 0.4,
60
+ showDots: F = !1,
61
+ dotSize: N = 3,
62
+ showActiveDot: O,
63
+ connectNulls: _ = !1,
64
+ areaSettings: t,
65
+ referenceLine: G,
66
+ showGrid: I = !0,
67
+ showTooltip: w = !0,
68
+ showLegend: z = !0,
69
+ showXAxis: B = !0,
70
+ showYAxis: H = !0,
71
+ xTickFormatter: L,
72
+ yTickFormatter: j,
73
+ xAxisAngle: f,
74
+ xAxisInterval: E,
75
+ yAxisTickCount: V,
76
+ yAxisDomain: X,
77
+ gridDashed: M,
78
+ gridHorizontal: W,
79
+ gridVertical: Y,
80
+ tooltipContent: K,
81
+ animate: Z,
82
+ animationDuration: q,
83
+ animationBegin: J,
84
+ animationEasing: Q,
85
+ showLabels: C = !1,
86
+ labelPosition: U,
87
+ labelFormatter: S,
88
+ showBrush: g = !1,
89
+ brushHeight: ee,
90
+ brushAriaLabel: oe,
91
+ ...re
92
+ }, ae) => {
93
+ const te = $e({
94
+ animate: Z,
95
+ animationDuration: q,
96
+ animationBegin: J,
97
+ animationEasing: Q
98
+ }), A = c === "stacked", ie = ye({
99
+ labelPosition: U,
100
+ isStacked: A
101
+ }), h = d === "gradient", le = He(G), m = (o) => {
102
+ var e;
103
+ return ((e = t == null ? void 0 : t[o]) == null ? void 0 : e.color) ?? `var(--color-${o})`;
104
+ }, se = C || Object.values(t ?? {}).some((o) => o.showLabel), ne = Ie(u), ce = ze(v), de = Be(X), fe = we(u, f), b = `area-gradient-${T.useId().replace(/:/g, "")}`;
105
+ return /* @__PURE__ */ r(
52
106
  "div",
53
107
  {
54
- ref: L,
55
- "data-layout": i,
56
- "data-fill": o,
57
- className: K(b({ layout: i, fill: o }), p),
58
- ...I,
59
- children: /* @__PURE__ */ t(
60
- M,
108
+ ref: ae,
109
+ "data-layout": c,
110
+ "data-fill": d,
111
+ className: Te(We({ layout: c, fill: d }), s),
112
+ ...re,
113
+ children: /* @__PURE__ */ r(
114
+ je,
61
115
  {
62
- config: m,
116
+ config: n,
63
117
  className: "size-full [&_.recharts-label]:fill-foreground",
64
- children: /* @__PURE__ */ c(V, { data: h, children: [
65
- n && /* @__PURE__ */ t("defs", { children: s.map((a) => /* @__PURE__ */ c(
66
- "linearGradient",
67
- {
68
- id: `${d}-${a}`,
69
- x1: "0",
70
- y1: "0",
71
- x2: "0",
72
- y2: "1",
73
- children: [
74
- /* @__PURE__ */ t(
75
- "stop",
118
+ children: /* @__PURE__ */ $(
119
+ ue,
120
+ {
121
+ data: i,
122
+ margin: se ? De : void 0,
123
+ children: [
124
+ h && /* @__PURE__ */ r(
125
+ Ye,
126
+ {
127
+ dataKeys: a,
128
+ gradientId: b,
129
+ colorFor: m
130
+ }
131
+ ),
132
+ I && /* @__PURE__ */ r(
133
+ ve,
134
+ {
135
+ horizontal: W ?? !0,
136
+ vertical: Y ?? !1,
137
+ strokeDasharray: M ? "3 3" : void 0
138
+ }
139
+ ),
140
+ /* @__PURE__ */ r(
141
+ Le,
142
+ {
143
+ dataKey: p,
144
+ type: "category",
145
+ hide: !B,
146
+ tickLine: !1,
147
+ axisLine: !1,
148
+ tickMargin: 8,
149
+ tickFormatter: L,
150
+ angle: f,
151
+ interval: E,
152
+ textAnchor: Pe(f),
153
+ height: fe,
154
+ label: ne
155
+ }
156
+ ),
157
+ /* @__PURE__ */ r(
158
+ Ce,
159
+ {
160
+ type: "number",
161
+ hide: !H,
162
+ tickLine: !1,
163
+ axisLine: !1,
164
+ unit: y,
165
+ tickFormatter: j,
166
+ tickCount: V,
167
+ domain: de,
168
+ width: v ? 72 : void 0,
169
+ label: ce
170
+ }
171
+ ),
172
+ w && /* @__PURE__ */ r(Ee, { content: K ?? /* @__PURE__ */ r(Ve, {}) }),
173
+ z && /* @__PURE__ */ r(Xe, { content: /* @__PURE__ */ r(Me, {}) }),
174
+ a.map((o) => {
175
+ const e = t == null ? void 0 : t[o], l = (e == null ? void 0 : e.showDots) ?? F, R = (e == null ? void 0 : e.dotSize) ?? N, he = O ?? l, me = (e == null ? void 0 : e.showLabel) ?? C, x = (e == null ? void 0 : e.labelPosition) ?? ie;
176
+ return /* @__PURE__ */ r(
177
+ Ae,
76
178
  {
77
- offset: "5%",
78
- stopColor: `var(--color-${a})`,
79
- stopOpacity: 0.8
80
- }
81
- ),
82
- /* @__PURE__ */ t(
83
- "stop",
179
+ type: (e == null ? void 0 : e.curveType) ?? D ?? "monotone",
180
+ dataKey: o,
181
+ stackId: A ? "a" : void 0,
182
+ stroke: m(o),
183
+ strokeWidth: (e == null ? void 0 : e.strokeWidth) ?? P,
184
+ strokeDasharray: e != null && e.dashed ? "5 5" : void 0,
185
+ fill: h ? `url(#${b}-${o})` : m(o),
186
+ fillOpacity: (e == null ? void 0 : e.fillOpacity) ?? (h ? 1 : k),
187
+ dot: l ? { r: R } : !1,
188
+ activeDot: he ? { r: R + 2 } : !1,
189
+ connectNulls: _,
190
+ ...te,
191
+ children: me && /* @__PURE__ */ r(
192
+ be,
193
+ {
194
+ dataKey: o,
195
+ position: x,
196
+ formatter: Ne(S),
197
+ className: Fe(x, {
198
+ translucentSeries: !0
199
+ }),
200
+ fontSize: ke
201
+ }
202
+ )
203
+ },
204
+ o
205
+ );
206
+ }),
207
+ le.map((o, e) => {
208
+ const l = Oe(o, i, a);
209
+ return l === void 0 ? null : /* @__PURE__ */ r(
210
+ Re,
84
211
  {
85
- offset: "95%",
86
- stopColor: `var(--color-${a})`,
87
- stopOpacity: 0.1
88
- }
89
- )
90
- ]
91
- },
92
- a
93
- )) }),
94
- x && /* @__PURE__ */ t(k, { vertical: !1 }),
95
- /* @__PURE__ */ t(
96
- w,
97
- {
98
- dataKey: g,
99
- type: "category",
100
- tickLine: !1,
101
- axisLine: !1,
102
- tickMargin: 8,
103
- height: e ? 48 : void 0,
104
- label: O
105
- }
106
- ),
107
- /* @__PURE__ */ t(
108
- z,
109
- {
110
- type: "number",
111
- tickLine: !1,
112
- axisLine: !1,
113
- unit: v,
114
- width: r ? 72 : void 0,
115
- label: j
116
- }
117
- ),
118
- y && /* @__PURE__ */ t(S, { content: G ?? /* @__PURE__ */ t(X, {}) }),
119
- T && /* @__PURE__ */ t(Y, { content: /* @__PURE__ */ t(_, {}) }),
120
- s.map((a) => /* @__PURE__ */ t(
121
- B,
122
- {
123
- type: C ?? "monotone",
124
- dataKey: a,
125
- stackId: N ? "a" : void 0,
126
- stroke: `var(--color-${a})`,
127
- strokeWidth: u,
128
- fill: n ? `url(#${d}-${a})` : `var(--color-${a})`,
129
- fillOpacity: n ? 1 : $,
130
- dot: l ? { r: 3 } : !1,
131
- activeDot: l ? { r: 5 } : !1,
132
- connectNulls: A,
133
- isAnimationActive: !1
134
- },
135
- a
136
- ))
137
- ] })
212
+ y: l,
213
+ ..._e(o.label, o.labelPosition)
214
+ },
215
+ `${o.label ?? "ref"}-${e}`
216
+ );
217
+ }),
218
+ g && /* @__PURE__ */ r(
219
+ xe,
220
+ {
221
+ dataKey: p,
222
+ tickFormatter: L,
223
+ ...Ge({ brushHeight: ee, brushAriaLabel: oe })
224
+ }
225
+ )
226
+ ]
227
+ }
228
+ )
138
229
  }
139
230
  )
140
231
  }
141
232
  );
142
233
  }
143
234
  );
144
- q.displayName = "AreaChart";
235
+ Ke.displayName = "AreaChart";
145
236
  export {
146
- q as AreaChart,
147
- b as areaChartVariants
237
+ Ke as AreaChart,
238
+ We as areaChartVariants
148
239
  };
149
240
  //# sourceMappingURL=area-chart.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"area-chart.js","sources":["../../../../src/components/ui/area-chart/area-chart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n Area,\n AreaChart as RechartsAreaChart,\n CartesianGrid,\n XAxis,\n YAxis,\n} from 'recharts';\n\nimport { cn } from '@/lib/utils';\nimport {\n ChartContainer,\n ChartLegend,\n ChartLegendContent,\n ChartTooltip,\n ChartTooltipContent,\n type ChartConfig,\n} from '../chart';\n\n// A typed recharts composition over the shared `Chart` primitives. The two CVA\n// axes are the design's Area-chart variant set: `layout` (independent\n// overlapping areas vs summed on a shared stack) and `fill` (a flat translucent\n// fill vs a vertical gradient). The classes stay empty because recharts' SVG —\n// not CSS — draws the areas: `layout` drives each `<Area>`'s `stackId` and `fill`\n// drives whether it paints from a `<linearGradient>` def or a flat token color.\n// CVA is kept so the variant set is a first-class, spec-conformant part of the\n// API (matched against ui-spec's api.yaml enums) and exposed via `VariantProps`;\n// the resolved values are also mirrored onto `data-layout` / `data-fill`.\nconst areaChartVariants = cva('', {\n variants: {\n layout: {\n single: '',\n stacked: '',\n },\n fill: {\n solid: '',\n gradient: '',\n },\n },\n defaultVariants: {\n layout: 'single',\n fill: 'gradient',\n },\n});\n\nexport interface AreaChartProps\n extends Omit<React.ComponentProps<'div'>, 'children'>,\n VariantProps<typeof areaChartVariants> {\n /** Row-per-point data. Each object holds the category key + one numeric field per series (`null` breaks the area unless `connectNulls`). */\n data: ReadonlyArray<Record<string, string | number | null>>;\n /**\n * Per-series map of `label` / `color` (imported from the shared `Chart`\n * primitives). Series colors are caller-supplied — reference an existing\n * semantic `--ui-*` token; there is no chart palette tier yet.\n */\n config: ChartConfig;\n /** Series to plot — one `<Area>` per key. Each must exist in `config` and in every data row. */\n dataKeys: string[];\n /** Category axis key (the shared dimension across rows, e.g. `\"month\"`). */\n xKey: string;\n /** Title rendered beneath the horizontal (X) axis. */\n xAxisLabel?: string;\n /** Title rendered beside the vertical (Y) axis (rotated). */\n yAxisLabel?: string;\n /** Unit suffix appended to Y-axis tick values (recharts `unit`; the X axis is categorical). */\n yUnit?: string;\n /** Interpolation between points. */\n curve?: 'linear' | 'monotone' | 'step';\n /** Stroke width of each area's top border. */\n strokeWidth?: number;\n /** Flat-fill opacity — used only when `fill=\"solid\"` (gradient controls its own stops). */\n fillOpacity?: number;\n /** Render a dot at each data point. */\n showDots?: boolean;\n /** Bridge `null` gaps in the data instead of breaking the area. */\n connectNulls?: boolean;\n showGrid?: boolean;\n showTooltip?: boolean;\n showLegend?: boolean;\n /**\n * Replace the default tooltip. Pass a configured `ChartTooltipContent`\n * (imported from this library) — e.g. with a `formatter` / `labelFormatter` /\n * `indicator` — to customize formatting, per-series rows, or extra fields\n * without composing recharts yourself. Ignored when `showTooltip` is false.\n */\n tooltipContent?: React.ComponentProps<typeof ChartTooltip>['content'];\n}\n\nconst AreaChart = React.forwardRef<HTMLDivElement, AreaChartProps>(\n (\n {\n className,\n config,\n data,\n dataKeys,\n xKey,\n xAxisLabel,\n yAxisLabel,\n yUnit,\n layout = 'single',\n fill = 'gradient',\n curve = 'monotone',\n strokeWidth = 2,\n fillOpacity = 0.4,\n showDots = false,\n connectNulls = false,\n showGrid = true,\n showTooltip = true,\n showLegend = true,\n tooltipContent,\n ...props\n },\n ref\n ) => {\n const isStacked = layout === 'stacked';\n const isGradient = fill === 'gradient';\n\n // Axis titles: the X title sits below the ticks; the Y title is rotated in\n // the left gutter. Passed to recharts' native `label` (themed via the\n // `.recharts-label` fill selector on the container).\n const xAxisTitle = xAxisLabel\n ? { value: xAxisLabel, position: 'insideBottom' as const, offset: 0 }\n : undefined;\n const yAxisTitle = yAxisLabel\n ? {\n value: yAxisLabel,\n angle: -90,\n position: 'insideLeft' as const,\n style: { textAnchor: 'middle' as const },\n }\n : undefined;\n\n // recharts renders SVG <defs> once per chart; the gradient ids must be unique\n // across chart instances on the page. useId gives a stable per-instance id;\n // strip the colons React emits (invalid in a url(#…) reference) — same guard\n // the shared ChartContainer applies to its chart id.\n const gradientId = `area-gradient-${React.useId().replace(/:/g, '')}`;\n\n return (\n <div\n ref={ref}\n data-layout={layout}\n data-fill={fill}\n className={cn(areaChartVariants({ layout, fill }), className)}\n {...props}\n >\n <ChartContainer\n config={config}\n className=\"size-full [&_.recharts-label]:fill-foreground\"\n >\n <RechartsAreaChart data={data as readonly unknown[]}>\n {isGradient && (\n <defs>\n {dataKeys.map((key) => (\n <linearGradient\n key={key}\n id={`${gradientId}-${key}`}\n x1=\"0\"\n y1=\"0\"\n x2=\"0\"\n y2=\"1\"\n >\n <stop\n offset=\"5%\"\n stopColor={`var(--color-${key})`}\n stopOpacity={0.8}\n />\n <stop\n offset=\"95%\"\n stopColor={`var(--color-${key})`}\n stopOpacity={0.1}\n />\n </linearGradient>\n ))}\n </defs>\n )}\n {showGrid && <CartesianGrid vertical={false} />}\n <XAxis\n dataKey={xKey}\n type=\"category\"\n tickLine={false}\n axisLine={false}\n tickMargin={8}\n height={xAxisLabel ? 48 : undefined}\n label={xAxisTitle}\n />\n <YAxis\n type=\"number\"\n tickLine={false}\n axisLine={false}\n unit={yUnit}\n width={yAxisLabel ? 72 : undefined}\n label={yAxisTitle}\n />\n {showTooltip && (\n <ChartTooltip content={tooltipContent ?? <ChartTooltipContent />} />\n )}\n {showLegend && <ChartLegend content={<ChartLegendContent />} />}\n {dataKeys.map((key) => (\n <Area\n key={key}\n type={curve ?? 'monotone'}\n dataKey={key}\n stackId={isStacked ? 'a' : undefined}\n stroke={`var(--color-${key})`}\n strokeWidth={strokeWidth}\n fill={isGradient ? `url(#${gradientId}-${key})` : `var(--color-${key})`}\n fillOpacity={isGradient ? 1 : fillOpacity}\n dot={showDots ? { r: 3 } : false}\n activeDot={showDots ? { r: 5 } : false}\n connectNulls={connectNulls}\n isAnimationActive={false}\n />\n ))}\n </RechartsAreaChart>\n </ChartContainer>\n </div>\n );\n }\n);\nAreaChart.displayName = 'AreaChart';\n\nexport { AreaChart, areaChartVariants };\n"],"names":["areaChartVariants","cva","AreaChart","React","className","config","data","dataKeys","xKey","xAxisLabel","yAxisLabel","yUnit","layout","fill","curve","strokeWidth","fillOpacity","showDots","connectNulls","showGrid","showTooltip","showLegend","tooltipContent","props","ref","isStacked","isGradient","xAxisTitle","yAxisTitle","gradientId","jsx","cn","ChartContainer","jsxs","RechartsAreaChart","key","CartesianGrid","XAxis","YAxis","ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","Area"],"mappings":";;;;;;AA+BA,MAAMA,IAAoBC,EAAI,IAAI;AAAA,EAChC,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,QAAQ;AAAA,MACR,SAAS;AAAA,IAAA;AAAA,IAEX,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,UAAU;AAAA,IAAA;AAAA,EACZ;AAAA,EAEF,iBAAiB;AAAA,IACf,QAAQ;AAAA,IACR,MAAM;AAAA,EAAA;AAEV,CAAC,GA6CKC,IAAYC,EAAM;AAAA,EACtB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,MAAAC,IAAO;AAAA,IACP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,kBACpE,aAAaT,IAAa,IAAIV;AAAA,kBAC9B,KAAKC,IAAW,EAAE,GAAG,MAAM;AAAA,kBAC3B,WAAWA,IAAW,EAAE,GAAG,MAAM;AAAA,kBACjC,cAAAC;AAAA,kBACA,mBAAmB;AAAA,gBAAA;AAAA,gBAXdiB;AAAA,cAAA,CAaR;AAAA,YAAA,EAAA,CACH;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAGN;AACF;AACAjC,EAAU,cAAc;"}
1
+ {"version":3,"file":"area-chart.js","sources":["../../../../src/components/ui/area-chart/area-chart.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport {\n Area,\n AreaChart as RechartsAreaChart,\n Brush,\n CartesianGrid,\n LabelList,\n ReferenceLine,\n XAxis,\n YAxis,\n} from 'recharts';\n\nimport { cn } from '@/lib/utils';\nimport {\n CHART_LABEL_FONT_SIZE,\n CHART_LABEL_MARGIN,\n ChartContainer,\n ChartLegend,\n ChartLegendContent,\n ChartTooltip,\n ChartTooltipContent,\n resolveAnimation,\n resolveAxisDomain,\n resolveBrushProps,\n resolveCartesianLabelPosition,\n resolveChartReferenceValue,\n resolveLabelFillClass,\n resolveReferenceLineProps,\n resolveRotatedTickAnchor,\n resolveXAxisHeight,\n resolveXAxisTitle,\n resolveYAxisTitle,\n toLabelFormatter,\n toReferenceLineList,\n type ChartConfig,\n type CartesianChartProps,\n type ChartAnimationProps,\n type ChartBrushProps,\n type ChartCurveType,\n type ChartDataLabelProps,\n type ChartReferenceLine,\n type CartesianLabelPosition,\n} from '../chart';\n\n// A typed recharts composition over the shared `Chart` primitives. The two CVA\n// axes are the design's Area-chart variant set: `layout` (independent\n// overlapping areas vs summed on a shared stack) and `fill` (a flat translucent\n// fill vs a vertical gradient). The classes stay empty because recharts' SVG —\n// not CSS — draws the areas: `layout` drives each `<Area>`'s `stackId` and `fill`\n// drives whether it paints from a `<linearGradient>` def or a flat token color.\n// CVA is kept so the variant set is a first-class, spec-conformant part of the\n// API (matched against ui-spec's api.yaml enums) and exposed via `VariantProps`;\n// the resolved values are also mirrored onto `data-layout` / `data-fill`.\nconst areaChartVariants = cva('', {\n variants: {\n layout: {\n single: '',\n stacked: '',\n },\n fill: {\n solid: '',\n gradient: '',\n },\n },\n defaultVariants: {\n layout: 'single',\n fill: 'gradient',\n },\n});\n\n/**\n * Style override for one series, keyed by its `dataKeys` entry. Anything left\n * unset falls back to the chart-wide prop, so an entry only states what differs\n * — e.g. a projection band that reads fainter than the actuals beside it.\n */\nexport interface AreaChartAreaSettings {\n /** Stroke and fill color. Defaults to the series' `config` color. */\n color?: string;\n /** Width of this series' top border. Defaults to the chart's `strokeWidth`. */\n strokeWidth?: number;\n /** Dash this series' top border. */\n dashed?: boolean;\n /** Interpolation for this series only. Defaults to the chart's `curve`. */\n curveType?: ChartCurveType;\n /**\n * Fill opacity for this series. Under `fill=\"gradient\"` it scales the\n * gradient's own alpha rather than replacing it.\n */\n fillOpacity?: number;\n /** Render this series' per-point dots. Defaults to the chart's `showDots`. */\n showDots?: boolean;\n /** Dot radius for this series, in px. Defaults to the chart's `dotSize`. */\n dotSize?: number;\n /** Show/hide this series' value labels, overriding the chart's `showLabels`. */\n showLabel?: boolean;\n /** Position of this series' value labels. Defaults to the chart's `labelPosition`. */\n labelPosition?: CartesianLabelPosition;\n}\n\nexport interface AreaChartProps\n extends Omit<React.ComponentProps<'div'>, 'children'>,\n VariantProps<typeof areaChartVariants>,\n CartesianChartProps,\n ChartAnimationProps,\n ChartBrushProps,\n ChartDataLabelProps {\n /** Row-per-point data. Each object holds the category key + one numeric field per series (`null` breaks the area unless `connectNulls`). */\n data: ReadonlyArray<Record<string, string | number | null>>;\n /**\n * Per-series map of `label` / `color` (imported from the shared `Chart`\n * primitives). Series colors are caller-supplied — reference an existing\n * semantic `--ui-*` token; there is no chart palette tier yet.\n */\n config: ChartConfig;\n /** Series to plot — one `<Area>` per key. Each must exist in `config` and in every data row. */\n dataKeys: string[];\n /** Category axis key (the shared dimension across rows, e.g. `\"month\"`). */\n xKey: string;\n /** Interpolation between points. */\n curve?: ChartCurveType;\n /** Stroke width of each area's top border. */\n strokeWidth?: number;\n /** Flat-fill opacity — used only when `fill=\"solid\"` (gradient controls its own stops). */\n fillOpacity?: number;\n /** Render a dot at each data point. */\n showDots?: boolean;\n /** Radius of each point's dot, in px. Its hover dot is 2px larger. */\n dotSize?: number;\n /**\n * Enlarge the hovered point's dot. Defaults to following `showDots`, so pass\n * it explicitly to get hover dots on a dot-less area (`showDots={false}` with\n * `showActiveDot`) or a static-only area (dots without the hover one).\n */\n showActiveDot?: boolean;\n /** Bridge `null` gaps in the data instead of breaking the area. */\n connectNulls?: boolean;\n /**\n * Per-series style overrides, keyed by `dataKeys` entry. Series with no entry\n * render from the chart-wide props.\n */\n areaSettings?: Record<string, AreaChartAreaSettings>;\n /**\n * One or more dashed reference/average lines on the value axis — a target, a\n * threshold, or a series mean. Pass a single object or an array to draw\n * several at once. On a stacked chart the value is read against the stack's\n * axis, not one series.\n */\n referenceLine?: ChartReferenceLine | ChartReferenceLine[];\n showLegend?: boolean;\n /** Position of the value labels when `showLabels` is on. Defaults to `top`. */\n labelPosition?: CartesianLabelPosition;\n}\n\n/**\n * One top-to-bottom fade per series, referenced by each `<Area>`'s `fill`.\n *\n * The ids are scoped by `gradientId` because SVG `<defs>` ids are\n * document-global: two AreaCharts on the same page would otherwise share (and\n * silently overwrite) each other's stops.\n */\nfunction AreaFillGradients({\n dataKeys,\n gradientId,\n colorFor,\n}: {\n dataKeys: string[];\n gradientId: string;\n colorFor: (key: string) => string;\n}) {\n return (\n <defs>\n {dataKeys.map((key) => (\n <linearGradient\n key={key}\n id={`${gradientId}-${key}`}\n x1=\"0\"\n y1=\"0\"\n x2=\"0\"\n y2=\"1\"\n >\n <stop offset=\"5%\" stopColor={colorFor(key)} stopOpacity={0.8} />\n <stop offset=\"95%\" stopColor={colorFor(key)} stopOpacity={0.1} />\n </linearGradient>\n ))}\n </defs>\n );\n}\n\nconst AreaChart = React.forwardRef<HTMLDivElement, AreaChartProps>(\n (\n {\n className,\n config,\n data,\n dataKeys,\n xKey,\n xAxisLabel,\n yAxisLabel,\n yUnit,\n layout = 'single',\n fill = 'gradient',\n curve = 'monotone',\n strokeWidth = 2,\n fillOpacity = 0.4,\n showDots = false,\n dotSize = 3,\n showActiveDot,\n connectNulls = false,\n areaSettings,\n referenceLine,\n showGrid = true,\n showTooltip = true,\n showLegend = true,\n showXAxis = true,\n showYAxis = true,\n xTickFormatter,\n yTickFormatter,\n xAxisAngle,\n xAxisInterval,\n yAxisTickCount,\n yAxisDomain,\n gridDashed,\n gridHorizontal,\n gridVertical,\n tooltipContent,\n animate,\n animationDuration,\n animationBegin,\n animationEasing,\n showLabels = false,\n labelPosition,\n labelFormatter,\n showBrush = false,\n brushHeight,\n brushAriaLabel,\n ...props\n },\n ref\n ) => {\n const animation = resolveAnimation({\n animate,\n animationDuration,\n animationBegin,\n animationEasing,\n });\n const isStacked = layout === 'stacked';\n const areaLabelPosition = resolveCartesianLabelPosition({\n labelPosition,\n isStacked,\n });\n const isGradient = fill === 'gradient';\n const referenceLines = toReferenceLineList(referenceLine);\n\n // A series' `color` override has to reach its gradient stops too, or a\n // gradient-filled chart would keep painting the `config` color.\n const colorFor = (key: string) =>\n areaSettings?.[key]?.color ?? `var(--color-${key})`;\n\n // The plot inset is needed as soon as *any* series carries outside labels —\n // a per-series `showLabel` counts, not only the chart-wide `showLabels`.\n const hasLabels =\n showLabels ||\n Object.values(areaSettings ?? {}).some((settings) => settings.showLabel);\n\n // Axis titles: the X title sits below the ticks; the Y title is rotated in\n // the left gutter. Passed to recharts' native `label` (themed via the\n // `.recharts-label` fill selector on the container).\n const xAxisTitle = resolveXAxisTitle(xAxisLabel);\n const yAxisTitle = resolveYAxisTitle(yAxisLabel);\n\n const yDomain = resolveAxisDomain(yAxisDomain);\n\n const xAxisHeight = resolveXAxisHeight(xAxisLabel, xAxisAngle);\n\n // recharts renders SVG <defs> once per chart; the gradient ids must be unique\n // across chart instances on the page. useId gives a stable per-instance id;\n // strip the colons React emits (invalid in a url(#…) reference) — same guard\n // the shared ChartContainer applies to its chart id.\n const gradientId = `area-gradient-${React.useId().replace(/:/g, '')}`;\n\n return (\n <div\n ref={ref}\n data-layout={layout}\n data-fill={fill}\n className={cn(areaChartVariants({ layout, fill }), className)}\n {...props}\n >\n <ChartContainer\n config={config}\n className=\"size-full [&_.recharts-label]:fill-foreground\"\n >\n <RechartsAreaChart\n data={data as readonly unknown[]}\n margin={hasLabels ? CHART_LABEL_MARGIN : undefined}\n >\n {isGradient && (\n <AreaFillGradients\n dataKeys={dataKeys}\n gradientId={gradientId}\n colorFor={colorFor}\n />\n )}\n {showGrid && (\n <CartesianGrid\n horizontal={gridHorizontal ?? true}\n vertical={gridVertical ?? false}\n strokeDasharray={gridDashed ? '3 3' : undefined}\n />\n )}\n <XAxis\n dataKey={xKey}\n type=\"category\"\n hide={!showXAxis}\n tickLine={false}\n axisLine={false}\n tickMargin={8}\n tickFormatter={xTickFormatter}\n angle={xAxisAngle}\n interval={xAxisInterval}\n textAnchor={resolveRotatedTickAnchor(xAxisAngle)}\n height={xAxisHeight}\n label={xAxisTitle}\n />\n <YAxis\n type=\"number\"\n hide={!showYAxis}\n tickLine={false}\n axisLine={false}\n unit={yUnit}\n tickFormatter={yTickFormatter}\n tickCount={yAxisTickCount}\n domain={yDomain}\n width={yAxisLabel ? 72 : undefined}\n label={yAxisTitle}\n />\n {showTooltip && (\n <ChartTooltip content={tooltipContent ?? <ChartTooltipContent />} />\n )}\n {showLegend && <ChartLegend content={<ChartLegendContent />} />}\n {dataKeys.map((key) => {\n const settings = areaSettings?.[key];\n const seriesDots = settings?.showDots ?? showDots;\n const dotRadius = settings?.dotSize ?? dotSize;\n // The hover dot follows the static dots unless asked otherwise, so\n // a chart that sets neither renders exactly as before.\n const activeDot = showActiveDot ?? seriesDots;\n const seriesLabel = settings?.showLabel ?? showLabels;\n const seriesLabelPosition =\n settings?.labelPosition ?? areaLabelPosition;\n return (\n <Area\n key={key}\n type={settings?.curveType ?? curve ?? 'monotone'}\n dataKey={key}\n stackId={isStacked ? 'a' : undefined}\n stroke={colorFor(key)}\n strokeWidth={settings?.strokeWidth ?? strokeWidth}\n strokeDasharray={settings?.dashed ? '5 5' : undefined}\n fill={\n isGradient ? `url(#${gradientId}-${key})` : colorFor(key)\n }\n fillOpacity={\n settings?.fillOpacity ?? (isGradient ? 1 : fillOpacity)\n }\n dot={seriesDots ? { r: dotRadius } : false}\n activeDot={activeDot ? { r: dotRadius + 2 } : false}\n connectNulls={connectNulls}\n {...animation}\n >\n {seriesLabel && (\n <LabelList\n dataKey={key}\n position={seriesLabelPosition}\n formatter={toLabelFormatter(labelFormatter)}\n className={resolveLabelFillClass(seriesLabelPosition, {\n translucentSeries: true,\n })}\n fontSize={CHART_LABEL_FONT_SIZE}\n />\n )}\n </Area>\n );\n })}\n {/* Annotations draw over the series they describe. */}\n {referenceLines.map((ref, index) => {\n const value = resolveChartReferenceValue(ref, data, dataKeys);\n if (value === undefined) return null;\n return (\n <ReferenceLine\n key={`${ref.label ?? 'ref'}-${index}`}\n y={value}\n {...resolveReferenceLineProps(ref.label, ref.labelPosition)}\n />\n );\n })}\n {showBrush && (\n <Brush\n dataKey={xKey}\n tickFormatter={xTickFormatter}\n {...resolveBrushProps({ brushHeight, brushAriaLabel })}\n />\n )}\n </RechartsAreaChart>\n </ChartContainer>\n </div>\n );\n }\n);\nAreaChart.displayName = 'AreaChart';\n\nexport { AreaChart, areaChartVariants };\n"],"names":["areaChartVariants","cva","AreaFillGradients","dataKeys","gradientId","colorFor","jsx","key","jsxs","AreaChart","React","className","config","data","xKey","xAxisLabel","yAxisLabel","yUnit","layout","fill","curve","strokeWidth","fillOpacity","showDots","dotSize","showActiveDot","connectNulls","areaSettings","referenceLine","showGrid","showTooltip","showLegend","showXAxis","showYAxis","xTickFormatter","yTickFormatter","xAxisAngle","xAxisInterval","yAxisTickCount","yAxisDomain","gridDashed","gridHorizontal","gridVertical","tooltipContent","animate","animationDuration","animationBegin","animationEasing","showLabels","labelPosition","labelFormatter","showBrush","brushHeight","brushAriaLabel","props","ref","animation","resolveAnimation","isStacked","areaLabelPosition","resolveCartesianLabelPosition","isGradient","referenceLines","toReferenceLineList","_a","hasLabels","settings","xAxisTitle","resolveXAxisTitle","yAxisTitle","resolveYAxisTitle","yDomain","resolveAxisDomain","xAxisHeight","resolveXAxisHeight","cn","ChartContainer","RechartsAreaChart","CHART_LABEL_MARGIN","CartesianGrid","XAxis","resolveRotatedTickAnchor","YAxis","ChartTooltip","ChartTooltipContent","ChartLegend","ChartLegendContent","seriesDots","dotRadius","activeDot","seriesLabel","seriesLabelPosition","Area","LabelList","toLabelFormatter","resolveLabelFillClass","CHART_LABEL_FONT_SIZE","index","value","resolveChartReferenceValue","ReferenceLine","resolveReferenceLineProps","Brush","resolveBrushProps"],"mappings":";;;;;;;AAwDA,MAAMA,KAAoBC,GAAI,IAAI;AAAA,EAChC,UAAU;AAAA,IACR,QAAQ;AAAA,MACN,QAAQ;AAAA,MACR,SAAS;AAAA,IAAA;AAAA,IAEX,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,UAAU;AAAA,IAAA;AAAA,EACZ;AAAA,EAEF,iBAAiB;AAAA,IACf,QAAQ;AAAA,IACR,MAAM;AAAA,EAAA;AAEV,CAAC;AA4FD,SAASC,GAAkB;AAAA,EACzB,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AACF,GAIG;AACD,SACE,gBAAAC,EAAC,QAAA,EACE,UAAAH,EAAS,IAAI,CAACI,MACb,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MAEC,IAAI,GAAGJ,CAAU,IAAIG,CAAG;AAAA,MACxB,IAAG;AAAA,MACH,IAAG;AAAA,MACH,IAAG;AAAA,MACH,IAAG;AAAA,MAEH,UAAA;AAAA,QAAA,gBAAAD,EAAC,QAAA,E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,EAAI,SAAS,KAAK,IAAI0C,CAAK;AAAA,oBAAA;AAAA,kBAKzC,CAAC;AAAA,kBACA9C,KACC,gBAAA7C;AAAA,oBAACgG;AAAA,oBAAA;AAAA,sBACC,SAASxF;AAAA,sBACT,eAAeoB;AAAA,sBACd,GAAGqE,GAAkB,EAAE,aAAAnD,IAAa,gBAAAC,IAAgB;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACvD;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAGN;AACF;AACA5C,GAAU,cAAc;"}
@@ -1,9 +1,9 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as t } from "react/jsx-runtime";
2
2
  import * as o from "react";
3
3
  import { Avatar as v } from "@base-ui/react/avatar";
4
- import { cva as s } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
4
+ import { cva as c } from "../../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
5
5
  import { cn as l } from "../../../lib/utils.js";
6
- const c = s(
6
+ const s = c(
7
7
  "relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden size-[var(--ui-avatar-global-avatar-size)] rounded-[var(--ui-avatar-global-avatar-border-border-radius)] [box-shadow:0_0_0_var(--ui-avatar-global-avatar-border-border-width)_var(--ui-avatar-global-avatar-border-color)] text-xs font-semibold leading-4",
8
8
  {
9
9
  variants: {
@@ -12,45 +12,48 @@ const c = s(
12
12
  violet: "bg-[var(--ui-avatar-color-violet)] text-[var(--ui-avatar-label-color-violet)]",
13
13
  red: "bg-[var(--ui-avatar-color-red)] text-[var(--ui-avatar-label-color-red)]",
14
14
  yellow: "bg-[var(--ui-avatar-color-yellow)] text-[var(--ui-avatar-label-color-yellow)]",
15
- orange: "bg-[var(--ui-avatar-color-orange)] text-[var(--ui-avatar-label-color-orange)]"
15
+ orange: "bg-[var(--ui-avatar-color-orange)] text-[var(--ui-avatar-label-color-orange)]",
16
+ blue: "bg-[var(--ui-avatar-color-blue)] text-[var(--ui-avatar-label-color-blue)]",
17
+ gray: "bg-[var(--ui-avatar-color-gray)] text-[var(--ui-avatar-label-color-gray)]",
18
+ green: "bg-[var(--ui-avatar-color-green)] text-[var(--ui-avatar-label-color-green)]"
16
19
  }
17
20
  },
18
21
  defaultVariants: {
19
22
  color: "teal"
20
23
  }
21
24
  }
22
- ), d = o.forwardRef(({ className: a, color: r, ...t }, i) => /* @__PURE__ */ e(
25
+ ), b = o.forwardRef(({ className: a, color: r, ...e }, i) => /* @__PURE__ */ t(
23
26
  v.Root,
24
27
  {
25
28
  ref: i,
26
- className: l(c({ color: r }), a),
27
- ...t
29
+ className: l(s({ color: r }), a),
30
+ ...e
28
31
  }
29
32
  ));
30
- d.displayName = "Avatar";
31
- const n = o.forwardRef(({ className: a, ...r }, t) => /* @__PURE__ */ e(
33
+ b.displayName = "Avatar";
34
+ const u = o.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
32
35
  v.Image,
33
36
  {
34
- ref: t,
37
+ ref: e,
35
38
  className: l("size-full object-cover", a),
36
39
  ...r
37
40
  }
38
41
  ));
39
- n.displayName = "AvatarImage";
40
- const b = o.forwardRef(({ className: a, ...r }, t) => /* @__PURE__ */ e(
42
+ u.displayName = "AvatarImage";
43
+ const n = o.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ t(
41
44
  v.Fallback,
42
45
  {
43
- ref: t,
46
+ ref: e,
44
47
  className: l("flex size-full items-center justify-center", a),
45
48
  ...r
46
49
  }
47
50
  ));
48
- b.displayName = "AvatarFallback";
49
- const m = o.forwardRef(
50
- ({ className: a, ...r }, t) => /* @__PURE__ */ e(
51
+ n.displayName = "AvatarFallback";
52
+ const d = o.forwardRef(
53
+ ({ className: a, ...r }, e) => /* @__PURE__ */ t(
51
54
  "div",
52
55
  {
53
- ref: t,
56
+ ref: e,
54
57
  className: l(
55
58
  "flex items-center [&>*:not(:first-child)]:ms-[var(--ui-avatar-global-avatar-group-gap)]",
56
59
  a
@@ -59,12 +62,12 @@ const m = o.forwardRef(
59
62
  }
60
63
  )
61
64
  );
62
- m.displayName = "AvatarGroup";
65
+ d.displayName = "AvatarGroup";
63
66
  export {
64
- d as Avatar,
65
- b as AvatarFallback,
66
- m as AvatarGroup,
67
- n as AvatarImage,
68
- c as avatarVariants
67
+ b as Avatar,
68
+ n as AvatarFallback,
69
+ d as AvatarGroup,
70
+ u as AvatarImage,
71
+ s as avatarVariants
69
72
  };
70
73
  //# sourceMappingURL=avatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.js","sources":["../../../../src/components/ui/avatar/avatar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\n// Wraps Base UI's Avatar primitive (Root / Image / Fallback), themed by the\n// dedicated next-gen `--ui-avatar-*` token tier from @acronis-platform/tokens-pd.\n// A 32px circle (`--ui-avatar-global-avatar-size` / `-border-border-radius`) with a 2px\n// ring (`-border-border-width` / `-border-color`) — the ring is what visually\n// separates avatars when they overlap in an `AvatarGroup`. When no image is set\n// (or it fails to load) the `AvatarFallback` shows initials.\n//\n// The ring is a `box-shadow`, not a CSS `border`: Figma draws the 2px stroke\n// with `strokeAlign: OUTSIDE`, so the 32px is the *colored circle* and the ring\n// sits outside it. A CSS border would be drawn inside the border-box, shrinking\n// the visible circle to 28px (PLTFRM-92393). A box-shadow ring paints outside\n// without inflating the 32px layout box, so the `AvatarGroup` overlap step\n// (32px − 6px gap) still matches the design.\n//\n// It is written as a raw `[box-shadow:…]` arbitrary property, not Tailwind's\n// `shadow-[…]` utility: the utility routes the value through `--tw-shadow-color`\n// (`0 0 0 var(--tw-shadow-color, <spread>) <color>`), which resolves\n// inconsistently for a spread-only ring across engine versions. The raw property\n// emits the literal declaration so every renderer draws the same 2px outset ring.\n//\n// `color` selects one of the five Figma color schemes; it tints the fallback\n// background (`--ui-avatar-color-<scheme>`) and the initials\n// (`--ui-avatar-label-color-<scheme>`). Initials use the 12px/16px/600 caption\n// style baked into the design (`text-xs font-semibold leading-4`).\nconst avatarVariants = cva(\n 'relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden ' +\n 'size-[var(--ui-avatar-global-avatar-size)] rounded-[var(--ui-avatar-global-avatar-border-border-radius)] ' +\n '[box-shadow:0_0_0_var(--ui-avatar-global-avatar-border-border-width)_var(--ui-avatar-global-avatar-border-color)] ' +\n 'text-xs font-semibold leading-4',\n {\n variants: {\n color: {\n teal: 'bg-[var(--ui-avatar-color-teal)] text-[var(--ui-avatar-label-color-teal)]',\n violet:\n 'bg-[var(--ui-avatar-color-violet)] text-[var(--ui-avatar-label-color-violet)]',\n red: 'bg-[var(--ui-avatar-color-red)] text-[var(--ui-avatar-label-color-red)]',\n yellow:\n 'bg-[var(--ui-avatar-color-yellow)] text-[var(--ui-avatar-label-color-yellow)]',\n orange:\n 'bg-[var(--ui-avatar-color-orange)] text-[var(--ui-avatar-label-color-orange)]',\n },\n },\n defaultVariants: {\n color: 'teal',\n },\n }\n);\n\nexport interface AvatarProps\n extends\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,\n VariantProps<typeof avatarVariants> {}\n\n/**\n * A user/entity avatar: a colored circle showing an image or initials. Compose\n * `AvatarImage` and/or `AvatarFallback` inside; stack several in `AvatarGroup`.\n */\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n AvatarProps\n>(({ className, color, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn(avatarVariants({ color }), className)}\n {...props}\n />\n));\nAvatar.displayName = 'Avatar';\n\nexport type AvatarImageProps = React.ComponentPropsWithoutRef<\n typeof AvatarPrimitive.Image\n>;\n\n/** The avatar image; hidden by Base UI until it loads, revealing the fallback. */\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n AvatarImageProps\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn('size-full object-cover', className)}\n {...props}\n />\n));\nAvatarImage.displayName = 'AvatarImage';\n\nexport type AvatarFallbackProps = React.ComponentPropsWithoutRef<\n typeof AvatarPrimitive.Fallback\n>;\n\n/** Shown when there's no image (or it fails) — typically the user's initials. */\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n AvatarFallbackProps\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn('flex size-full items-center justify-center', className)}\n {...props}\n />\n));\nAvatarFallback.displayName = 'AvatarFallback';\n\nexport type AvatarGroupProps = React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * Overlapping stack of avatars. Each avatar after the first is pulled left by\n * `--ui-avatar-global-avatar-group-gap` (a negative offset), so their 2px\n * borders form the layered look; later avatars render above earlier ones.\n */\nconst AvatarGroup = React.forwardRef<HTMLDivElement, AvatarGroupProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex items-center [&>*:not(:first-child)]:ms-[var(--ui-avatar-global-avatar-group-gap)]',\n className\n )}\n {...props}\n />\n )\n);\nAvatarGroup.displayName = 'AvatarGroup';\n\nexport { Avatar, AvatarImage, AvatarFallback, AvatarGroup, avatarVariants };\n"],"names":["avatarVariants","cva","Avatar","React","className","color","props","ref","jsx","AvatarPrimitive","cn","AvatarImage","AvatarFallback","AvatarGroup"],"mappings":";;;;;AA8BA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EAIA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,MAAM;AAAA,QACN,QACE;AAAA,QACF,KAAK;AAAA,QACL,QACE;AAAA,QACF,QACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,EACT;AAEJ,GAWMC,IAASC,EAAM,WAGnB,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,GAAGC,KAASC,MACjC,gBAAAC;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG,EAAGV,EAAe,EAAE,OAAAK,EAAA,CAAO,GAAGD,CAAS;AAAA,IACjD,GAAGE;AAAA,EAAA;AACN,CACD;AACDJ,EAAO,cAAc;AAOrB,MAAMS,IAAcR,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG,EAAG,0BAA0BN,CAAS;AAAA,IAChD,GAAGE;AAAA,EAAA;AACN,CACD;AACDK,EAAY,cAAc;AAO1B,MAAMC,IAAiBT,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG,EAAG,8CAA8CN,CAAS;AAAA,IACpE,GAAGE;AAAA,EAAA;AACN,CACD;AACDM,EAAe,cAAc;AAS7B,MAAMC,IAAcV,EAAM;AAAA,EACxB,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MACxB,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAD;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AACAO,EAAY,cAAc;"}
1
+ {"version":3,"file":"avatar.js","sources":["../../../../src/components/ui/avatar/avatar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Avatar as AvatarPrimitive } from '@base-ui/react/avatar';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/lib/utils';\n\n// Wraps Base UI's Avatar primitive (Root / Image / Fallback), themed by the\n// dedicated next-gen `--ui-avatar-*` token tier from @acronis-platform/tokens-pd.\n// A 32px circle (`--ui-avatar-global-avatar-size` / `-border-border-radius`) with a 2px\n// ring (`-border-border-width` / `-border-color`) — the ring is what visually\n// separates avatars when they overlap in an `AvatarGroup`. When no image is set\n// (or it fails to load) the `AvatarFallback` shows initials.\n//\n// The ring is a `box-shadow`, not a CSS `border`: Figma draws the 2px stroke\n// with `strokeAlign: OUTSIDE`, so the 32px is the *colored circle* and the ring\n// sits outside it. A CSS border would be drawn inside the border-box, shrinking\n// the visible circle to 28px (PLTFRM-92393). A box-shadow ring paints outside\n// without inflating the 32px layout box, so the `AvatarGroup` overlap step\n// (32px − 6px gap) still matches the design.\n//\n// It is written as a raw `[box-shadow:…]` arbitrary property, not Tailwind's\n// `shadow-[…]` utility: the utility routes the value through `--tw-shadow-color`\n// (`0 0 0 var(--tw-shadow-color, <spread>) <color>`), which resolves\n// inconsistently for a spread-only ring across engine versions. The raw property\n// emits the literal declaration so every renderer draws the same 2px outset ring.\n//\n// `color` selects one of the eight Figma color schemes; it tints the fallback\n// background (`--ui-avatar-color-<scheme>`) and the initials\n// (`--ui-avatar-label-color-<scheme>`). Initials use the 12px/16px/600 caption\n// style baked into the design (`text-xs font-semibold leading-4`).\nconst avatarVariants = cva(\n 'relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden ' +\n 'size-[var(--ui-avatar-global-avatar-size)] rounded-[var(--ui-avatar-global-avatar-border-border-radius)] ' +\n '[box-shadow:0_0_0_var(--ui-avatar-global-avatar-border-border-width)_var(--ui-avatar-global-avatar-border-color)] ' +\n 'text-xs font-semibold leading-4',\n {\n variants: {\n color: {\n teal: 'bg-[var(--ui-avatar-color-teal)] text-[var(--ui-avatar-label-color-teal)]',\n violet:\n 'bg-[var(--ui-avatar-color-violet)] text-[var(--ui-avatar-label-color-violet)]',\n red: 'bg-[var(--ui-avatar-color-red)] text-[var(--ui-avatar-label-color-red)]',\n yellow:\n 'bg-[var(--ui-avatar-color-yellow)] text-[var(--ui-avatar-label-color-yellow)]',\n orange:\n 'bg-[var(--ui-avatar-color-orange)] text-[var(--ui-avatar-label-color-orange)]',\n blue: 'bg-[var(--ui-avatar-color-blue)] text-[var(--ui-avatar-label-color-blue)]',\n gray: 'bg-[var(--ui-avatar-color-gray)] text-[var(--ui-avatar-label-color-gray)]',\n green:\n 'bg-[var(--ui-avatar-color-green)] text-[var(--ui-avatar-label-color-green)]',\n },\n },\n defaultVariants: {\n color: 'teal',\n },\n }\n);\n\nexport interface AvatarProps\n extends\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>,\n VariantProps<typeof avatarVariants> {}\n\n/**\n * A user/entity avatar: a colored circle showing an image or initials. Compose\n * `AvatarImage` and/or `AvatarFallback` inside; stack several in `AvatarGroup`.\n */\nconst Avatar = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Root>,\n AvatarProps\n>(({ className, color, ...props }, ref) => (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn(avatarVariants({ color }), className)}\n {...props}\n />\n));\nAvatar.displayName = 'Avatar';\n\nexport type AvatarImageProps = React.ComponentPropsWithoutRef<\n typeof AvatarPrimitive.Image\n>;\n\n/** The avatar image; hidden by Base UI until it loads, revealing the fallback. */\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n AvatarImageProps\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn('size-full object-cover', className)}\n {...props}\n />\n));\nAvatarImage.displayName = 'AvatarImage';\n\nexport type AvatarFallbackProps = React.ComponentPropsWithoutRef<\n typeof AvatarPrimitive.Fallback\n>;\n\n/** Shown when there's no image (or it fails) — typically the user's initials. */\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n AvatarFallbackProps\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn('flex size-full items-center justify-center', className)}\n {...props}\n />\n));\nAvatarFallback.displayName = 'AvatarFallback';\n\nexport type AvatarGroupProps = React.HTMLAttributes<HTMLDivElement>;\n\n/**\n * Overlapping stack of avatars. Each avatar after the first is pulled left by\n * `--ui-avatar-global-avatar-group-gap` (a negative offset), so their 2px\n * borders form the layered look; later avatars render above earlier ones.\n */\nconst AvatarGroup = React.forwardRef<HTMLDivElement, AvatarGroupProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex items-center [&>*:not(:first-child)]:ms-[var(--ui-avatar-global-avatar-group-gap)]',\n className\n )}\n {...props}\n />\n )\n);\nAvatarGroup.displayName = 'AvatarGroup';\n\nexport { Avatar, AvatarImage, AvatarFallback, AvatarGroup, avatarVariants };\n"],"names":["avatarVariants","cva","Avatar","React","className","color","props","ref","jsx","AvatarPrimitive","cn","AvatarImage","AvatarFallback","AvatarGroup"],"mappings":";;;;;AA8BA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EAIA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,MAAM;AAAA,QACN,QACE;AAAA,QACF,KAAK;AAAA,QACL,QACE;AAAA,QACF,QACE;AAAA,QACF,MAAM;AAAA,QACN,MAAM;AAAA,QACN,OACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,EACT;AAEJ,GAWMC,IAASC,EAAM,WAGnB,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,GAAGC,KAASC,MACjC,gBAAAC;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG,EAAGV,EAAe,EAAE,OAAAK,EAAA,CAAO,GAAGD,CAAS;AAAA,IACjD,GAAGE;AAAA,EAAA;AACN,CACD;AACDJ,EAAO,cAAc;AAOrB,MAAMS,IAAcR,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAACC,EAAgB;AA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