@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
@@ -1,37 +1,96 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from 'react';
3
+ type TimelineVariant = 'default' | 'tree';
3
4
  declare const timelineVariants: (props?: ({
4
- size?: "small" | "medium" | null | undefined;
5
- density?: "compact" | "default" | null | undefined;
5
+ variant?: "tree" | "default" | null | undefined;
6
6
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
7
  export interface TimelineProps extends React.ComponentProps<'ol'>, VariantProps<typeof timelineVariants> {
8
8
  /**
9
- * `Timeline.Item`s — pass them as direct children (the connector auto-hides on
10
- * the last one). Grouping/headings aren't supported as intervening children.
9
+ * Whether the list collapses. `default` never does; `tree` gives every row that
10
+ * has descendants a disclosure button ahead of its marker, which hides those
11
+ * descendants, and widens the indent step to reserve it on every row.
12
+ *
13
+ * Unrelated to `Timeline.Item`'s `collapsibleBody`, which folds a single card's
14
+ * own body and works the same under both variants.
15
+ */
16
+ variant?: TimelineVariant;
17
+ /**
18
+ * `Timeline.Item`s — pass them as direct children in visual order (never
19
+ * wrapped in a fragment, or their levels can't be read). Connectors are derived
20
+ * from the levels, so no row ever leaves a dangling line.
11
21
  */
12
22
  children?: React.ReactNode;
13
23
  }
14
- export type TimelineStatus = 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'critical';
24
+ export type TimelineLevel = 1 | 2 | 3;
25
+ /** The marker Avatar's color scheme (Figma ships the Timeline marker as Blue). */
26
+ export type TimelineMarkerColor = 'blue' | 'gray' | 'green' | 'teal' | 'violet' | 'red' | 'yellow' | 'orange';
15
27
  export interface TimelineItemProps extends Omit<React.ComponentProps<'li'>, 'title'> {
28
+ /** Event title (the primary line in the card header). */
29
+ title: React.ReactNode;
16
30
  /** Event time — pass a `<time dateTime>` for an accessible, machine-readable stamp. */
17
31
  timestamp?: React.ReactNode;
18
- /** Event title (the primary line). */
19
- title: React.ReactNode;
20
- /** Optional secondary description. */
32
+ /** Slot beside the title, before the timestamp — e.g. a `Tag`. */
33
+ tag?: React.ReactNode;
34
+ /** Optional secondary description under the title. */
21
35
  description?: React.ReactNode;
22
- /** Semantic status — tints the marker (a subtle cue, never large blocks of text). */
23
- status?: TimelineStatus;
24
- /** Icon shown in a status-tinted marker badge instead of the plain dot. */
36
+ /** Icon rendered inside the marker Avatar. Takes precedence over `initials`. */
25
37
  icon?: React.ReactNode;
26
- /** Metadata slot under the description — e.g. `Tag`s. */
27
- metadata?: React.ReactNode;
28
- /** Actions slot — e.g. a `Link` or `ButtonMenu`. */
29
- actions?: React.ReactNode;
30
- /** Emphasize this item as the current one (a ringed marker). */
31
- current?: boolean;
32
- /** Dim a non-applicable / inactive item. */
33
- disabled?: boolean;
34
- /** Expandable detail composed by the caller — e.g. an `Accordion`. */
38
+ /** Initials rendered inside the marker Avatar when no `icon` is given. */
39
+ initials?: string;
40
+ /** Marker Avatar color scheme. */
41
+ color?: TimelineMarkerColor;
42
+ /** Nesting depth (Figma `Nesting` L1-L3). Drives the indent only. */
43
+ level?: TimelineLevel;
44
+ /**
45
+ * Force the elbow joining this row to its parent's connector on or off (Figma's
46
+ * `Nesting` `-First`). Leave it unset — `Timeline` derives it from the levels,
47
+ * drawing it whenever this row is deeper than the one above it. Ignored at
48
+ * `level={1}`, which has no parent.
49
+ */
50
+ branchStart?: boolean;
51
+ /**
52
+ * Force the connector descending to the next row on or off (Figma
53
+ * `Connecting line`). Leave it unset — `Timeline` derives it from the levels,
54
+ * drawing it only when the next visible row is at this row's depth or deeper.
55
+ */
56
+ connector?: boolean;
57
+ /**
58
+ * Branch disclosure state (controlled). Only meaningful under `variant="tree"`
59
+ * on a row that has descendants — those rows get the control automatically.
60
+ */
61
+ expanded?: boolean;
62
+ /** Initial branch disclosure state when uncontrolled. */
63
+ defaultExpanded?: boolean;
64
+ /** Called with the requested disclosure state whenever the control is activated. */
65
+ onExpandedChange?: (expanded: boolean) => void;
66
+ /**
67
+ * Accessible name for the branch disclosure control — the one that drops this
68
+ * row's descendant rows. Distinct from `bodyToggleLabel` by default, because a
69
+ * tree row can carry both controls at once.
70
+ */
71
+ toggleLabel?: string;
72
+ /**
73
+ * Give this row's card a chevron at the trailing edge of its header that shows
74
+ * and hides the body (Figma's `Action Button`).
75
+ *
76
+ * Orthogonal to `variant`: it is the *card's* disclosure, not the timeline's, so
77
+ * it works the same in `default` and `tree` and a tree row can have both — the
78
+ * branch control drops the rows below, this one folds this card's own body.
79
+ * (It lives here only until `Card` grows the behaviour itself.)
80
+ */
81
+ collapsibleBody?: boolean;
82
+ /** Card-body disclosure state (controlled). */
83
+ bodyExpanded?: boolean;
84
+ /** Initial card-body disclosure state when uncontrolled. */
85
+ defaultBodyExpanded?: boolean;
86
+ /** Called with the requested card-body disclosure state. */
87
+ onBodyExpandedChange?: (expanded: boolean) => void;
88
+ /**
89
+ * Accessible name for the card-body disclosure control — the one that folds this
90
+ * row's own body. Distinct from `toggleLabel` by default.
91
+ */
92
+ bodyToggleLabel?: string;
93
+ /** Card body, rendered below a divider. */
35
94
  children?: React.ReactNode;
36
95
  }
37
96
  declare const TimelineItem: React.ForwardRefExoticComponent<Omit<TimelineItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
@@ -1 +1 @@
1
- export { Treemap, type TreemapProps } from './treemap';
1
+ export { Treemap, type TreemapProps, type TreemapLabelAlign } from './treemap';
@@ -1,16 +1,48 @@
1
- import { ChartTooltip, ChartConfig } from '../chart';
1
+ import { ChartTooltip, ChartConfig, ChartAnimationProps, TickFormatter } from '../chart';
2
2
  import * as React from 'react';
3
+ /**
4
+ * Where a cell's label block sits inside its rectangle. Named logically, not
5
+ * physically: the corner variants anchor to the tile's *start* edge, so they
6
+ * mirror under `dir="rtl"`. `bottom-start` is the design's placement; `center`
7
+ * is what the chart drew before the block had a second line.
8
+ */
9
+ export type TreemapLabelAlign = 'bottom-start' | 'top-start' | 'center';
10
+ /**
11
+ * Compose a cell's second line out of the caller's `secondaryKeys`. Empty and
12
+ * missing fields are skipped rather than printed as a gap, so one row without
13
+ * the field doesn't leave a dangling separator.
14
+ */
15
+ export declare function treemapSecondaryLabel(options: {
16
+ row: Record<string, string | number>;
17
+ keys: readonly string[];
18
+ separator: string;
19
+ formatter?: TickFormatter;
20
+ }): string | undefined;
3
21
  interface TreemapCellProps {
4
22
  x?: number;
5
23
  y?: number;
6
24
  width?: number;
7
25
  height?: number;
8
26
  name?: string;
27
+ /** The leaf's display name — its `config` label, stamped onto the row by `Treemap`. */
28
+ primaryLabel?: string;
29
+ /** The label's precomputed second line, stamped onto each row by `Treemap`. */
30
+ secondaryLabel?: string;
9
31
  showLabels?: boolean;
32
+ labelAlign?: TreemapLabelAlign;
10
33
  }
11
- export declare function TreemapCell({ x, y, width, height, name, showLabels, }: TreemapCellProps): import("react/jsx-runtime").JSX.Element;
12
- export interface TreemapProps extends Omit<React.ComponentProps<'div'>, 'children'> {
13
- /** Row-per-leaf data. Each object holds the leaf's `nameKey` label + its `dataKey` numeric size. */
34
+ export declare function TreemapCell({ x, y, width, height, name, primaryLabel, secondaryLabel, showLabels, labelAlign, }: TreemapCellProps): import("react/jsx-runtime").JSX.Element;
35
+ export interface TreemapProps extends Omit<React.ComponentProps<'div'>, 'children'>, ChartAnimationProps {
36
+ /**
37
+ * Row-per-leaf data. Each object holds the leaf's `nameKey` label + its
38
+ * `dataKey` numeric size.
39
+ *
40
+ * `fill`, `primaryLabel` and `secondaryLabel` are reserved: the chart stamps
41
+ * them onto a copy of each row to carry the cell color and the two label lines
42
+ * through to the renderer (recharts hands the whole row to `content`, so
43
+ * anything the cell needs has to be on it). A row of your own carrying one of
44
+ * those names may end up driving what the tile paints.
45
+ */
14
46
  data: ReadonlyArray<Record<string, string | number>>;
15
47
  /**
16
48
  * Per-leaf map of `label` / `color`, keyed by the leaf's `nameKey` value
@@ -22,16 +54,44 @@ export interface TreemapProps extends Omit<React.ComponentProps<'div'>, 'childre
22
54
  /** Numeric field that sizes each leaf's rectangle. */
23
55
  dataKey: string;
24
56
  /**
25
- * Label field that names each leaf (drives the on-cell label, tooltip, and
26
- * `--color-<name>` lookup). Values should be unique and CSS-safe (they become
27
- * part of a custom-property name).
57
+ * Label field that names each leaf (drives the on-cell label, legend, tooltip,
58
+ * and `--color-<name>` lookup). Values should be unique and CSS-safe (they
59
+ * become part of a custom-property name).
28
60
  */
29
61
  nameKey: string;
30
62
  /** Width-to-height ratio the tiling targets. */
31
63
  aspectRatio?: number;
32
- /** Render each leaf's name inside its cell (when it fits). */
64
+ /** Render each leaf's label inside its cell (when it fits). */
33
65
  showLabels?: boolean;
66
+ /**
67
+ * Where a cell's label sits. Defaults to `bottom-start` — the design's
68
+ * placement, which keeps the label anchored to a tile corner as the tiling
69
+ * reflows. `top-start` anchors it to the opposite corner; `center` centers the
70
+ * block in the tile. The corner variants are named for the tile's *start* edge
71
+ * because they mirror under `dir="rtl"`.
72
+ */
73
+ labelAlign?: TreemapLabelAlign;
74
+ /**
75
+ * Fields whose values make up a second label line under the leaf's name — e.g.
76
+ * `[dataKey]` for the size, or `['size', 'count']` for a value and a count. The
77
+ * line is dropped on cells too short to hold it.
78
+ */
79
+ secondaryKeys?: readonly string[];
80
+ /**
81
+ * Format each secondary value. Receives the field's index in `secondaryKeys`
82
+ * as its second argument, so one formatter can cover fields of different kinds.
83
+ */
84
+ secondaryFormatter?: TickFormatter;
85
+ /** Separator drawn between multiple secondary values. */
86
+ secondarySeparator?: string;
34
87
  showTooltip?: boolean;
88
+ /**
89
+ * Render the legend — one entry per leaf. Off by default: a treemap labels its
90
+ * cells, so the legend is for the case where the tiles are too small to.
91
+ */
92
+ showLegend?: boolean;
93
+ /** Which edge the legend sits on. */
94
+ legendPos?: 'top' | 'bottom';
35
95
  /**
36
96
  * Replace the default tooltip. Pass a configured `ChartTooltipContent`
37
97
  * (imported from this library) — e.g. with a `formatter` / `labelFormatter` —
@@ -1,5 +1,6 @@
1
1
  export { cn } from './lib/utils';
2
2
  export * from './hooks';
3
+ export * from './lib/breakpoints';
3
4
  export { PortalContainerProvider, usePortalContainer, type PortalContainerProviderProps, } from './lib/portal-container';
4
5
  export * from './components/ui/accordion';
5
6
  export * from './components/ui/alert';
@@ -15,6 +16,7 @@ export * from './components/ui/button-menu';
15
16
  export * from './components/ui/calendar';
16
17
  export * from './components/ui/card';
17
18
  export * from './components/ui/card-filter';
19
+ export * from './components/ui/category-bar';
18
20
  export * from './components/ui/chart';
19
21
  export * from './components/ui/chart-state';
20
22
  export * from './components/ui/checkbox';
@@ -27,7 +29,9 @@ export * from './components/ui/data-table';
27
29
  export * from './components/ui/date-range-picker';
28
30
  export * from './components/ui/description-list';
29
31
  export { Dialog, DialogClose, type DialogProps, type DialogVariant, } from './components/ui/dialog';
32
+ export * from './components/ui/dialog-footer-carousel';
30
33
  export * from './components/ui/dialog-footer-default';
34
+ export * from './components/ui/dialog-welcome';
31
35
  export * from './components/ui/dropdown-menu';
32
36
  export * from './components/ui/empty';
33
37
  export * from './components/ui/field';
@@ -60,9 +64,9 @@ export * from './components/ui/pie-chart';
60
64
  export * from './components/ui/popover';
61
65
  export * from './components/ui/progress';
62
66
  export * from './components/ui/progress-circle';
67
+ export * from './components/ui/sankey-chart';
63
68
  export * from './components/ui/scatter-chart';
64
69
  export * from './components/ui/scroll-area';
65
- export * from './components/ui/search-global';
66
70
  export { InputText as Input, type InputTextProps as InputProps, } from './components/ui/input-text';
67
71
  export { InputSearch as Search, type InputSearchProps as SearchProps, } from './components/ui/input-search';
68
72
  export { InputTextArea as Textarea, type InputTextAreaProps as TextareaProps, } from './components/ui/input-text-area';