@acronis-platform/ui-react 4.1.0 → 5.1.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.
- package/dist/components/ui/area-chart/area-chart.js +191 -85
- package/dist/components/ui/area-chart/area-chart.js.map +1 -1
- package/dist/components/ui/bar-chart/bar-chart.js +288 -225
- package/dist/components/ui/bar-chart/bar-chart.js.map +1 -1
- package/dist/components/ui/card-widget-carousel/card-widget-carousel.js +85 -0
- package/dist/components/ui/card-widget-carousel/card-widget-carousel.js.map +1 -0
- package/dist/components/ui/card-widget-carousel/card-widget.js +82 -0
- package/dist/components/ui/card-widget-carousel/card-widget.js.map +1 -0
- package/dist/components/ui/category-bar/category-bar.js.map +1 -1
- package/dist/components/ui/chart/chart-format.js +25 -22
- package/dist/components/ui/chart/chart-format.js.map +1 -1
- package/dist/components/ui/chart/chart-palette.js +9 -8
- package/dist/components/ui/chart/chart-palette.js.map +1 -1
- package/dist/components/ui/chart/chart.js +127 -89
- package/dist/components/ui/chart/chart.js.map +1 -1
- package/dist/components/ui/funnel-chart/funnel-chart.js +189 -113
- package/dist/components/ui/funnel-chart/funnel-chart.js.map +1 -1
- package/dist/components/ui/input-select/input-select.js +18 -9
- package/dist/components/ui/input-select/input-select.js.map +1 -1
- package/dist/components/ui/line-chart/line-chart.js +194 -86
- package/dist/components/ui/line-chart/line-chart.js.map +1 -1
- package/dist/components/ui/radar-chart/radar-chart.js +76 -66
- package/dist/components/ui/radar-chart/radar-chart.js.map +1 -1
- package/dist/components/ui/scatter-chart/scatter-chart.js +5 -2
- package/dist/components/ui/scatter-chart/scatter-chart.js.map +1 -1
- package/dist/components/ui/separator/separator.js +52 -10
- package/dist/components/ui/separator/separator.js.map +1 -1
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js +144 -121
- package/dist/components/ui/sidebar-secondary/sidebar-secondary.js.map +1 -1
- package/dist/components/ui/tree-item/tree-item.js +67 -0
- package/dist/components/ui/tree-item/tree-item.js.map +1 -0
- package/dist/components/ui/treemap/treemap.js +73 -66
- package/dist/components/ui/treemap/treemap.js.map +1 -1
- package/dist/index.js +109 -107
- package/dist/llms/area-chart.md +2 -1
- package/dist/llms/bar-chart.md +132 -33
- package/dist/llms/card-widget-carousel.md +252 -0
- package/dist/llms/category-bar.md +2 -2
- package/dist/llms/funnel-chart.md +269 -101
- package/dist/llms/input-select.md +175 -1
- package/dist/llms/line-chart.md +2 -1
- package/dist/llms/metric.md +10 -5
- package/dist/llms/radar-chart.md +15 -5
- package/dist/llms/scatter-chart.md +2 -1
- package/dist/llms/separator.md +27 -8
- package/dist/llms/sidebar-secondary.md +235 -4
- package/dist/llms/tree-item.md +359 -0
- package/dist/llms/treemap.md +47 -36
- package/dist/llms.txt +5 -4
- package/dist/react.js +109 -107
- package/dist/src/components/ui/area-chart/area-chart.d.ts +10 -0
- package/dist/src/components/ui/bar-chart/bar-chart.d.ts +75 -10
- package/dist/src/components/ui/bar-chart/bar-chart.docs.d.ts +146 -0
- package/dist/src/components/ui/bar-chart/index.d.ts +1 -1
- package/dist/src/components/ui/card-widget-carousel/card-widget-carousel.d.ts +9 -0
- package/dist/src/components/ui/card-widget-carousel/card-widget.d.ts +43 -0
- package/dist/src/components/ui/card-widget-carousel/index.d.ts +2 -0
- package/dist/src/components/ui/chart/chart-format.d.ts +9 -1
- package/dist/src/components/ui/chart/chart-palette.d.ts +38 -10
- package/dist/src/components/ui/chart/chart.d.ts +8 -1
- package/dist/src/components/ui/chart/index.d.ts +2 -2
- package/dist/src/components/ui/funnel-chart/funnel-chart.d.ts +92 -26
- package/dist/src/components/ui/funnel-chart/index.d.ts +1 -1
- package/dist/src/components/ui/input-select/input-select.d.ts +34 -2
- package/dist/src/components/ui/line-chart/line-chart.d.ts +11 -1
- package/dist/src/components/ui/radar-chart/radar-chart.d.ts +42 -9
- package/dist/src/components/ui/separator/separator.d.ts +9 -1
- package/dist/src/components/ui/sidebar-secondary/sidebar-secondary.d.ts +23 -3
- package/dist/src/components/ui/tree-item/index.d.ts +1 -0
- package/dist/src/components/ui/tree-item/tree-item.d.ts +64 -0
- package/dist/src/components/ui/treemap/treemap.d.ts +16 -5
- package/dist/src/index.d.ts +2 -1
- package/dist/ui-react.css +1 -1
- package/package.json +1 -1
- package/dist/components/ui/meter/meter.js +0 -79
- package/dist/components/ui/meter/meter.js.map +0 -1
- package/dist/llms/meter.md +0 -177
- package/dist/src/components/ui/meter/index.d.ts +0 -1
- package/dist/src/components/ui/meter/meter.d.ts +0 -25
|
@@ -30,11 +30,43 @@ declare const InputSelectContent: React.ForwardRefExoticComponent<Omit<Omit<impo
|
|
|
30
30
|
align?: SelectPrimitive.Positioner.Props["align"];
|
|
31
31
|
side?: SelectPrimitive.Positioner.Props["side"];
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
33
|
+
* Offset in px along the alignment axis (perpendicular to `side`). Defaults
|
|
34
|
+
* to Base UI's own `0` when omitted — pass a value to nudge the dropdown
|
|
35
|
+
* along the trigger's edge without changing its `align`.
|
|
36
|
+
*/
|
|
37
|
+
alignOffset?: SelectPrimitive.Positioner.Props["alignOffset"];
|
|
38
|
+
/**
|
|
39
|
+
* Collision-avoidance strategy. Defaults to Base UI's own flip/shift
|
|
40
|
+
* behavior, which may move the dropdown off the requested `side`/`align`
|
|
41
|
+
* when it doesn't fit. Pass `{ side: 'none', fallbackAxisSide: 'none' }`
|
|
42
|
+
* alongside an explicit `side`/`align` to lock the popup to that placement
|
|
43
|
+
* with no auto-flip fallback (e.g. "always to the right, no matter what":
|
|
44
|
+
* `side="right" sideOffset={20} collisionAvoidance={{ side: 'none',
|
|
45
|
+
* fallbackAxisSide: 'none' }}`).
|
|
46
|
+
*/
|
|
47
|
+
collisionAvoidance?: SelectPrimitive.Positioner.Props["collisionAvoidance"];
|
|
48
|
+
/**
|
|
49
|
+
* Element (or ref/getter) the popup positions itself against, overriding
|
|
50
|
+
* the default of anchoring to `InputSelectTrigger`. Use when the visible
|
|
51
|
+
* trigger isn't the element Base UI tracks internally — e.g. an external
|
|
52
|
+
* button drives a hidden trigger, and the popup should align with the
|
|
53
|
+
* button instead of the hidden trigger's layout position.
|
|
54
|
+
*/
|
|
55
|
+
anchor?: SelectPrimitive.Positioner.Props["anchor"];
|
|
56
|
+
/**
|
|
57
|
+
* Container to portal the dropdown into. Defaults to the nearest
|
|
58
|
+
* `PortalContainerProvider`, or `document.body` when there is none; pass an
|
|
59
|
+
* element to scope the portal explicitly (e.g. a shadow root, so the popup
|
|
35
60
|
* inherits styles defined there).
|
|
36
61
|
*/
|
|
37
62
|
portalContainer?: SelectPrimitive.Portal.Props["container"];
|
|
63
|
+
/**
|
|
64
|
+
* Render the dropdown chrome like `PopoverContent` (`--ui-popover-container-*`
|
|
65
|
+
* tokens, no shadow, fade/zoom/slide enter-exit animation) instead of the
|
|
66
|
+
* default `--ui-input-select-dropdown-container-*` tokens + static `shadow-md`.
|
|
67
|
+
* See `components/ui/popover/popover.tsx`.
|
|
68
|
+
*/
|
|
69
|
+
isPopoverStyled?: boolean;
|
|
38
70
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
39
71
|
/**
|
|
40
72
|
* In-dropdown search row (magnifier + input). By default it drives the
|
|
@@ -26,7 +26,7 @@ type TooltipRenderProps = Parameters<TooltipContentFn>[0];
|
|
|
26
26
|
* function-form tooltip keeps its state across re-renders here too. The returned
|
|
27
27
|
* component is a stable content type (memoize it on `tooltipContent`).
|
|
28
28
|
*/
|
|
29
|
-
export declare function createBandStrippedTooltip(tooltipContent: TooltipContentType): (props: TooltipRenderProps) =>
|
|
29
|
+
export declare function createBandStrippedTooltip(tooltipContent: TooltipContentType): (props: TooltipRenderProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
/**
|
|
31
31
|
* Style override for one series, keyed by its `dataKeys` entry. Anything left
|
|
32
32
|
* unset falls back to the chart-wide prop, so an entry only states what differs
|
|
@@ -113,6 +113,16 @@ export interface LineChartProps extends Omit<React.ComponentProps<'div'>, 'child
|
|
|
113
113
|
* several at once.
|
|
114
114
|
*/
|
|
115
115
|
referenceLine?: ChartReferenceLine | ChartReferenceLine[];
|
|
116
|
+
/**
|
|
117
|
+
* The category value (matching an `xKey` entry) at which the projection
|
|
118
|
+
* zone starts. Ticks from this point onward render in the disabled text
|
|
119
|
+
* color (`--ui-text-on-surface-disabled`). The chart data and series
|
|
120
|
+
* themselves are not affected — only the X-axis tick appearance changes.
|
|
121
|
+
*
|
|
122
|
+
* Use this when displaying a forecast/projection range where future
|
|
123
|
+
* data points should be visually de-emphasized on the axis.
|
|
124
|
+
*/
|
|
125
|
+
projectionStart?: string | number;
|
|
116
126
|
showLegend?: boolean;
|
|
117
127
|
/** Position of the value labels when `showLabels` is on. Defaults to `top`. */
|
|
118
128
|
labelPosition?: CartesianLabelPosition;
|
|
@@ -113,9 +113,9 @@ export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'chil
|
|
|
113
113
|
fillOpacity?: number;
|
|
114
114
|
/** Stroke width of each radar outline. */
|
|
115
115
|
strokeWidth?: number;
|
|
116
|
-
/** Render a dot at each axis point. */
|
|
116
|
+
/** Render a dot at each axis point. Defaults to `true`. */
|
|
117
117
|
showDots?: boolean;
|
|
118
|
-
/** Radius of the per-point dots when `showDots` is on. */
|
|
118
|
+
/** Radius of the per-point dots when `showDots` is on. Defaults to `2`. */
|
|
119
119
|
dotRadius?: number;
|
|
120
120
|
/**
|
|
121
121
|
* Enlarge the hovered point's dot. On by default (recharts' behavior) — pass
|
|
@@ -148,9 +148,9 @@ export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'chil
|
|
|
148
148
|
/** Draw a tick line from the axis line to each spoke label. Defaults to `true`. */
|
|
149
149
|
angleTickLine?: boolean;
|
|
150
150
|
/**
|
|
151
|
-
* Distance from
|
|
152
|
-
*
|
|
153
|
-
*
|
|
151
|
+
* Distance from each polygon vertex to its outer category label, in px.
|
|
152
|
+
* Defaults to `4` (Figma geometry). When `showLabels` is on and no explicit
|
|
153
|
+
* value is given, widens automatically to clear the value labels.
|
|
154
154
|
*/
|
|
155
155
|
angleTickSize?: number;
|
|
156
156
|
/**
|
|
@@ -211,7 +211,11 @@ export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'chil
|
|
|
211
211
|
radiusAxisReversed?: boolean;
|
|
212
212
|
/** Horizontal centre of the web, in px or a percentage of the width. Defaults to `50%`. */
|
|
213
213
|
cx?: number | string;
|
|
214
|
-
/**
|
|
214
|
+
/**
|
|
215
|
+
* Vertical centre of the web, in px or a percentage of the height. Defaults to
|
|
216
|
+
* the middle of the plot band — i.e. `50%` of what the legend leaves, not of
|
|
217
|
+
* the whole box (see `radarPlotBox`).
|
|
218
|
+
*/
|
|
215
219
|
cy?: number | string;
|
|
216
220
|
/** Angle the first category sits at, in degrees. Defaults to `90` (12 o'clock). */
|
|
217
221
|
startAngle?: number;
|
|
@@ -227,7 +231,12 @@ export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'chil
|
|
|
227
231
|
* which separates the series where they all bottom out.
|
|
228
232
|
*/
|
|
229
233
|
innerRadius?: number | string;
|
|
230
|
-
/**
|
|
234
|
+
/**
|
|
235
|
+
* Outer radius of the web, in px or a percentage of the available radius.
|
|
236
|
+
* Defaults to `78px`, matching the Figma radar geometry. The legend and labels
|
|
237
|
+
* do not change the radius — they change the box it is drawn in (see
|
|
238
|
+
* `radarPlotBox`).
|
|
239
|
+
*/
|
|
231
240
|
outerRadius?: number | string;
|
|
232
241
|
/**
|
|
233
242
|
* Plot-area margin, in px. Omit it entirely to use recharts' default (5 on
|
|
@@ -242,8 +251,6 @@ export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'chil
|
|
|
242
251
|
};
|
|
243
252
|
showTooltip?: boolean;
|
|
244
253
|
showLegend?: boolean;
|
|
245
|
-
/** Which side of the chart the legend sits on. Defaults to `bottom`. */
|
|
246
|
-
legendPosition?: 'top' | 'bottom';
|
|
247
254
|
/**
|
|
248
255
|
* Replace the default tooltip. Pass a configured `ChartTooltipContent`
|
|
249
256
|
* (imported from this library) — e.g. with a `formatter` / `labelFormatter` —
|
|
@@ -254,5 +261,31 @@ export interface RadarChartProps extends Omit<React.ComponentProps<'div'>, 'chil
|
|
|
254
261
|
/** Position of the value labels when `showLabels` is on. Defaults to `top`. */
|
|
255
262
|
labelPosition?: CartesianLabelPosition;
|
|
256
263
|
}
|
|
264
|
+
/** The chart's own box: the height it reserves, and the polar centre inside it. */
|
|
265
|
+
export interface RadarPlotBox {
|
|
266
|
+
/**
|
|
267
|
+
* Tailwind height for the outer element. Merged *before* the consumer's
|
|
268
|
+
* `className`, so a caller-supplied height still wins.
|
|
269
|
+
*/
|
|
270
|
+
heightClass: string;
|
|
271
|
+
/** `cy` for recharts, or `undefined` to keep its own `height / 2` default. */
|
|
272
|
+
cy: string | undefined;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Size the chart's box around its category ring, and centre the web in the part
|
|
276
|
+
* of that box the legend does not take. Exported for unit tests; not part of the
|
|
277
|
+
* package's public API.
|
|
278
|
+
*
|
|
279
|
+
* `ringRadius` is how far the category labels reach from the centre —
|
|
280
|
+
* `outerRadius + angleTickSize + RADAR_TICK_TEXT_HALF_LINE` — or `undefined`
|
|
281
|
+
* when `outerRadius` is a percentage, which recharts already fits to the plot
|
|
282
|
+
* area (legend included) on its own.
|
|
283
|
+
*
|
|
284
|
+
* `cy` comes back as a percentage rather than the px it resolves to at the
|
|
285
|
+
* default height, so a caller-supplied height keeps the proportion instead of
|
|
286
|
+
* pinning the web to an absolute offset. On a taller box that lifts the web a
|
|
287
|
+
* little further than the legend alone needs — towards the side with the slack.
|
|
288
|
+
*/
|
|
289
|
+
export declare function radarPlotBox(ringRadius: number | undefined, showLegend: boolean): RadarPlotBox;
|
|
257
290
|
declare const RadarChart: React.ForwardRefExoticComponent<Omit<RadarChartProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
258
291
|
export { RadarChart, radarChartVariants };
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
1
3
|
import * as React from 'react';
|
|
2
|
-
declare const
|
|
4
|
+
declare const separatorVariants: (props?: ({
|
|
5
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
6
|
+
size?: "S1" | "S2" | "S3" | null | undefined;
|
|
7
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
+
interface SeparatorProps extends React.ComponentPropsWithoutRef<typeof SeparatorPrimitive>, Pick<VariantProps<typeof separatorVariants>, 'size'> {
|
|
9
|
+
}
|
|
10
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
3
11
|
export { Separator };
|
|
@@ -8,6 +8,14 @@ export interface SidebarSecondaryProps extends React.ComponentPropsWithoutRef<'n
|
|
|
8
8
|
defaultExpanded?: boolean;
|
|
9
9
|
/** Fires when the expanded state changes (e.g. a consumer toggle). */
|
|
10
10
|
onExpandedChange?: (expanded: boolean) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Allow the user to collapse/expand the panel (resize-edge click, drag past
|
|
13
|
+
* the collapse threshold, keyboard, and the footer collapse trigger).
|
|
14
|
+
* When `false` those interactions never change `expanded` and the footer
|
|
15
|
+
* trigger renders `disabled`; dragging still resizes the panel, clamped to
|
|
16
|
+
* the minimum width. Defaults to `true`.
|
|
17
|
+
*/
|
|
18
|
+
collapsible?: boolean;
|
|
11
19
|
/**
|
|
12
20
|
* Enable the draggable resize edge on the right border.
|
|
13
21
|
* When `true`, the sidebar can be resized between the expanded-width token
|
|
@@ -20,9 +28,17 @@ export interface SidebarSecondaryProps extends React.ComponentPropsWithoutRef<'n
|
|
|
20
28
|
onWidthChange?: (width: number) => void;
|
|
21
29
|
/** Accessible label for the resize edge (`role="separator"`). Defaults to `'Resize sidebar'`. */
|
|
22
30
|
resizeAriaLabel?: string;
|
|
23
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Tooltip content shown when the sidebar is expanded. Pass `null` to hide
|
|
33
|
+
* the tooltip entirely. The default omits the "Collapse: Click" line when
|
|
34
|
+
* `collapsible` is `false`, since that gesture does nothing then.
|
|
35
|
+
*/
|
|
24
36
|
resizeTooltipExpanded?: React.ReactNode;
|
|
25
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Tooltip content shown when the sidebar is collapsed. Pass `null` to hide
|
|
39
|
+
* the tooltip entirely. When `collapsible` is `false` the default narrows to
|
|
40
|
+
* "Reset size: Double click" — the one gesture that still has an effect.
|
|
41
|
+
*/
|
|
26
42
|
resizeTooltipCollapsed?: React.ReactNode;
|
|
27
43
|
/**
|
|
28
44
|
* Replace the rendered `<nav>` with another element or component
|
|
@@ -105,7 +121,11 @@ declare const SidebarSecondaryMenuItemExtras: React.ForwardRefExoticComponent<Si
|
|
|
105
121
|
export interface SidebarSecondaryCollapseTriggerProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'children'> {
|
|
106
122
|
/** Leading 16px icon (e.g. a panel-left glyph). Rotates 180° between expanded/collapsed — same as `SidebarPrimaryCollapseTrigger`. */
|
|
107
123
|
icon?: React.ReactNode;
|
|
108
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Tooltip text shown when the sidebar is collapsed. Defaults to `'Expand'`.
|
|
126
|
+
* Not shown when the panel is `collapsible={false}` — the trigger is
|
|
127
|
+
* disabled then, so the copy would advertise an action that can't run.
|
|
128
|
+
*/
|
|
109
129
|
expandTooltip?: React.ReactNode;
|
|
110
130
|
/** Trailing extras (e.g. a keyboard shortcut hint), same slot as `SidebarSecondaryMenuItem`. */
|
|
111
131
|
extras?: React.ReactNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TreeItem, type TreeItemProps } from './tree-item';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
import { Checkbox } from '../checkbox';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export interface TreeItemProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
5
|
+
/**
|
|
6
|
+
* The row's label. Rendered as the row's own text, so it is a prop with the
|
|
7
|
+
* literal only as its default (never inlined) — pass a localized string.
|
|
8
|
+
*
|
|
9
|
+
* Note this shadows the native `title` tooltip attribute on the underlying
|
|
10
|
+
* `<div>`: the Figma component names this property `title`, and it is the
|
|
11
|
+
* row's visible label, not a tooltip.
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Show the leading icon slot. */
|
|
15
|
+
hasIcon?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The leading icon. Only rendered when `hasIcon` is true; falls back to the
|
|
18
|
+
* design's `SquareDashedIcon` placeholder, which is what the Figma node shows.
|
|
19
|
+
*/
|
|
20
|
+
icon?: React.ReactNode;
|
|
21
|
+
/** Show a leading `Checkbox`. */
|
|
22
|
+
hasCheckbox?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Props forwarded verbatim to the leading `Checkbox` — this row holds no
|
|
25
|
+
* checked state of its own, so control it from here (`checked` /
|
|
26
|
+
* `onCheckedChange`) exactly as you would a standalone `Checkbox`. Defaults
|
|
27
|
+
* its `aria-label` to `title`, since the box renders without a visible label.
|
|
28
|
+
*/
|
|
29
|
+
checkboxProps?: React.ComponentPropsWithoutRef<typeof Checkbox>;
|
|
30
|
+
/**
|
|
31
|
+
* Show the leading expand chevron. Purely a visual affordance: this row does
|
|
32
|
+
* not implement expand/collapse and renders no nested list — the consumer owns
|
|
33
|
+
* that state and composes the child rows.
|
|
34
|
+
*/
|
|
35
|
+
isExpandable?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the row's nested list is currently expanded. Purely visual — like
|
|
38
|
+
* `isExpandable`, this row owns no expand/collapse state and renders no
|
|
39
|
+
* nested list. Rotates the leading chevron to reflect the state the consumer
|
|
40
|
+
* is already tracking (and should also be reflecting via `aria-expanded` on
|
|
41
|
+
* their own `render` target, e.g. `<li role="treeitem" aria-expanded={open}>`).
|
|
42
|
+
* Has no effect when `isExpandable` is false.
|
|
43
|
+
*/
|
|
44
|
+
expanded?: boolean;
|
|
45
|
+
/** Render the trailing extras slot (`children`) at all. */
|
|
46
|
+
hasExtras?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the row is selected. Drives the persistent highlighted background —
|
|
49
|
+
* the same fill Figma's `state=active` swatch previews.
|
|
50
|
+
*/
|
|
51
|
+
selected?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Trailing extras — action buttons, a count badge. Only rendered when
|
|
54
|
+
* `hasExtras` is true.
|
|
55
|
+
*/
|
|
56
|
+
children?: React.ReactNode;
|
|
57
|
+
/**
|
|
58
|
+
* Replace the rendered `<div>` with another element or component (Base UI
|
|
59
|
+
* composition) — e.g. the `<li role="treeitem">` of a real ARIA tree.
|
|
60
|
+
*/
|
|
61
|
+
render?: useRender.RenderProp;
|
|
62
|
+
}
|
|
63
|
+
declare const TreeItem: React.ForwardRefExoticComponent<TreeItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
+
export { TreeItem };
|
|
@@ -30,8 +30,20 @@ interface TreemapCellProps {
|
|
|
30
30
|
secondaryLabel?: string;
|
|
31
31
|
showLabels?: boolean;
|
|
32
32
|
labelAlign?: TreemapLabelAlign;
|
|
33
|
+
/**
|
|
34
|
+
* How the leaf's fill relates to text contrast. Stamped by `Treemap` onto each
|
|
35
|
+
* row before recharts hands it to the cell renderer. Auto-computed from the
|
|
36
|
+
* resolved token name suffix:
|
|
37
|
+
*
|
|
38
|
+
* - `'dark'` — saturated/dark in both themes → always white text.
|
|
39
|
+
* - `'pale'` — pale in both themes → always dark text (via theme-adaptive token).
|
|
40
|
+
* - `'inverts'` — dark in light, pale in dark (sequential stops 7–8 whose
|
|
41
|
+
* `light-dark()` values mirror across themes) → white text in light, dark text
|
|
42
|
+
* in dark, achieved by a `light-dark()` color value in CSS.
|
|
43
|
+
*/
|
|
44
|
+
fillTone?: 'dark' | 'pale' | 'inverts';
|
|
33
45
|
}
|
|
34
|
-
export declare function TreemapCell({ x, y, width, height, name, primaryLabel, secondaryLabel, showLabels, labelAlign, }: TreemapCellProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function TreemapCell({ x, y, width, height, name, primaryLabel, secondaryLabel, showLabels, labelAlign, fillTone, }: TreemapCellProps): import("react/jsx-runtime").JSX.Element;
|
|
35
47
|
export interface TreemapProps extends Omit<React.ComponentProps<'div'>, 'children'>, ChartAnimationProps {
|
|
36
48
|
/**
|
|
37
49
|
* The dataviz palette this chart's series are painted from. Series that
|
|
@@ -70,10 +82,9 @@ export interface TreemapProps extends Omit<React.ComponentProps<'div'>, 'childre
|
|
|
70
82
|
/** Render each leaf's label inside its cell (when it fits). */
|
|
71
83
|
showLabels?: boolean;
|
|
72
84
|
/**
|
|
73
|
-
* Where a cell's label sits. Defaults to `
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* block in the tile. The corner variants are named for the tile's *start* edge
|
|
85
|
+
* Where a cell's label sits. Defaults to `center` — the Figma-canonical placement.
|
|
86
|
+
* `bottom-start` anchors the block to the tile's bottom start corner; `top-start`
|
|
87
|
+
* to the top start corner. The corner variants are named for the tile's *start* edge
|
|
77
88
|
* because they mirror under `dir="rtl"`.
|
|
78
89
|
*/
|
|
79
90
|
labelAlign?: TreemapLabelAlign;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './components/ui/calendar-panel';
|
|
|
18
18
|
export * from './components/ui/card';
|
|
19
19
|
export * from './components/ui/card-filter';
|
|
20
20
|
export * from './components/ui/card-section';
|
|
21
|
+
export * from './components/ui/card-widget-carousel';
|
|
21
22
|
export * from './components/ui/category-bar';
|
|
22
23
|
export * from './components/ui/chart';
|
|
23
24
|
export * from './components/ui/chart-state';
|
|
@@ -61,7 +62,6 @@ export * from './components/ui/label';
|
|
|
61
62
|
export * from './components/ui/line-chart';
|
|
62
63
|
export * from './components/ui/link';
|
|
63
64
|
export * from './components/ui/loading';
|
|
64
|
-
export * from './components/ui/meter';
|
|
65
65
|
export * from './components/ui/metric';
|
|
66
66
|
export * from './components/ui/number-field';
|
|
67
67
|
export * from './components/ui/page-content';
|
|
@@ -105,6 +105,7 @@ export * from './components/ui/tag';
|
|
|
105
105
|
export * from './components/ui/timeline';
|
|
106
106
|
export * from './components/ui/timer';
|
|
107
107
|
export { Tag as Badge, type TagProps as BadgeProps, } from './components/ui/tag';
|
|
108
|
+
export * from './components/ui/tree-item';
|
|
108
109
|
export * from './components/ui/treemap';
|
|
109
110
|
export * from './components/ui/trend-indicator';
|
|
110
111
|
export * from './components/ui/widget-placeholder';
|