@structyl/primitives 1.0.0 → 1.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/LICENSE +1 -1
- package/README.md +3 -3
- package/dist/index.cjs +232 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +66 -100
- package/dist/index.d.ts +66 -100
- package/dist/index.mjs +232 -143
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as _structyl_core from '@structyl/core';
|
|
3
|
-
import { PointerDownOutsideEvent, FocusOutsideEvent } from '@structyl/core';
|
|
3
|
+
import { PointerDownOutsideEvent, FocusOutsideEvent, Primitive } from '@structyl/core';
|
|
4
4
|
|
|
5
5
|
interface ButtonProps$1 extends React.ComponentPropsWithoutRef<'button'> {
|
|
6
6
|
asChild?: boolean;
|
|
@@ -1599,8 +1599,7 @@ declare const Timeline: {
|
|
|
1599
1599
|
asChild?: boolean;
|
|
1600
1600
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
1601
1601
|
};
|
|
1602
|
-
interface ClickAwayListenerProps {
|
|
1603
|
-
children?: React.ReactNode;
|
|
1602
|
+
interface ClickAwayListenerProps extends React.ComponentPropsWithoutRef<'span'> {
|
|
1604
1603
|
onClickAway?: (event: MouseEvent | TouchEvent) => void;
|
|
1605
1604
|
}
|
|
1606
1605
|
declare const ClickAwayListener: React.ForwardRefExoticComponent<ClickAwayListenerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -1610,13 +1609,10 @@ declare const NoSsr: React.FC<{
|
|
|
1610
1609
|
defer?: boolean;
|
|
1611
1610
|
}>;
|
|
1612
1611
|
declare const Portal$3: React.ForwardRefExoticComponent<_structyl_core.PortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
1613
|
-
interface PopperProps {
|
|
1612
|
+
interface PopperProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
1614
1613
|
open: boolean;
|
|
1615
1614
|
anchorEl?: Element | null | (() => Element | null);
|
|
1616
1615
|
placement?: 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
1617
|
-
children?: React.ReactNode;
|
|
1618
|
-
className?: string;
|
|
1619
|
-
style?: React.CSSProperties;
|
|
1620
1616
|
keepMounted?: boolean;
|
|
1621
1617
|
disablePortal?: boolean;
|
|
1622
1618
|
container?: Element | DocumentFragment | null;
|
|
@@ -1872,21 +1868,23 @@ declare const Root$f: React.ForwardRefExoticComponent<CalendarRootProps & React.
|
|
|
1872
1868
|
declare const Header$1: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1873
1869
|
declare const PreviousButton: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
1874
1870
|
declare const NextButton: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
1875
|
-
|
|
1871
|
+
interface CalendarHeadingProps extends React.ComponentPropsWithoutRef<typeof Primitive.span> {
|
|
1876
1872
|
format?: Intl.DateTimeFormatOptions;
|
|
1877
1873
|
locale?: string;
|
|
1878
|
-
}
|
|
1874
|
+
}
|
|
1875
|
+
declare const Heading: React.ForwardRefExoticComponent<CalendarHeadingProps & React.RefAttributes<HTMLSpanElement>>;
|
|
1879
1876
|
declare const Grid$1: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
|
|
1880
|
-
|
|
1877
|
+
interface CalendarGridHeadProps extends React.ComponentPropsWithoutRef<'thead'> {
|
|
1881
1878
|
locale?: string;
|
|
1882
1879
|
format?: 'narrow' | 'short' | 'long';
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1880
|
+
}
|
|
1881
|
+
declare const GridHead: React.ForwardRefExoticComponent<CalendarGridHeadProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
1882
|
+
interface GridBodyProps extends Omit<React.ComponentPropsWithoutRef<'tbody'>, 'children'> {
|
|
1885
1883
|
children: (date: Date, props: {
|
|
1886
1884
|
isOutsideMonth: boolean;
|
|
1887
1885
|
}) => React.ReactNode;
|
|
1888
1886
|
}
|
|
1889
|
-
declare const GridBody: React.
|
|
1887
|
+
declare const GridBody: React.ForwardRefExoticComponent<GridBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
1890
1888
|
interface CalendarDayProps extends React.ComponentPropsWithoutRef<'button'> {
|
|
1891
1889
|
date: Date;
|
|
1892
1890
|
isOutsideMonth?: boolean;
|
|
@@ -2801,19 +2799,20 @@ declare const Root$9: React.ForwardRefExoticComponent<FileUploadRootProps & Reac
|
|
|
2801
2799
|
declare const Dropzone: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
2802
2800
|
declare const Input$3: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
2803
2801
|
declare const List: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
2804
|
-
|
|
2802
|
+
interface FileUploadItemProps extends React.ComponentPropsWithoutRef<'li'> {
|
|
2805
2803
|
file: File;
|
|
2806
|
-
|
|
2807
|
-
|
|
2804
|
+
}
|
|
2805
|
+
declare const Item$2: React.ForwardRefExoticComponent<FileUploadItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
2808
2806
|
declare const Trigger$1: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
2809
2807
|
declare const Clear: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
2810
2808
|
|
|
2811
2809
|
declare const index$a_Clear: typeof Clear;
|
|
2812
2810
|
declare const index$a_Dropzone: typeof Dropzone;
|
|
2811
|
+
type index$a_FileUploadItemProps = FileUploadItemProps;
|
|
2813
2812
|
type index$a_FileUploadRootProps = FileUploadRootProps;
|
|
2814
2813
|
declare const index$a_List: typeof List;
|
|
2815
2814
|
declare namespace index$a {
|
|
2816
|
-
export { index$a_Clear as Clear, index$a_Dropzone as Dropzone, type index$a_FileUploadRootProps as FileUploadRootProps, Input$3 as Input, Item$2 as Item, index$a_List as List, Root$9 as Root, Trigger$1 as Trigger };
|
|
2815
|
+
export { index$a_Clear as Clear, index$a_Dropzone as Dropzone, type index$a_FileUploadItemProps as FileUploadItemProps, type index$a_FileUploadRootProps as FileUploadRootProps, Input$3 as Input, Item$2 as Item, index$a_List as List, Root$9 as Root, Trigger$1 as Trigger };
|
|
2817
2816
|
}
|
|
2818
2817
|
|
|
2819
2818
|
interface ScrollAreaRootProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
@@ -2979,8 +2978,7 @@ declare const Root$3: React.ForwardRefExoticComponent<TagsInputRootProps & React
|
|
|
2979
2978
|
declare const Input$1: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
2980
2979
|
declare const Tag: React.FC<{
|
|
2981
2980
|
index: number;
|
|
2982
|
-
|
|
2983
|
-
}>;
|
|
2981
|
+
} & React.ComponentPropsWithoutRef<typeof Primitive.span>>;
|
|
2984
2982
|
declare const Items$1: React.FC<{
|
|
2985
2983
|
children: (tag: string, index: number) => React.ReactNode;
|
|
2986
2984
|
}>;
|
|
@@ -3015,20 +3013,21 @@ declare const Suggestions: React.FC<SuggestionsProps>;
|
|
|
3015
3013
|
declare const Items: React.FC<{
|
|
3016
3014
|
children: (item: MentionSuggestion, index: number, highlighted: boolean) => React.ReactNode;
|
|
3017
3015
|
}>;
|
|
3018
|
-
|
|
3016
|
+
interface MentionsItemProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
3019
3017
|
suggestion: MentionSuggestion;
|
|
3020
3018
|
index: number;
|
|
3021
|
-
|
|
3022
|
-
|
|
3019
|
+
}
|
|
3020
|
+
declare const Item: React.FC<MentionsItemProps>;
|
|
3023
3021
|
|
|
3024
3022
|
declare const index$2_Item: typeof Item;
|
|
3025
3023
|
declare const index$2_Items: typeof Items;
|
|
3026
3024
|
type index$2_MentionSuggestion = MentionSuggestion;
|
|
3025
|
+
type index$2_MentionsItemProps = MentionsItemProps;
|
|
3027
3026
|
type index$2_MentionsRootProps = MentionsRootProps;
|
|
3028
3027
|
declare const index$2_Suggestions: typeof Suggestions;
|
|
3029
3028
|
type index$2_SuggestionsProps = SuggestionsProps;
|
|
3030
3029
|
declare namespace index$2 {
|
|
3031
|
-
export { index$2_Item as Item, index$2_Items as Items, type index$2_MentionSuggestion as MentionSuggestion, type index$2_MentionsRootProps as MentionsRootProps, Root$2 as Root, index$2_Suggestions as Suggestions, type index$2_SuggestionsProps as SuggestionsProps, Textarea$1 as Textarea };
|
|
3030
|
+
export { index$2_Item as Item, index$2_Items as Items, type index$2_MentionSuggestion as MentionSuggestion, type index$2_MentionsItemProps as MentionsItemProps, type index$2_MentionsRootProps as MentionsRootProps, Root$2 as Root, index$2_Suggestions as Suggestions, type index$2_SuggestionsProps as SuggestionsProps, Textarea$1 as Textarea };
|
|
3032
3031
|
}
|
|
3033
3032
|
|
|
3034
3033
|
interface CardRootProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
@@ -3202,7 +3201,7 @@ interface HighlightScope {
|
|
|
3202
3201
|
/** Which items to fade on hover */
|
|
3203
3202
|
fade?: 'none' | 'series' | 'global';
|
|
3204
3203
|
}
|
|
3205
|
-
interface ChartRootProps {
|
|
3204
|
+
interface ChartRootProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3206
3205
|
/** Data array for the chart */
|
|
3207
3206
|
data: object[];
|
|
3208
3207
|
/** Total width of the SVG (omit for responsive) */
|
|
@@ -3211,31 +3210,27 @@ interface ChartRootProps {
|
|
|
3211
3210
|
height?: number;
|
|
3212
3211
|
/** Outer margins around the plot area */
|
|
3213
3212
|
margin?: Partial<ChartMargin>;
|
|
3214
|
-
/** CSS class on the wrapper div */
|
|
3215
|
-
className?: string;
|
|
3216
3213
|
/** Accessible label for screen readers */
|
|
3217
3214
|
accessibilityLabel?: string;
|
|
3218
3215
|
/** Enable colorblind-accessible pattern fills */
|
|
3219
3216
|
accessibilityMode?: boolean;
|
|
3220
3217
|
children?: React.ReactNode;
|
|
3221
3218
|
}
|
|
3222
|
-
interface ChartPieRootProps {
|
|
3219
|
+
interface ChartPieRootProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3223
3220
|
data: object[];
|
|
3224
3221
|
width?: number;
|
|
3225
3222
|
height?: number;
|
|
3226
|
-
className?: string;
|
|
3227
3223
|
accessibilityLabel?: string;
|
|
3228
3224
|
children?: React.ReactNode;
|
|
3229
3225
|
}
|
|
3230
|
-
interface ChartRadarRootProps {
|
|
3226
|
+
interface ChartRadarRootProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3231
3227
|
data: object[];
|
|
3232
3228
|
width?: number;
|
|
3233
3229
|
height?: number;
|
|
3234
|
-
className?: string;
|
|
3235
3230
|
accessibilityLabel?: string;
|
|
3236
3231
|
children?: React.ReactNode;
|
|
3237
3232
|
}
|
|
3238
|
-
interface ChartXAxisProps {
|
|
3233
|
+
interface ChartXAxisProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3239
3234
|
/** Key in data objects for x values */
|
|
3240
3235
|
dataKey?: string;
|
|
3241
3236
|
/** Axis label */
|
|
@@ -3250,10 +3245,8 @@ interface ChartXAxisProps {
|
|
|
3250
3245
|
hideTicks?: boolean;
|
|
3251
3246
|
/** Scale type */
|
|
3252
3247
|
scale?: AxisScale;
|
|
3253
|
-
/** CSS class */
|
|
3254
|
-
className?: string;
|
|
3255
3248
|
}
|
|
3256
|
-
interface ChartYAxisProps {
|
|
3249
|
+
interface ChartYAxisProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3257
3250
|
/** Axis label */
|
|
3258
3251
|
label?: string;
|
|
3259
3252
|
/** Tick count hint */
|
|
@@ -3266,19 +3259,16 @@ interface ChartYAxisProps {
|
|
|
3266
3259
|
hideLine?: boolean;
|
|
3267
3260
|
/** Hide ticks */
|
|
3268
3261
|
hideTicks?: boolean;
|
|
3269
|
-
/** CSS class */
|
|
3270
|
-
className?: string;
|
|
3271
3262
|
}
|
|
3272
|
-
interface ChartGridProps {
|
|
3263
|
+
interface ChartGridProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3273
3264
|
/** Show horizontal lines */
|
|
3274
3265
|
horizontal?: boolean;
|
|
3275
3266
|
/** Show vertical lines */
|
|
3276
3267
|
vertical?: boolean;
|
|
3277
3268
|
/** Stroke color/class override */
|
|
3278
3269
|
strokeDasharray?: string;
|
|
3279
|
-
className?: string;
|
|
3280
3270
|
}
|
|
3281
|
-
interface ChartBarProps {
|
|
3271
|
+
interface ChartBarProps extends Omit<React.ComponentPropsWithoutRef<'g'>, 'onClick'> {
|
|
3282
3272
|
/** Key in data for bar values */
|
|
3283
3273
|
dataKey: string;
|
|
3284
3274
|
/** Bar fill color (falls back to palette) */
|
|
@@ -3301,10 +3291,9 @@ interface ChartBarProps {
|
|
|
3301
3291
|
highlightScope?: HighlightScope;
|
|
3302
3292
|
/** Click handler per bar rect */
|
|
3303
3293
|
onClick?: (entry: Record<string, unknown>, index: number) => void;
|
|
3304
|
-
className?: string;
|
|
3305
3294
|
}
|
|
3306
3295
|
type MarkShape = 'circle' | 'square' | 'diamond' | 'cross' | 'star' | 'triangle';
|
|
3307
|
-
interface ChartLineProps {
|
|
3296
|
+
interface ChartLineProps extends Omit<React.ComponentPropsWithoutRef<'g'>, 'onClick'> {
|
|
3308
3297
|
dataKey: string;
|
|
3309
3298
|
color?: string;
|
|
3310
3299
|
name?: string;
|
|
@@ -3326,7 +3315,7 @@ interface ChartLineProps {
|
|
|
3326
3315
|
onClick?: (entry: Record<string, unknown>, index: number) => void;
|
|
3327
3316
|
className?: string;
|
|
3328
3317
|
}
|
|
3329
|
-
interface ChartAreaProps {
|
|
3318
|
+
interface ChartAreaProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3330
3319
|
dataKey: string;
|
|
3331
3320
|
color?: string;
|
|
3332
3321
|
name?: string;
|
|
@@ -3354,7 +3343,7 @@ interface ChartAreaProps {
|
|
|
3354
3343
|
className?: string;
|
|
3355
3344
|
}
|
|
3356
3345
|
type ScatterMarkerShape = 'circle' | 'square' | 'diamond' | 'cross' | 'triangle';
|
|
3357
|
-
interface ChartScatterProps {
|
|
3346
|
+
interface ChartScatterProps extends Omit<React.ComponentPropsWithoutRef<'g'>, 'onClick'> {
|
|
3358
3347
|
xKey: string;
|
|
3359
3348
|
yKey: string;
|
|
3360
3349
|
name?: string;
|
|
@@ -3376,7 +3365,7 @@ interface ChartBubbleProps extends ChartScatterProps {
|
|
|
3376
3365
|
/** Max rendered bubble radius */
|
|
3377
3366
|
maxRadius?: number;
|
|
3378
3367
|
}
|
|
3379
|
-
interface ChartPieProps {
|
|
3368
|
+
interface ChartPieProps extends Omit<React.ComponentPropsWithoutRef<'g'>, 'onClick'> {
|
|
3380
3369
|
dataKey: string;
|
|
3381
3370
|
nameKey?: string;
|
|
3382
3371
|
/** Inner radius for donut (0 = pie) */
|
|
@@ -3418,7 +3407,7 @@ interface ChartPieProps {
|
|
|
3418
3407
|
onClick?: (entry: Record<string, unknown>, index: number) => void;
|
|
3419
3408
|
className?: string;
|
|
3420
3409
|
}
|
|
3421
|
-
interface ChartPolarGridProps {
|
|
3410
|
+
interface ChartPolarGridProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3422
3411
|
/** Number of rings */
|
|
3423
3412
|
rings?: number;
|
|
3424
3413
|
/**
|
|
@@ -3429,11 +3418,10 @@ interface ChartPolarGridProps {
|
|
|
3429
3418
|
shape?: 'circular' | 'sharp';
|
|
3430
3419
|
className?: string;
|
|
3431
3420
|
}
|
|
3432
|
-
interface ChartPolarAngleAxisProps {
|
|
3421
|
+
interface ChartPolarAngleAxisProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3433
3422
|
dataKey: string;
|
|
3434
|
-
className?: string;
|
|
3435
3423
|
}
|
|
3436
|
-
interface ChartRadarProps {
|
|
3424
|
+
interface ChartRadarProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3437
3425
|
dataKey: string;
|
|
3438
3426
|
color?: string;
|
|
3439
3427
|
name?: string;
|
|
@@ -3446,7 +3434,7 @@ interface ChartRadarProps {
|
|
|
3446
3434
|
dot?: boolean;
|
|
3447
3435
|
className?: string;
|
|
3448
3436
|
}
|
|
3449
|
-
interface ChartHeatmapProps {
|
|
3437
|
+
interface ChartHeatmapProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3450
3438
|
data: object[];
|
|
3451
3439
|
xKey: string;
|
|
3452
3440
|
yKey: string;
|
|
@@ -3467,7 +3455,7 @@ interface TreemapNode {
|
|
|
3467
3455
|
children?: TreemapNode[];
|
|
3468
3456
|
color?: string;
|
|
3469
3457
|
}
|
|
3470
|
-
interface ChartTreemapProps {
|
|
3458
|
+
interface ChartTreemapProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3471
3459
|
data: TreemapNode[];
|
|
3472
3460
|
width?: number;
|
|
3473
3461
|
height?: number;
|
|
@@ -3483,7 +3471,7 @@ interface FunnelEntry {
|
|
|
3483
3471
|
value: number;
|
|
3484
3472
|
color?: string;
|
|
3485
3473
|
}
|
|
3486
|
-
interface ChartFunnelProps {
|
|
3474
|
+
interface ChartFunnelProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3487
3475
|
data: FunnelEntry[];
|
|
3488
3476
|
width?: number;
|
|
3489
3477
|
height?: number;
|
|
@@ -3509,7 +3497,7 @@ interface ChartFunnelProps {
|
|
|
3509
3497
|
accessibilityLabel?: string;
|
|
3510
3498
|
onSegmentClick?: (entry: FunnelEntry, index: number) => void;
|
|
3511
3499
|
}
|
|
3512
|
-
interface ChartGaugeProps {
|
|
3500
|
+
interface ChartGaugeProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3513
3501
|
value: number;
|
|
3514
3502
|
min?: number;
|
|
3515
3503
|
max?: number;
|
|
@@ -3549,7 +3537,7 @@ interface GaugeContextValue {
|
|
|
3549
3537
|
* Root wrapper for gauge composition.
|
|
3550
3538
|
* Provides a shared GaugeContext consumed by GaugeValueArc and GaugeReferenceArc.
|
|
3551
3539
|
*/
|
|
3552
|
-
interface ChartGaugeContainerProps {
|
|
3540
|
+
interface ChartGaugeContainerProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3553
3541
|
value: number;
|
|
3554
3542
|
min?: number;
|
|
3555
3543
|
max?: number;
|
|
@@ -3568,18 +3556,16 @@ interface ChartGaugeContainerProps {
|
|
|
3568
3556
|
children?: React.ReactNode;
|
|
3569
3557
|
}
|
|
3570
3558
|
/** The colored value arc inside a GaugeContainer */
|
|
3571
|
-
interface ChartGaugeValueArcProps {
|
|
3559
|
+
interface ChartGaugeValueArcProps extends React.ComponentPropsWithoutRef<'path'> {
|
|
3572
3560
|
/** Fill color — defaults to chart-1 CSS variable */
|
|
3573
3561
|
color?: string;
|
|
3574
3562
|
/** Color stops: [[percentage, color], ...] */
|
|
3575
3563
|
colorStops?: [number, string][];
|
|
3576
|
-
className?: string;
|
|
3577
3564
|
}
|
|
3578
3565
|
/** The gray background track arc inside a GaugeContainer */
|
|
3579
|
-
interface ChartGaugeReferenceArcProps {
|
|
3566
|
+
interface ChartGaugeReferenceArcProps extends React.ComponentPropsWithoutRef<'path'> {
|
|
3580
3567
|
/** Fill color for the background track */
|
|
3581
3568
|
color?: string;
|
|
3582
|
-
className?: string;
|
|
3583
3569
|
}
|
|
3584
3570
|
interface OhlcEntry {
|
|
3585
3571
|
date: string | number;
|
|
@@ -3589,7 +3575,7 @@ interface OhlcEntry {
|
|
|
3589
3575
|
close: number;
|
|
3590
3576
|
volume?: number;
|
|
3591
3577
|
}
|
|
3592
|
-
interface ChartCandlestickProps {
|
|
3578
|
+
interface ChartCandlestickProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3593
3579
|
data: OhlcEntry[];
|
|
3594
3580
|
width?: number;
|
|
3595
3581
|
height?: number;
|
|
@@ -3601,11 +3587,9 @@ interface ChartCandlestickProps {
|
|
|
3601
3587
|
className?: string;
|
|
3602
3588
|
accessibilityLabel?: string;
|
|
3603
3589
|
}
|
|
3604
|
-
interface ChartTooltipProps {
|
|
3590
|
+
interface ChartTooltipProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'content'> {
|
|
3605
3591
|
/** Fully replace the tooltip — receives the current tooltip state */
|
|
3606
3592
|
content?: (state: TooltipState) => React.ReactNode;
|
|
3607
|
-
/** Extra class on the tooltip wrapper */
|
|
3608
|
-
className?: string;
|
|
3609
3593
|
/** Override background color */
|
|
3610
3594
|
background?: string;
|
|
3611
3595
|
/** Override border color */
|
|
@@ -3622,7 +3606,7 @@ interface ChartLegendEntry {
|
|
|
3622
3606
|
color: string;
|
|
3623
3607
|
dataKey: string;
|
|
3624
3608
|
}
|
|
3625
|
-
interface ChartLegendProps {
|
|
3609
|
+
interface ChartLegendProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'content'> {
|
|
3626
3610
|
/** Where to position the legend relative to the chart */
|
|
3627
3611
|
position?: LegendPosition;
|
|
3628
3612
|
/** Fully replace legend rendering */
|
|
@@ -3633,8 +3617,6 @@ interface ChartLegendProps {
|
|
|
3633
3617
|
iconType?: 'square' | 'circle' | 'line';
|
|
3634
3618
|
/** Icon size in px, default 12 */
|
|
3635
3619
|
iconSize?: number;
|
|
3636
|
-
/** Extra class on the legend wrapper */
|
|
3637
|
-
className?: string;
|
|
3638
3620
|
}
|
|
3639
3621
|
interface CartesianContextValue {
|
|
3640
3622
|
data: Record<string, unknown>[];
|
|
@@ -3671,7 +3653,7 @@ interface RadarContextValue {
|
|
|
3671
3653
|
angleKeys: string[];
|
|
3672
3654
|
palette: string[];
|
|
3673
3655
|
}
|
|
3674
|
-
interface ChartSparkLineProps {
|
|
3656
|
+
interface ChartSparkLineProps extends Omit<React.ComponentPropsWithoutRef<'svg'>, 'width' | 'height'> {
|
|
3675
3657
|
/** Array of numeric values */
|
|
3676
3658
|
data: number[];
|
|
3677
3659
|
/** 'line' or 'bar' sparkline */
|
|
@@ -3697,7 +3679,7 @@ interface ChartSparkLineProps {
|
|
|
3697
3679
|
/** CSS class on the SVG element */
|
|
3698
3680
|
className?: string;
|
|
3699
3681
|
}
|
|
3700
|
-
interface ChartRangeBarProps {
|
|
3682
|
+
interface ChartRangeBarProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3701
3683
|
/** Data key for the low value */
|
|
3702
3684
|
lowKey: string;
|
|
3703
3685
|
/** Data key for the high value */
|
|
@@ -3708,9 +3690,8 @@ interface ChartRangeBarProps {
|
|
|
3708
3690
|
name?: string;
|
|
3709
3691
|
/** Corner radius */
|
|
3710
3692
|
radius?: number;
|
|
3711
|
-
className?: string;
|
|
3712
3693
|
}
|
|
3713
|
-
interface ChartReferenceLineProps {
|
|
3694
|
+
interface ChartReferenceLineProps extends Omit<React.ComponentPropsWithoutRef<'g'>, 'x' | 'y'> {
|
|
3714
3695
|
/** Horizontal reference value (y) */
|
|
3715
3696
|
y?: number;
|
|
3716
3697
|
/** Vertical reference value (x) */
|
|
@@ -3721,9 +3702,8 @@ interface ChartReferenceLineProps {
|
|
|
3721
3702
|
stroke?: string;
|
|
3722
3703
|
/** Dash pattern */
|
|
3723
3704
|
strokeDasharray?: string;
|
|
3724
|
-
className?: string;
|
|
3725
3705
|
}
|
|
3726
|
-
interface ChartReferenceAreaProps {
|
|
3706
|
+
interface ChartReferenceAreaProps extends Omit<React.ComponentPropsWithoutRef<'g'>, 'x1' | 'x2' | 'y1' | 'y2'> {
|
|
3727
3707
|
/** Low y bound */
|
|
3728
3708
|
y1?: number;
|
|
3729
3709
|
/** High y bound */
|
|
@@ -3736,19 +3716,17 @@ interface ChartReferenceAreaProps {
|
|
|
3736
3716
|
fill?: string;
|
|
3737
3717
|
/** Fill opacity */
|
|
3738
3718
|
fillOpacity?: number;
|
|
3739
|
-
className?: string;
|
|
3740
3719
|
}
|
|
3741
|
-
interface ChartRadialBarRootProps {
|
|
3720
|
+
interface ChartRadialBarRootProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3742
3721
|
data: object[];
|
|
3743
3722
|
width?: number;
|
|
3744
3723
|
height?: number;
|
|
3745
3724
|
/** Gap between bars in px */
|
|
3746
3725
|
gap?: number;
|
|
3747
|
-
className?: string;
|
|
3748
3726
|
accessibilityLabel?: string;
|
|
3749
3727
|
children?: React.ReactNode;
|
|
3750
3728
|
}
|
|
3751
|
-
interface ChartRadialBarProps {
|
|
3729
|
+
interface ChartRadialBarProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3752
3730
|
/** Data key for arc length values */
|
|
3753
3731
|
dataKey: string;
|
|
3754
3732
|
/** Key for slice labels */
|
|
@@ -3771,12 +3749,11 @@ interface WaterfallEntry {
|
|
|
3771
3749
|
value: number;
|
|
3772
3750
|
color?: string;
|
|
3773
3751
|
}
|
|
3774
|
-
interface ChartWaterfallProps {
|
|
3752
|
+
interface ChartWaterfallProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3775
3753
|
data: WaterfallEntry[];
|
|
3776
3754
|
width?: number;
|
|
3777
3755
|
height?: number;
|
|
3778
3756
|
margin?: Partial<ChartMargin>;
|
|
3779
|
-
className?: string;
|
|
3780
3757
|
accessibilityLabel?: string;
|
|
3781
3758
|
}
|
|
3782
3759
|
interface SankeyNode {
|
|
@@ -3788,7 +3765,7 @@ interface SankeyLink {
|
|
|
3788
3765
|
target: string;
|
|
3789
3766
|
value: number;
|
|
3790
3767
|
}
|
|
3791
|
-
interface ChartSankeyProps {
|
|
3768
|
+
interface ChartSankeyProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3792
3769
|
nodes: SankeyNode[];
|
|
3793
3770
|
links: SankeyLink[];
|
|
3794
3771
|
width?: number;
|
|
@@ -3802,7 +3779,7 @@ interface ChartSankeyProps {
|
|
|
3802
3779
|
className?: string;
|
|
3803
3780
|
accessibilityLabel?: string;
|
|
3804
3781
|
}
|
|
3805
|
-
interface ChartPyramidProps {
|
|
3782
|
+
interface ChartPyramidProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3806
3783
|
data: Array<{
|
|
3807
3784
|
name: string;
|
|
3808
3785
|
value: number;
|
|
@@ -3811,7 +3788,6 @@ interface ChartPyramidProps {
|
|
|
3811
3788
|
width?: number;
|
|
3812
3789
|
height?: number;
|
|
3813
3790
|
labelPosition?: LabelPosition;
|
|
3814
|
-
className?: string;
|
|
3815
3791
|
accessibilityLabel?: string;
|
|
3816
3792
|
onSegmentClick?: (entry: {
|
|
3817
3793
|
name: string;
|
|
@@ -3827,23 +3803,21 @@ interface GanttTask {
|
|
|
3827
3803
|
color?: string;
|
|
3828
3804
|
group?: string;
|
|
3829
3805
|
}
|
|
3830
|
-
interface ChartGanttProps {
|
|
3806
|
+
interface ChartGanttProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3831
3807
|
tasks: GanttTask[];
|
|
3832
3808
|
width?: number;
|
|
3833
3809
|
height?: number;
|
|
3834
3810
|
margin?: Partial<ChartMargin>;
|
|
3835
|
-
className?: string;
|
|
3836
3811
|
accessibilityLabel?: string;
|
|
3837
3812
|
}
|
|
3838
|
-
interface ChartRadialLineRootProps {
|
|
3813
|
+
interface ChartRadialLineRootProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3839
3814
|
data: object[];
|
|
3840
3815
|
width?: number;
|
|
3841
3816
|
height?: number;
|
|
3842
|
-
className?: string;
|
|
3843
3817
|
accessibilityLabel?: string;
|
|
3844
3818
|
children?: React.ReactNode;
|
|
3845
3819
|
}
|
|
3846
|
-
interface ChartRadialLineProps {
|
|
3820
|
+
interface ChartRadialLineProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3847
3821
|
dataKey: string;
|
|
3848
3822
|
nameKey?: string;
|
|
3849
3823
|
color?: string;
|
|
@@ -3856,7 +3830,7 @@ interface ChartRadialLineProps {
|
|
|
3856
3830
|
strokeWidth?: number;
|
|
3857
3831
|
className?: string;
|
|
3858
3832
|
}
|
|
3859
|
-
interface ChartHistogramProps {
|
|
3833
|
+
interface ChartHistogramProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3860
3834
|
data: number[];
|
|
3861
3835
|
bins?: number;
|
|
3862
3836
|
color?: string;
|
|
@@ -3864,7 +3838,6 @@ interface ChartHistogramProps {
|
|
|
3864
3838
|
height?: number;
|
|
3865
3839
|
margin?: Partial<ChartMargin>;
|
|
3866
3840
|
showGrid?: boolean;
|
|
3867
|
-
className?: string;
|
|
3868
3841
|
accessibilityLabel?: string;
|
|
3869
3842
|
}
|
|
3870
3843
|
interface BoxplotEntry {
|
|
@@ -3877,13 +3850,12 @@ interface BoxplotEntry {
|
|
|
3877
3850
|
color?: string;
|
|
3878
3851
|
outliers?: number[];
|
|
3879
3852
|
}
|
|
3880
|
-
interface ChartBoxplotProps {
|
|
3853
|
+
interface ChartBoxplotProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3881
3854
|
data: BoxplotEntry[];
|
|
3882
3855
|
width?: number;
|
|
3883
3856
|
height?: number;
|
|
3884
3857
|
margin?: Partial<ChartMargin>;
|
|
3885
3858
|
orientation?: 'vertical' | 'horizontal';
|
|
3886
|
-
className?: string;
|
|
3887
3859
|
accessibilityLabel?: string;
|
|
3888
3860
|
}
|
|
3889
3861
|
interface SunburstNode {
|
|
@@ -3892,35 +3864,32 @@ interface SunburstNode {
|
|
|
3892
3864
|
children?: SunburstNode[];
|
|
3893
3865
|
color?: string;
|
|
3894
3866
|
}
|
|
3895
|
-
interface ChartSunburstProps {
|
|
3867
|
+
interface ChartSunburstProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3896
3868
|
data: SunburstNode;
|
|
3897
3869
|
width?: number;
|
|
3898
3870
|
height?: number;
|
|
3899
3871
|
innerRadius?: number;
|
|
3900
|
-
className?: string;
|
|
3901
3872
|
accessibilityLabel?: string;
|
|
3902
3873
|
onNodeClick?: (node: SunburstNode) => void;
|
|
3903
3874
|
}
|
|
3904
|
-
interface ChartChordProps {
|
|
3875
|
+
interface ChartChordProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3905
3876
|
data: number[][];
|
|
3906
3877
|
labels: string[];
|
|
3907
3878
|
colors?: string[];
|
|
3908
3879
|
width?: number;
|
|
3909
3880
|
height?: number;
|
|
3910
3881
|
padAngle?: number;
|
|
3911
|
-
className?: string;
|
|
3912
3882
|
accessibilityLabel?: string;
|
|
3913
3883
|
}
|
|
3914
|
-
interface ChartRangeAreaProps {
|
|
3884
|
+
interface ChartRangeAreaProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3915
3885
|
lowKey: string;
|
|
3916
3886
|
highKey: string;
|
|
3917
3887
|
color?: string;
|
|
3918
3888
|
name?: string;
|
|
3919
3889
|
fillOpacity?: number;
|
|
3920
3890
|
curve?: CurveType;
|
|
3921
|
-
className?: string;
|
|
3922
3891
|
}
|
|
3923
|
-
interface ChartLinearGaugeProps {
|
|
3892
|
+
interface ChartLinearGaugeProps extends Omit<React.ComponentPropsWithoutRef<'div'>, 'width' | 'height'> {
|
|
3924
3893
|
value: number;
|
|
3925
3894
|
min?: number;
|
|
3926
3895
|
max?: number;
|
|
@@ -3931,18 +3900,15 @@ interface ChartLinearGaugeProps {
|
|
|
3931
3900
|
showLabel?: boolean;
|
|
3932
3901
|
label?: string | ((v: number, min: number, max: number) => string);
|
|
3933
3902
|
cornerRadius?: number;
|
|
3934
|
-
className?: string;
|
|
3935
3903
|
accessibilityLabel?: string;
|
|
3936
3904
|
}
|
|
3937
|
-
interface ChartPieCenterLabelProps {
|
|
3905
|
+
interface ChartPieCenterLabelProps extends React.ComponentPropsWithoutRef<'g'> {
|
|
3938
3906
|
children: React.ReactNode;
|
|
3939
|
-
className?: string;
|
|
3940
3907
|
}
|
|
3941
|
-
interface ChartGaugePointerProps {
|
|
3908
|
+
interface ChartGaugePointerProps extends Omit<React.ComponentPropsWithoutRef<'g'>, 'width'> {
|
|
3942
3909
|
color?: string;
|
|
3943
3910
|
length?: number;
|
|
3944
3911
|
width?: number;
|
|
3945
|
-
className?: string;
|
|
3946
3912
|
}
|
|
3947
3913
|
|
|
3948
3914
|
/**
|