@altertable/data-app-react 0.0.0-stage → 0.72.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/LICENSE +21 -0
- package/README.md +59 -2
- package/THIRD_PARTY_NOTICES +18 -0
- package/dist/chunks/index-xwy62xrb.js +16996 -0
- package/dist/chunks/index-xwy62xrb.js.map +120 -0
- package/dist/index.js +2888 -0
- package/dist/index.js.map +23 -0
- package/dist/types/actions.d.ts +53 -0
- package/dist/types/annotations/AnnotationBar.d.ts +30 -0
- package/dist/types/annotations/AnnotationControls.d.ts +10 -0
- package/dist/types/annotations/AnnotationEditor.d.ts +16 -0
- package/dist/types/annotations/AnnotationMarkers.d.ts +19 -0
- package/dist/types/annotations/AnnotationSelectionLayer.d.ts +12 -0
- package/dist/types/annotations/AnnotationTarget.d.ts +9 -0
- package/dist/types/annotations/AnnotationTooltip.d.ts +9 -0
- package/dist/types/annotations/AnnotationTrigger.d.ts +10 -0
- package/dist/types/annotations/annotation-editor-state.d.ts +58 -0
- package/dist/types/annotations/annotation-screenshot.d.ts +4 -0
- package/dist/types/annotations/annotation-targets.d.ts +34 -0
- package/dist/types/annotations/getAnnotationProps.d.ts +17 -0
- package/dist/types/annotations/styles.d.ts +3 -0
- package/dist/types/annotations/useAnnotationGeometry.d.ts +22 -0
- package/dist/types/annotations/useDataAppAnnotations.d.ts +22 -0
- package/dist/types/app-context.d.ts +3 -0
- package/dist/types/bindings.d.ts +169 -0
- package/dist/types/content.d.ts +36 -0
- package/dist/types/date-formatting.d.ts +12 -0
- package/dist/types/details.d.ts +46 -0
- package/dist/types/exploration.d.ts +44 -0
- package/dist/types/hooks.d.ts +114 -0
- package/dist/types/index.d.ts +78 -0
- package/dist/types/injectStyles.d.ts +7 -0
- package/dist/types/mount.d.ts +13 -0
- package/dist/types/search-suggestions.d.ts +8 -0
- package/dist/types/source-owner.d.ts +2 -0
- package/dist/types/style-contract.d.ts +88 -0
- package/dist/types/style-validation.d.ts +2 -0
- package/dist/types/styles.d.ts +8 -0
- package/dist/types/ui/AboutData.d.ts +73 -0
- package/dist/types/ui/AltertableLogo.d.ts +3 -0
- package/dist/types/ui/AppFooter.d.ts +6 -0
- package/dist/types/ui/AppHeader.d.ts +10 -0
- package/dist/types/ui/AppLayout.d.ts +10 -0
- package/dist/types/ui/AppScope.d.ts +7 -0
- package/dist/types/ui/AppToolbar.d.ts +30 -0
- package/dist/types/ui/AreaChart.d.ts +7 -0
- package/dist/types/ui/BarChart.d.ts +6 -0
- package/dist/types/ui/Breakdown.d.ts +13 -0
- package/dist/types/ui/Button.d.ts +12 -0
- package/dist/types/ui/ChartLegend.d.ts +32 -0
- package/dist/types/ui/Checkbox.d.ts +21 -0
- package/dist/types/ui/CheckboxGroup.d.ts +7 -0
- package/dist/types/ui/ChoicePicker.d.ts +39 -0
- package/dist/types/ui/Comparison.d.ts +14 -0
- package/dist/types/ui/ComposedChart.d.ts +41 -0
- package/dist/types/ui/ComposedChartLegend.d.ts +9 -0
- package/dist/types/ui/ContentSkeleton.d.ts +7 -0
- package/dist/types/ui/DataApp.d.ts +24 -0
- package/dist/types/ui/DataAppFrame.d.ts +52 -0
- package/dist/types/ui/DataBoundary.d.ts +14 -0
- package/dist/types/ui/DataSection.d.ts +14 -0
- package/dist/types/ui/DataSectionBoundary.d.ts +30 -0
- package/dist/types/ui/DataTable.d.ts +29 -0
- package/dist/types/ui/DataValue.d.ts +9 -0
- package/dist/types/ui/DataViewToast.d.ts +11 -0
- package/dist/types/ui/DataWidget.d.ts +37 -0
- package/dist/types/ui/DateDisplay.d.ts +9 -0
- package/dist/types/ui/DateRangePicker.d.ts +30 -0
- package/dist/types/ui/DateTimeTooltip.d.ts +10 -0
- package/dist/types/ui/DimensionPicker.d.ts +14 -0
- package/dist/types/ui/EmptyState.d.ts +6 -0
- package/dist/types/ui/ExplorationActionControl.d.ts +60 -0
- package/dist/types/ui/ExportControl.d.ts +4 -0
- package/dist/types/ui/FilterActions.d.ts +10 -0
- package/dist/types/ui/FilterBar.d.ts +3 -0
- package/dist/types/ui/FunnelChart.d.ts +20 -0
- package/dist/types/ui/GettingStarted.d.ts +6 -0
- package/dist/types/ui/GlossaryDefinition.d.ts +7 -0
- package/dist/types/ui/GlossaryExplanation.d.ts +16 -0
- package/dist/types/ui/GradientScroll.d.ts +23 -0
- package/dist/types/ui/Grid.d.ts +12 -0
- package/dist/types/ui/GridItem.d.ts +7 -0
- package/dist/types/ui/HelpPopover.d.ts +21 -0
- package/dist/types/ui/IconButton.d.ts +19 -0
- package/dist/types/ui/InspectionContext.d.ts +12 -0
- package/dist/types/ui/InspectionProvider.d.ts +29 -0
- package/dist/types/ui/JourneyChart.d.ts +10 -0
- package/dist/types/ui/Kbd.d.ts +7 -0
- package/dist/types/ui/LineChart.d.ts +7 -0
- package/dist/types/ui/LiveControl.d.ts +10 -0
- package/dist/types/ui/Menu.d.ts +13 -0
- package/dist/types/ui/MetricWidget.d.ts +51 -0
- package/dist/types/ui/NumberField.d.ts +27 -0
- package/dist/types/ui/NumberFilterPicker.d.ts +11 -0
- package/dist/types/ui/PeriodSummary.d.ts +17 -0
- package/dist/types/ui/PickerField.d.ts +23 -0
- package/dist/types/ui/PieChart.d.ts +11 -0
- package/dist/types/ui/PopoverSurface.d.ts +5 -0
- package/dist/types/ui/PresentStory.d.ts +30 -0
- package/dist/types/ui/QueryList.d.ts +14 -0
- package/dist/types/ui/RadioGroup.d.ts +18 -0
- package/dist/types/ui/Ranking.d.ts +13 -0
- package/dist/types/ui/RefreshControl.d.ts +9 -0
- package/dist/types/ui/RequestHint.d.ts +20 -0
- package/dist/types/ui/RetentionChart.d.ts +27 -0
- package/dist/types/ui/ScatterChart.d.ts +17 -0
- package/dist/types/ui/SearchField.d.ts +23 -0
- package/dist/types/ui/SearchInput.d.ts +10 -0
- package/dist/types/ui/SearchMatch.d.ts +6 -0
- package/dist/types/ui/SearchTypeahead.d.ts +15 -0
- package/dist/types/ui/SectionHeading.d.ts +8 -0
- package/dist/types/ui/Select.d.ts +22 -0
- package/dist/types/ui/SelectionMark.d.ts +5 -0
- package/dist/types/ui/Sheet.d.ts +21 -0
- package/dist/types/ui/Skeleton.d.ts +8 -0
- package/dist/types/ui/Stack.d.ts +7 -0
- package/dist/types/ui/StaticDataApp.d.ts +4 -0
- package/dist/types/ui/StatusPanel.d.ts +10 -0
- package/dist/types/ui/TableWidget.d.ts +67 -0
- package/dist/types/ui/Tabs.d.ts +10 -0
- package/dist/types/ui/TextContent.d.ts +4 -0
- package/dist/types/ui/TextWidget.d.ts +20 -0
- package/dist/types/ui/ThemeSelector.d.ts +12 -0
- package/dist/types/ui/Toast.d.ts +8 -0
- package/dist/types/ui/Tooltip.d.ts +23 -0
- package/dist/types/ui/TooltipSurface.d.ts +3 -0
- package/dist/types/ui/TrendChart.d.ts +5 -0
- package/dist/types/ui/UpdatedAt.d.ts +9 -0
- package/dist/types/ui/VariableBar.d.ts +6 -0
- package/dist/types/ui/VisualizationWidget.d.ts +43 -0
- package/dist/types/ui/WidgetDisclosure.d.ts +6 -0
- package/dist/types/ui/WidgetEvidence.d.ts +12 -0
- package/dist/types/ui/WidgetViewTabs.d.ts +16 -0
- package/dist/types/ui/chart-data.d.ts +36 -0
- package/dist/types/ui/chart-date-axis.d.ts +15 -0
- package/dist/types/ui/chart-interaction.d.ts +27 -0
- package/dist/types/ui/chart-primitives.d.ts +22 -0
- package/dist/types/ui/chart-time.d.ts +19 -0
- package/dist/types/ui/chartColor.d.ts +2 -0
- package/dist/types/ui/classNames.d.ts +1 -0
- package/dist/types/ui/csv-export.d.ts +19 -0
- package/dist/types/ui/data-context.d.ts +76 -0
- package/dist/types/ui/data-identifiers.d.ts +32 -0
- package/dist/types/ui/icons.d.ts +49 -0
- package/dist/types/ui/index.d.ts +111 -0
- package/dist/types/ui/journey-flow.d.ts +49 -0
- package/dist/types/ui/keyboard.d.ts +6 -0
- package/dist/types/ui/metric-comparison.d.ts +30 -0
- package/dist/types/ui/metric.d.ts +11 -0
- package/dist/types/ui/presentation.d.ts +25 -0
- package/dist/types/ui/search.d.ts +6 -0
- package/dist/types/ui/searchItems.d.ts +36 -0
- package/dist/types/ui/shortcuts.d.ts +45 -0
- package/dist/types/ui/story.d.ts +20 -0
- package/dist/types/ui/time-interval.d.ts +96 -0
- package/dist/types/ui/use-chart-scroll-to-end.d.ts +2 -0
- package/dist/types/ui/useAppAppearance.d.ts +3 -0
- package/dist/types/ui/useDataAppPresentation.d.ts +3 -0
- package/dist/types/ui/useSvgId.d.ts +2 -0
- package/dist/types/ui/variables.d.ts +36 -0
- package/dist/types/ui/widget-views.d.ts +3 -0
- package/dist/types/view-control-bar.d.ts +18 -0
- package/dist/types/view-controls.d.ts +20 -0
- package/dist/types/view-runtime.d.ts +34 -0
- package/dist/types/view.d.ts +87 -0
- package/dist/types/widgets.d.ts +90 -0
- package/dist/ui/index.js +3520 -0
- package/dist/ui/index.js.map +36 -0
- package/package.json +65 -4
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
export type RefreshControlProps = {
|
|
3
|
+
refreshing: boolean;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
label?: string;
|
|
6
|
+
status?: ReactNode;
|
|
7
|
+
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
8
|
+
/** Show refresh progress just before its action after a short delay. */
|
|
9
|
+
export declare function RefreshControl({ refreshing, children, label, status, className, ...props }: RefreshControlProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Idle keeps the same reserved space as refresh and failure. Initial loading belongs to skeletons. */
|
|
2
|
+
export type WidgetStatus = {
|
|
3
|
+
kind: 'idle';
|
|
4
|
+
} | {
|
|
5
|
+
kind: 'updating';
|
|
6
|
+
message?: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'error';
|
|
9
|
+
message?: string;
|
|
10
|
+
onRetry?: () => void;
|
|
11
|
+
};
|
|
12
|
+
/** Fixed-height feedback keeps data in place; the retry belongs beside its failure message. */
|
|
13
|
+
export declare function RequestHint({ status, retryLabel, }: {
|
|
14
|
+
status?: WidgetStatus;
|
|
15
|
+
retryLabel?: string;
|
|
16
|
+
}): import("react").JSX.Element;
|
|
17
|
+
/** Supplied status reserves a fixed footprint across request states; omission leaves space for the title. */
|
|
18
|
+
export declare function WidgetStatusControl({ status }: {
|
|
19
|
+
status?: WidgetStatus;
|
|
20
|
+
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type CountChartProps } from './chart-data.js';
|
|
2
|
+
export type RetentionChartPoint = {
|
|
3
|
+
/** Nonnegative integer, unique per series; uneven offsets retain their distance. */
|
|
4
|
+
offset: number;
|
|
5
|
+
/** Must agree across series for the same offset. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Observed retention fraction in [0, 1], or null for an unobserved period. */
|
|
8
|
+
rate: number | null;
|
|
9
|
+
/** Finite count in [0, cohortSize]; null exactly when rate is null. */
|
|
10
|
+
retainedCount: number | null;
|
|
11
|
+
/** Observed but still accumulating; drawn as a dotted tail. */
|
|
12
|
+
incomplete?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export type RetentionChartSeries = {
|
|
15
|
+
/** Unique, nonblank cohort or segment ID. */
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
/** Finite, nonnegative starting population. */
|
|
19
|
+
cohortSize: number;
|
|
20
|
+
points: readonly RetentionChartPoint[];
|
|
21
|
+
};
|
|
22
|
+
export type RetentionChartProps = CountChartProps & {
|
|
23
|
+
series: readonly RetentionChartSeries[];
|
|
24
|
+
};
|
|
25
|
+
/** Query-defined retention curves with count inspection and dotted incomplete periods.
|
|
26
|
+
* Rates are not recomputed from counts. Compose inside VisualizationWidget. */
|
|
27
|
+
export declare function RetentionChart({ series, unit, ariaLabel, className, formatValue, }: RetentionChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ScatterChartItem } from './chart-data.js';
|
|
2
|
+
export type { ScatterChartItem } from './chart-data.js';
|
|
3
|
+
export type ScatterChartProps = {
|
|
4
|
+
items: readonly ScatterChartItem[];
|
|
5
|
+
xLabel: string;
|
|
6
|
+
yLabel: string;
|
|
7
|
+
xUnit: string;
|
|
8
|
+
yUnit: string;
|
|
9
|
+
ariaLabel: string;
|
|
10
|
+
formatX?: (value: number) => string;
|
|
11
|
+
formatY?: (value: number) => string;
|
|
12
|
+
};
|
|
13
|
+
/** Independent finite X/Y observations on linear axes that include zero.
|
|
14
|
+
* Negative and constant coordinates are supported. Axis labels and units describe
|
|
15
|
+
* tooltips as well as the plot; formatX/formatY format ticks and tooltip values.
|
|
16
|
+
* Compose inside VisualizationWidget; hover/touch tooltips need no caller state. */
|
|
17
|
+
export declare function ScatterChart({ items, xLabel, yLabel, xUnit, yUnit, ariaLabel, formatX, formatY, }: ScatterChartProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
export type SearchFieldProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
onSubmit?: (value: string) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
showLabel?: boolean;
|
|
9
|
+
/** Enable page search shortcuts on one primary search field per app. */
|
|
10
|
+
focusShortcut?: boolean;
|
|
11
|
+
size?: 'default' | 'compact';
|
|
12
|
+
description?: ReactNode;
|
|
13
|
+
status?: ReactNode;
|
|
14
|
+
busy?: boolean;
|
|
15
|
+
resetValue?: string;
|
|
16
|
+
inputProps?: Omit<ComponentPropsWithRef<'input'>, 'type' | 'value' | 'children'>;
|
|
17
|
+
children?: ReactNode;
|
|
18
|
+
} & Omit<ComponentPropsWithRef<'form'>, 'onChange' | 'onSubmit' | 'children'>;
|
|
19
|
+
/**
|
|
20
|
+
* The caller owns filtering, URL state, and whether search runs while typing or on submit.
|
|
21
|
+
* Escape and Clear reset the query.
|
|
22
|
+
*/
|
|
23
|
+
export declare function SearchField({ label, value, onChange, onSubmit, placeholder, showLabel, focusShortcut, size, description, status, busy, resetValue, inputProps, children, className, ...props }: SearchFieldProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
/** One search control surface for picker search and table/page search. */
|
|
3
|
+
export declare function SearchInput({ focusRing, size, endAction, loading, className, ...props }: Omit<ComponentPropsWithRef<'input'>, 'size' | 'children'> & {
|
|
4
|
+
size?: 'default' | 'compact';
|
|
5
|
+
/** Picker search delegates focus indication to the active option. */
|
|
6
|
+
focusRing?: boolean;
|
|
7
|
+
endAction?: ReactNode;
|
|
8
|
+
/** Replaces the search glyph in its existing space; input and results remain usable. */
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import type { SearchMatchValue } from './searchItems.js';
|
|
3
|
+
export type SearchMatchProps = {
|
|
4
|
+
match: SearchMatchValue;
|
|
5
|
+
} & Omit<ComponentPropsWithRef<'span'>, 'children'>;
|
|
6
|
+
export declare function SearchMatch({ match, className, ...props }: SearchMatchProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type SearchFieldProps } from './SearchField.js';
|
|
2
|
+
export type SearchSuggestion = {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
/** Override completing the query with this title, for example to open record details. */
|
|
7
|
+
onSelect?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export type SearchTypeaheadProps = SearchFieldProps & {
|
|
10
|
+
/** Suggestions from the displayed result, in its order. No additional filtering or request. */
|
|
11
|
+
items: readonly SearchSuggestion[];
|
|
12
|
+
};
|
|
13
|
+
/** An editable combobox with manual selection: typing searches, selecting completes the query unless overridden.
|
|
14
|
+
* Input retains focus during navigation; Escape dismisses suggestions before clearing search. */
|
|
15
|
+
export declare function SearchTypeahead({ items, busy, inputProps, ...props }: SearchTypeaheadProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
export type SectionHeadingProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/** Document outline level. Defaults to the section level below the page title. */
|
|
5
|
+
level?: 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
} & Omit<ComponentPropsWithRef<'h2'>, 'children'>;
|
|
7
|
+
/** A section title with the shared section-heading appearance. */
|
|
8
|
+
export declare function SectionHeading({ children, level, className, ...props }: SectionHeadingProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ControlLabelPlacement } from './PickerField.js';
|
|
2
|
+
import { type ChoiceOption } from '@altertable/data-app/internal';
|
|
3
|
+
import type { AppIconName } from './icons.js';
|
|
4
|
+
export type SelectProps = {
|
|
5
|
+
label: string;
|
|
6
|
+
labelPlacement?: ControlLabelPlacement;
|
|
7
|
+
/** Replace the inline text label with a decorative icon; the accessible label remains. */
|
|
8
|
+
icon?: AppIconName;
|
|
9
|
+
size?: 'default' | 'compact';
|
|
10
|
+
options: readonly ChoiceOption[];
|
|
11
|
+
value: string;
|
|
12
|
+
onChange: (value: string) => void;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
name?: string;
|
|
16
|
+
id?: string;
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Align the popup with the selection button. Defaults to start. */
|
|
19
|
+
align?: 'start' | 'end';
|
|
20
|
+
};
|
|
21
|
+
/** Labeled single selection with keyboard navigation and a styled listbox. */
|
|
22
|
+
export declare function Select({ label, options, value, onChange, disabled, required, className, align, labelPlacement, icon, size, ...props }: SelectProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode, type RefObject } from 'react';
|
|
2
|
+
export type SheetDialogProps = Omit<ComponentPropsWithRef<'dialog'>, 'children' | 'open' | 'title' | 'aria-labelledby'>;
|
|
3
|
+
export type SheetProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
headerActions?: ReactNode;
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
wide?: boolean;
|
|
12
|
+
placement?: 'side' | 'center';
|
|
13
|
+
/** Edge for side placement. Defaults to right; small screens use a bottom sheet. */
|
|
14
|
+
side?: 'left' | 'right';
|
|
15
|
+
returnFocus?: RefObject<HTMLElement | SVGElement | null>;
|
|
16
|
+
} & SheetDialogProps;
|
|
17
|
+
/**
|
|
18
|
+
* Uses the native dialog top layer and focus trap. Closing keeps the modal mounted until its
|
|
19
|
+
* exit transition completes.
|
|
20
|
+
*/
|
|
21
|
+
export declare function Sheet({ open, onOpenChange, title, description, children, headerActions, footer, wide, placement, side, returnFocus, className, onCancel, onClose, onClick, onTransitionEnd, ref, ...props }: SheetProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
+
export type SkeletonProps = Omit<ComponentPropsWithRef<'span'>, 'children' | 'aria-hidden'> & {
|
|
3
|
+
/** Align a text-sized placeholder with surrounding prose. */
|
|
4
|
+
inline?: boolean;
|
|
5
|
+
};
|
|
6
|
+
/** Decorative loading placeholder that fades in only when loading takes a moment.
|
|
7
|
+
* Put the accessible status on its container. */
|
|
8
|
+
export declare function Skeleton({ inline, className, ...props }: SkeletonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
export type StackProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
gap?: 'sm' | 'md' | 'lg';
|
|
5
|
+
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
6
|
+
/** Vertical layout for peer sections or request boundaries, with the page's section gap. */
|
|
7
|
+
export declare function Stack({ children, gap, className, ...props }: StackProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type StaticDataAppProps } from './DataAppFrame.js';
|
|
2
|
+
export type DataAppProps = StaticDataAppProps;
|
|
3
|
+
/** Setup and static screens; fetched data uses the declared-view DataApp. */
|
|
4
|
+
export declare function DataApp(props: DataAppProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
export type StatusPanelProps = {
|
|
3
|
+
status: 'loading' | 'empty' | 'error';
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
details?: ReactNode;
|
|
7
|
+
action?: ReactNode;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
} & Omit<ComponentPropsWithRef<'div'>, 'children' | 'title'>;
|
|
10
|
+
export declare function StatusPanel({ status, title, description, details, action, children, className, role, ...props }: StatusPanelProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type DataReading } from '@altertable/data-app/internal';
|
|
3
|
+
import { type WidgetEvidence } from './WidgetEvidence.js';
|
|
4
|
+
import { type WidgetStatus } from './RequestHint.js';
|
|
5
|
+
import { type DataTableSearch } from './DataTable.js';
|
|
6
|
+
import { type EmptyContent } from './presentation.js';
|
|
7
|
+
import { type SearchHit, type SearchItemsOptions } from './searchItems.js';
|
|
8
|
+
export type TableWidgetColumn<Row> = {
|
|
9
|
+
/** Stable, nonempty identity; unique within this table. */
|
|
10
|
+
id: string;
|
|
11
|
+
header: ReactNode;
|
|
12
|
+
type?: 'number' | 'datetime';
|
|
13
|
+
/** Render this column's value for one row. The table owns its cell element and semantics. */
|
|
14
|
+
cell: (row: Row, hit?: SearchHit<Row>) => ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export type TableWidgetSearch<Row> = Omit<DataTableSearch, 'itemCount'> & Pick<SearchItemsOptions<Row>, 'attributes' | 'mode' | 'fuzzyThreshold'>;
|
|
17
|
+
export type TableDisplayMode = {
|
|
18
|
+
/** Positive integer preview cap after search; disables pagination. */
|
|
19
|
+
limit: number;
|
|
20
|
+
pagination?: never;
|
|
21
|
+
} | {
|
|
22
|
+
/** Local pagination after search: 10 rows by default, false shows all supplied rows.
|
|
23
|
+
* pageSize must be a positive integer. Counts refer only to supplied rows.
|
|
24
|
+
* The widget owns bottom-footer controls and shares the current page with inspection. */
|
|
25
|
+
pagination?: {
|
|
26
|
+
pageSize: number;
|
|
27
|
+
} | false;
|
|
28
|
+
limit?: never;
|
|
29
|
+
};
|
|
30
|
+
type TableWidgetBaseProps<Row> = {
|
|
31
|
+
title: ReactNode;
|
|
32
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
33
|
+
annotationId?: string;
|
|
34
|
+
/** Show the matching supplied-row count before pagination or limits. Defaults to true. */
|
|
35
|
+
showCount?: boolean;
|
|
36
|
+
/** Override the derived count, for example with a server total. Hidden when showCount is false or loading. */
|
|
37
|
+
count?: number;
|
|
38
|
+
/** Clear only filters affecting this dataset. Supply only while those filters are active; enables empty-result recovery. */
|
|
39
|
+
onClearFilters?: () => void;
|
|
40
|
+
description?: ReactNode;
|
|
41
|
+
columns: readonly [TableWidgetColumn<Row>, ...TableWidgetColumn<Row>[]];
|
|
42
|
+
/** Unique, nonempty row identity. Numeric keys must be finite; 1 and "1" collide. */
|
|
43
|
+
rowKey: (row: Row) => string | number;
|
|
44
|
+
status?: WidgetStatus;
|
|
45
|
+
action?: ReactNode;
|
|
46
|
+
evidence?: WidgetEvidence;
|
|
47
|
+
search?: TableWidgetSearch<Row>;
|
|
48
|
+
/** Valid result with no rows; the header remains visible. */
|
|
49
|
+
emptyFallback: EmptyContent;
|
|
50
|
+
/** No local search matches or explicitly filtered results. Defaults to “No matching results” with recovery guidance. */
|
|
51
|
+
noMatchesFallback?: EmptyContent;
|
|
52
|
+
} & TableDisplayMode & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
|
|
53
|
+
/** Composes VisualizationWidget with DataTable, search, and local pagination.
|
|
54
|
+
* Columns own header and body semantics; the first column is the row header.
|
|
55
|
+
* Use DataTable inside VisualizationWidget directly for custom table markup. */
|
|
56
|
+
export type TableWidgetProps<Row> = TableWidgetBaseProps<Row> & ({
|
|
57
|
+
rows: readonly Row[];
|
|
58
|
+
reading?: never;
|
|
59
|
+
skeletonRows?: never;
|
|
60
|
+
} | {
|
|
61
|
+
reading: DataReading<readonly Row[]>;
|
|
62
|
+
rows?: never;
|
|
63
|
+
skeletonRows?: number;
|
|
64
|
+
evidence: WidgetEvidence;
|
|
65
|
+
});
|
|
66
|
+
export declare function TableWidget<Row>(props: TableWidgetProps<Row>): import("react").JSX.Element;
|
|
67
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type RefAttributes } from 'react';
|
|
2
|
+
import { Tabs as AriaTabs, type TabListProps, Tab as AriaTab, TabPanels, TabPanel as AriaTabPanel } from 'react-aria-components/Tabs';
|
|
3
|
+
/** React Aria tabs with keyboard and ARIA behavior; pair each Tab and TabPanel by stable id. */
|
|
4
|
+
export { TabPanels };
|
|
5
|
+
export declare function TabList<T>({ className, ref, ...props }: TabListProps<T> & RefAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
6
|
+
export declare function Tab(props: ComponentPropsWithRef<typeof AriaTab>): import("react").JSX.Element;
|
|
7
|
+
export declare function TabPanel(props: ComponentPropsWithRef<typeof AriaTabPanel>): import("react").JSX.Element;
|
|
8
|
+
export declare function Tabs({ className, ...props }: ComponentPropsWithRef<typeof AriaTabs>): import("react").JSX.Element;
|
|
9
|
+
/** Keep a page-level tab in `?view=`; reserve `?tab=` for the inspect sheet. */
|
|
10
|
+
export declare function useViewTab<View extends string>(views: readonly View[], fallback: View): [View, (key: string | number) => void];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
+
export type TextContentProps = ComponentPropsWithRef<'div'>;
|
|
3
|
+
/** Prose typography for page introductions, widget bodies, and inspection content. */
|
|
4
|
+
export declare function TextContent({ className, ...props }: TextContentProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type DataReading } from '@altertable/data-app/internal';
|
|
3
|
+
import { type DataWidgetProps } from './DataWidget.js';
|
|
4
|
+
import { type WidgetEvidence } from './WidgetEvidence.js';
|
|
5
|
+
type TextWidgetBaseProps = Omit<Extract<DataWidgetProps, {
|
|
6
|
+
reading?: never;
|
|
7
|
+
}>, 'reading' | 'children' | 'isEmpty' | 'empty' | 'skeleton' | 'bodyPadding'>;
|
|
8
|
+
/** Narrative sibling of VisualizationWidget, composing DataWidget with TextContent.
|
|
9
|
+
* Use TextContent directly for borderless prose. Bind claims and scope to the same displayed reading.
|
|
10
|
+
* The renderer handles every ready value, including zero and empty collections. */
|
|
11
|
+
export type TextWidgetProps<Data = unknown> = TextWidgetBaseProps & ({
|
|
12
|
+
reading: DataReading<Data>;
|
|
13
|
+
evidence: WidgetEvidence;
|
|
14
|
+
children: (data: Data) => ReactNode;
|
|
15
|
+
} | {
|
|
16
|
+
reading?: never;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
});
|
|
19
|
+
export declare function TextWidget<Data>(props: TextWidgetProps<Data>): import("react").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import { type ThemeController } from '@altertable/data-app/appearance';
|
|
3
|
+
export type ThemeSelectorProps = {
|
|
4
|
+
theme: ThemeController;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
} & Omit<ComponentPropsWithRef<'fieldset'>, 'children'>;
|
|
7
|
+
/** Viewer color preference. Brand tokens remain app-owned. */
|
|
8
|
+
export declare function ThemeSelector({ theme, children, className, ...props }: ThemeSelectorProps): import("react").JSX.Element;
|
|
9
|
+
export declare function ThemeToggle({ theme, portalRoot, }: {
|
|
10
|
+
theme: ThemeController;
|
|
11
|
+
portalRoot?: RefObject<HTMLElement | null>;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Shared page-level feedback for requests and toolbar actions. */
|
|
3
|
+
export declare function Toast({ state, children, onRetry, position, }: {
|
|
4
|
+
state: 'updating' | 'error' | 'notice';
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
onRetry?: () => void;
|
|
7
|
+
position?: 'top' | 'bottom';
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode, type RefObject } from 'react';
|
|
2
|
+
export type TooltipProviderProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
delay?: number;
|
|
5
|
+
skipDelayDuration?: number;
|
|
6
|
+
};
|
|
7
|
+
/** Delay the first hover, then open nearby tooltips without waiting during the skip window.
|
|
8
|
+
* Keyboard focus always opens immediately. AppLayout provides this by default. */
|
|
9
|
+
export declare function TooltipProvider({ children, delay, skipDelayDuration, }: TooltipProviderProps): import("react").JSX.Element;
|
|
10
|
+
export type TooltipProps = {
|
|
11
|
+
content: ReactNode;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
variant?: 'hint' | 'chart';
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
align?: 'start' | 'center' | 'end';
|
|
16
|
+
placement?: 'top' | 'bottom';
|
|
17
|
+
portalRoot?: RefObject<HTMLElement | null>;
|
|
18
|
+
} & Omit<ComponentPropsWithRef<'span'>, 'children' | 'content'>;
|
|
19
|
+
/** Short visual hint for an already labeled control. variant="chart" follows the cursor
|
|
20
|
+
* on hover and toggles on tap so a bar or point can show the period and value. Chart
|
|
21
|
+
* tooltips dismiss on scroll and do not open on keyboard focus. Hint
|
|
22
|
+
* tooltips hide once the control is pressed. Escape closes either. */
|
|
23
|
+
export declare function Tooltip({ content, children, onOpenChange, variant, align, placement, portalRoot, className, ref, onPointerEnter, onPointerMove, onPointerLeave, onPointerDown, onFocusCapture, onBlurCapture, ...props }: TooltipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ChartItem, ValueChartProps } from './chart-data.js';
|
|
2
|
+
/** Ordered, equally spaced samples; negative values share an explicit zero baseline. */
|
|
3
|
+
export declare function TrendChart<Row extends ChartItem>({ items, unit, ariaLabel, formatValue, kind, itemActions, }: ValueChartProps<Row> & {
|
|
4
|
+
kind: 'line' | 'area';
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type DateTimeTooltipProps } from './DateTimeTooltip.js';
|
|
3
|
+
export type UpdatedAtProps = {
|
|
4
|
+
timestamp: number;
|
|
5
|
+
locale?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
} & Omit<DateTimeTooltipProps, 'date' | 'children'>;
|
|
9
|
+
export declare function UpdatedAt({ timestamp, locale, label, children, triggerProps, ...props }: UpdatedAtProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
export type VariableBarProps = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
5
|
+
/** User-controlled inputs below the page header. */
|
|
6
|
+
export declare function VariableBar({ children, className, role, 'aria-label': ariaLabel, ...props }: VariableBarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type DataWidgetProps } from './DataWidget.js';
|
|
3
|
+
import { type BoundWidgetReading } from './presentation.js';
|
|
4
|
+
type VisualizationWidgetBaseProps = Pick<DataWidgetProps, 'title' | 'headingLevel' | 'annotationId' | 'description' | 'count' | 'action' | 'evidence' | 'records' | 'status' | 'emptyFallback'> & {
|
|
5
|
+
/** Footer controls, such as table pagination. */
|
|
6
|
+
footer?: ReactNode;
|
|
7
|
+
} & Omit<ComponentPropsWithRef<'section'>, 'about' | 'title' | 'children'>;
|
|
8
|
+
type UnboundVisualizationWidgetProps = VisualizationWidgetBaseProps & ({
|
|
9
|
+
loading: true;
|
|
10
|
+
loadingContent?: ReactNode;
|
|
11
|
+
visual?: never;
|
|
12
|
+
} | {
|
|
13
|
+
loading?: false;
|
|
14
|
+
visual: ReactNode;
|
|
15
|
+
loadingContent?: never;
|
|
16
|
+
});
|
|
17
|
+
export type VisualizationWidgetView<Data> = {
|
|
18
|
+
/** Stable, nonempty identity; unique within this widget. */
|
|
19
|
+
id: string;
|
|
20
|
+
label: ReactNode;
|
|
21
|
+
render: (data: Data) => ReactNode;
|
|
22
|
+
};
|
|
23
|
+
type BoundVisualizationWidgetBase<Data> = VisualizationWidgetBaseProps & BoundWidgetReading<Data> & {
|
|
24
|
+
visual?: never;
|
|
25
|
+
loading?: never;
|
|
26
|
+
};
|
|
27
|
+
/** DataWidget frame for charts, DataTable, metrics, or a custom data display.
|
|
28
|
+
* Owns alternate-view selection and shares it with inspection. Built-in charts own
|
|
29
|
+
* transient tooltips; lift persistent custom interactions above both mounts.
|
|
30
|
+
* For narrative prose use the sibling TextWidget, which composes DataWidget directly. */
|
|
31
|
+
export type VisualizationWidgetProps<Data = unknown> = UnboundVisualizationWidgetProps | (BoundVisualizationWidgetBase<Data> & {
|
|
32
|
+
children: (data: Data) => ReactNode;
|
|
33
|
+
views?: never;
|
|
34
|
+
}) | (BoundVisualizationWidgetBase<Data> & {
|
|
35
|
+
views: readonly VisualizationWidgetView<Data>[];
|
|
36
|
+
viewLabel: string;
|
|
37
|
+
/** An existing view ID; defaults to the first view. Validated while loading too. */
|
|
38
|
+
initialView?: string;
|
|
39
|
+
children?: never;
|
|
40
|
+
});
|
|
41
|
+
/** Compose an unframed visual with the shared heading and inspection. */
|
|
42
|
+
export declare function VisualizationWidget<Data>(props: VisualizationWidgetProps<Data>): import("react").JSX.Element;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
export type WidgetDisclosureProps = {
|
|
3
|
+
label: ReactNode;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
} & Omit<ComponentPropsWithRef<'details'>, 'children'>;
|
|
6
|
+
export declare function WidgetDisclosure({ label, children, className, ...props }: WidgetDisclosureProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type AboutSubject } from './AboutData.js';
|
|
2
|
+
type EvidenceDetails = Omit<AboutSubject, 'id' | 'title' | 'description' | 'visual' | 'visualKind' | 'references'> & {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
export type WidgetEvidence = EvidenceDetails & ({
|
|
6
|
+
glossaryIds: [string, ...string[]];
|
|
7
|
+
queryNames?: string[];
|
|
8
|
+
} | {
|
|
9
|
+
queryNames: [string, ...string[]];
|
|
10
|
+
glossaryIds?: string[];
|
|
11
|
+
});
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
+
import { type EmptyContent } from './presentation.js';
|
|
3
|
+
export type WidgetView = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
emptyFallback: EmptyContent;
|
|
8
|
+
isEmpty: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type WidgetViewTabsProps<Views extends readonly WidgetView[] = readonly WidgetView[]> = {
|
|
11
|
+
label: string;
|
|
12
|
+
views: Views;
|
|
13
|
+
selectedKey: NoInfer<Views[number]['id']>;
|
|
14
|
+
onSelectionChange: (key: Views[number]['id']) => void;
|
|
15
|
+
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
16
|
+
export declare function WidgetViewTabs<const Views extends readonly WidgetView[]>({ label, views, selectedKey, onSelectionChange, className, ...props }: WidgetViewTabsProps<Views>): import("react").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ItemActions } from './ExplorationActionControl.js';
|
|
2
|
+
/** Ordered category or time-series sample. IDs are unique and nonblank; values are finite. */
|
|
3
|
+
export type ChartItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: number;
|
|
7
|
+
};
|
|
8
|
+
export type ValueChartProps<Row extends ChartItem = ChartItem> = {
|
|
9
|
+
/** Ordered samples; the chart validates IDs and values when rendering. */
|
|
10
|
+
items: readonly Row[];
|
|
11
|
+
/** Actions available for each displayed item. Domain fields remain available to this callback. */
|
|
12
|
+
itemActions?: ItemActions<Row>;
|
|
13
|
+
unit: string;
|
|
14
|
+
ariaLabel: string;
|
|
15
|
+
formatValue?: (value: number) => string;
|
|
16
|
+
};
|
|
17
|
+
export type CountChartProps = {
|
|
18
|
+
/** Accessible measure and scope description. */
|
|
19
|
+
ariaLabel: string;
|
|
20
|
+
/** Population unit, such as users or sessions. */
|
|
21
|
+
unit: string;
|
|
22
|
+
/** Formats counts; rates use percentage formatting. */
|
|
23
|
+
formatValue?: (value: number) => string;
|
|
24
|
+
className?: string;
|
|
25
|
+
};
|
|
26
|
+
/** Independent observation on two finite numeric axes. */
|
|
27
|
+
export type ScatterChartItem = {
|
|
28
|
+
id: string;
|
|
29
|
+
label: string;
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
};
|
|
33
|
+
type ValueChartKind = 'bar' | 'line' | 'area' | 'pie';
|
|
34
|
+
export declare function validateValueChartItems(kind: ValueChartKind, items: readonly ChartItem[]): void;
|
|
35
|
+
export declare function validateScatterChartItems(items: readonly ScatterChartItem[]): void;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
+
import { XAxis } from 'recharts';
|
|
3
|
+
type LabelFormatter = (value: unknown) => string;
|
|
4
|
+
export declare function ChartDateAxes({ data, children, }: {
|
|
5
|
+
data: readonly unknown[];
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function useDateAxisLabel(id?: string | number): LabelFormatter | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Infers temporal input from ISO dates, zoned ISO timestamps, and Date values.
|
|
11
|
+
* Use scale="utc" for epoch milliseconds or type="category" for date-like categories.
|
|
12
|
+
* Explicit tick formatters and tick lists retain authored axis behavior.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ChartXAxis<Row = unknown, Value = string | number | Date>(props: ComponentProps<typeof XAxis<Row, Value>>): import("react").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
/** Coordinates in the chart SVG, shared by pointer tracking and active samples. */
|
|
3
|
+
export type ChartPoint = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
type ChartInteractionApi = {
|
|
8
|
+
isPointerInspection: boolean;
|
|
9
|
+
activePoint: ChartPoint | undefined;
|
|
10
|
+
seriesCount: number;
|
|
11
|
+
/** Line and area series register the sample at the current inspection position. */
|
|
12
|
+
registerPoint: (id: string, x: number, y: number) => () => void;
|
|
13
|
+
registerSeries: (id: string) => () => void;
|
|
14
|
+
activeSeriesId: string | null;
|
|
15
|
+
setHoveredSeriesId: (id: string | null) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const ChartInteractionContext: import("react").Context<ChartInteractionApi | null>;
|
|
18
|
+
export declare function isChartSeriesActive(interaction: ChartInteractionApi | null, seriesId: string): boolean;
|
|
19
|
+
export declare function useChartSeries(id?: string): {
|
|
20
|
+
id: string;
|
|
21
|
+
active: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare function ChartSeries({ id, children, }: {
|
|
24
|
+
id: string;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { ChartXAxis } from './chart-date-axis.js';
|
|
2
|
+
import { type ComponentProps } from 'react';
|
|
3
|
+
import { type DotProps, Scatter, YAxis, CartesianGrid, Tooltip, DefaultTooltipContent, type BarProps, type LineProps, type AreaProps } from 'recharts';
|
|
4
|
+
/** Hollow sample marker shared by standalone and composed series. */
|
|
5
|
+
export declare function ChartDot({ active, stroke, fill, r, ...props }: DotProps & {
|
|
6
|
+
active?: boolean;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
/** Shared series defaults; native props override every authored choice. */
|
|
9
|
+
export declare function ChartBar<Row = unknown, Value = number | null>(props: BarProps<Row, Value>): import("react").JSX.Element;
|
|
10
|
+
/** Sample dots are opt-in with dot=true.
|
|
11
|
+
* activeDot independently controls the hovered point. Native dot props and renderers remain available. */
|
|
12
|
+
export declare function ChartLine<Row = unknown, Value = number | null>({ stroke, dot, activeDot, ...props }: LineProps<Row, Value>): import("react").JSX.Element;
|
|
13
|
+
/** Filled series with the same sample-dot and activeDot options as ChartLine. */
|
|
14
|
+
export declare function ChartArea<Row = unknown, Value = number | null>({ stroke, dot, activeDot, ...props }: AreaProps<Row, Value>): import("react").JSX.Element;
|
|
15
|
+
export declare function ChartScatter<Row = unknown, Value = number>(props: ComponentProps<typeof Scatter<Row, Value>>): import("react").JSX.Element;
|
|
16
|
+
export declare function ChartYAxis<Row = unknown, Value = number>(props: ComponentProps<typeof YAxis<Row, Value>>): import("react").JSX.Element;
|
|
17
|
+
export declare function ChartGrid(props: ComponentProps<typeof CartesianGrid>): import("react").JSX.Element;
|
|
18
|
+
export declare function ChartTooltipContent(props: ComponentProps<typeof DefaultTooltipContent> & {
|
|
19
|
+
active?: boolean;
|
|
20
|
+
}): import("react").JSX.Element | null;
|
|
21
|
+
/** Uses the same surface as single-series inspection; Recharts owns interaction. */
|
|
22
|
+
export declare function ChartTooltip(props: ComponentProps<typeof Tooltip>): import("react").JSX.Element;
|