@economic/taco 2.56.0 → 2.57.0-charts.1
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/taco.cjs +490 -438
- package/dist/taco.cjs.map +1 -1
- package/dist/taco.css +12 -6
- package/dist/taco.d.ts +111 -72
- package/dist/taco.js +490 -438
- package/dist/taco.js.map +1 -1
- package/package.json +2 -2
package/dist/taco.css
CHANGED
@@ -181,22 +181,28 @@ table.yt-table tbody.yt-table__body tr.yt-table__row td.yt-table__cell {
|
|
181
181
|
@apply opacity-100;
|
182
182
|
}
|
183
183
|
}
|
184
|
+
|
184
185
|
.recharts-cartesian-axis line,
|
185
|
-
.recharts-cartesian-grid-horizontal line
|
186
|
-
|
186
|
+
.recharts-cartesian-grid-horizontal line,
|
187
|
+
.recharts-cartesian-grid-vertical line {
|
188
|
+
@apply !stroke-grey-100;
|
189
|
+
}
|
190
|
+
|
191
|
+
.recharts-cartesian-axis-tick-value {
|
192
|
+
@apply !fill-grey-700;
|
187
193
|
}
|
188
194
|
|
189
195
|
.recharts-tooltip-cursor {
|
190
|
-
fill
|
196
|
+
@apply !fill-transparent;
|
191
197
|
}
|
192
198
|
|
193
199
|
.recharts-legend-wrapper {
|
194
|
-
left
|
195
|
-
width: 100% !important;
|
200
|
+
@apply !left-0 !w-full;
|
196
201
|
}
|
197
202
|
|
203
|
+
.recharts-sector,
|
198
204
|
.recharts-wrapper > svg g {
|
199
|
-
outline
|
205
|
+
@apply !outline-none;
|
200
206
|
}
|
201
207
|
[data-taco='badge'] > [data-taco='spinner'] {
|
202
208
|
@apply ml-2 h-3 w-3;
|
package/dist/taco.d.ts
CHANGED
@@ -153,23 +153,20 @@ export declare type Align = 'start' | 'center' | 'end';
|
|
153
153
|
|
154
154
|
export declare type Appearance = 'default' | 'primary' | 'danger' | 'ghost' | 'discrete' | 'transparent';
|
155
155
|
|
156
|
-
export declare
|
157
|
-
<TType = unknown>(externalProps: AreaChartProps<TType>): default_2.JSX.Element;
|
158
|
-
Area: (_: AreaChartBarProps<any>) => null;
|
159
|
-
};
|
156
|
+
export declare function AreaChart<TData extends object>(props: AreaChartProps<TData>): default_2.JSX.Element;
|
160
157
|
|
161
|
-
declare
|
162
|
-
|
163
|
-
|
164
|
-
label?: string;
|
165
|
-
stackId?: string;
|
166
|
-
};
|
158
|
+
export declare namespace AreaChart {
|
159
|
+
var Area: <TData extends object>(_: AreaChartAreaProps<TData>) => JSX.Element | null;
|
160
|
+
}
|
167
161
|
|
168
|
-
declare
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
162
|
+
export declare interface AreaChartAreaProps<TData extends object> extends ChartChildProps<TData> {
|
163
|
+
}
|
164
|
+
|
165
|
+
export declare interface AreaChartProps<TData extends object> extends ChartProps<TData>, default_2.ComponentProps<'div'> {
|
166
|
+
showDots?: boolean;
|
167
|
+
stacked?: boolean | 'expand';
|
168
|
+
type?: CurveType;
|
169
|
+
}
|
173
170
|
|
174
171
|
declare const AVAILABLE_COLORS: readonly ["green", "yellow", "red", "blue", "purple", "brown", "pink", "orange", "grey", "transparent"];
|
175
172
|
|
@@ -233,24 +230,20 @@ export declare type BannerTexts = {
|
|
233
230
|
close: string;
|
234
231
|
};
|
235
232
|
|
236
|
-
export declare
|
237
|
-
<TType = unknown>(externalProps: BarChartProps<TType>): default_2.JSX.Element;
|
238
|
-
Bar: (_: BarChartBarProps<any>) => null;
|
239
|
-
};
|
233
|
+
export declare function BarChart<TData extends object>(props: BarChartProps<TData>): default_2.JSX.Element;
|
240
234
|
|
241
|
-
declare
|
242
|
-
|
243
|
-
|
244
|
-
label?: string;
|
245
|
-
stackId?: string;
|
246
|
-
};
|
235
|
+
export declare namespace BarChart {
|
236
|
+
var Bar: <TData extends object>(_: BarChartBarProps<TData>) => JSX.Element | null;
|
237
|
+
}
|
247
238
|
|
248
|
-
declare
|
249
|
-
|
250
|
-
|
251
|
-
|
239
|
+
export declare interface BarChartBarProps<TData extends object> extends ChartChildProps<TData> {
|
240
|
+
}
|
241
|
+
|
242
|
+
export declare interface BarChartProps<TData extends object> extends ChartProps<TData>, default_2.ComponentProps<'div'> {
|
252
243
|
layout?: 'horizontal' | 'vertical';
|
253
|
-
|
244
|
+
showLabels?: boolean;
|
245
|
+
stacked?: boolean | 'expand';
|
246
|
+
}
|
254
247
|
|
255
248
|
export declare const Base: React_2.ForwardRefExoticComponent<Omit<ButtonPrimitive.ButtonProps, "children"> & {
|
256
249
|
/** Appearance will change the style of the button */
|
@@ -448,6 +441,30 @@ export declare type CardProps = Omit<React_2.HTMLAttributes<HTMLDivElement>, 'ti
|
|
448
441
|
menu?: (props: Partial<MenuProps>) => JSX.Element;
|
449
442
|
};
|
450
443
|
|
444
|
+
declare interface ChartChildProps<TData extends object> {
|
445
|
+
dataKey: keyof TData;
|
446
|
+
label: string;
|
447
|
+
unit?: string;
|
448
|
+
color?: Color_2;
|
449
|
+
formatter?: ChartValueFormatter;
|
450
|
+
isHidden?: boolean;
|
451
|
+
}
|
452
|
+
|
453
|
+
declare interface ChartProps<TData extends object> {
|
454
|
+
data: TData[];
|
455
|
+
dataKey: keyof TData;
|
456
|
+
showLegend?: boolean;
|
457
|
+
showXAxis?: boolean;
|
458
|
+
showYAxis?: boolean;
|
459
|
+
tooltipTitle?: TooltipTitle;
|
460
|
+
xAxisScale?: ScaleType | Function;
|
461
|
+
xAxisTickFormatter?: TickFormatter;
|
462
|
+
yAxisScale?: ScaleType | Function;
|
463
|
+
yAxisTickFormatter?: TickFormatter;
|
464
|
+
}
|
465
|
+
|
466
|
+
declare type ChartValueFormatter = (value: number) => string | JSX.Element;
|
467
|
+
|
451
468
|
export declare const Checkbox: React_2.ForwardRefExoticComponent<CheckboxProps & React_2.RefAttributes<HTMLButtonElement>>;
|
452
469
|
|
453
470
|
declare type CheckboxBaseProps = Omit<React_2.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onChange'> & {
|
@@ -544,14 +561,6 @@ export declare type ComboboxTexts = {
|
|
544
561
|
|
545
562
|
export declare type ComboboxValue = ScrollableListItemValue;
|
546
563
|
|
547
|
-
declare type CommonChartProps<TType> = {
|
548
|
-
accessor: keyof TType & string;
|
549
|
-
xAxisScale?: ScaleType | Function;
|
550
|
-
xAxisTickFormat: (value: any) => string;
|
551
|
-
yAxisScale?: ScaleType | Function;
|
552
|
-
yAxisTickFormat: (value: any) => string;
|
553
|
-
};
|
554
|
-
|
555
564
|
declare interface CommonSearchInput2Props extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'defaultValue' | 'onChange' | 'value'> {
|
556
565
|
loading?: boolean;
|
557
566
|
onChange: (value: string) => void;
|
@@ -618,6 +627,8 @@ declare const createListboxValueSetter: (multiple: boolean, setValue: default_2.
|
|
618
627
|
|
619
628
|
export declare function createShortcutKeyDownHandler<T = Element>(key: string | KeyDownHandlerOptions, handler: (event: KeyboardEvent | default_2.KeyboardEvent<T>) => void, stopPropagation?: boolean): (event: KeyboardEvent | default_2.KeyboardEvent<T>) => void;
|
620
629
|
|
630
|
+
declare type CurveType = 'natural' | 'linear' | 'step';
|
631
|
+
|
621
632
|
export declare const Datepicker: React_2.ForwardRefExoticComponent<Omit<InputProps, "value"> & {
|
622
633
|
/** [Calendar](component:calendar) component associated with the DatePicker */
|
623
634
|
calendar?: CalendarProps;
|
@@ -1078,26 +1089,18 @@ export declare type DialogTitleProps = React_2.HTMLAttributes<HTMLHeadingElement
|
|
1078
1089
|
|
1079
1090
|
declare type DialogTriggerProps = React_2.HTMLAttributes<HTMLButtonElement>;
|
1080
1091
|
|
1081
|
-
export declare
|
1082
|
-
({ children, formatter, onClick, showLegend, legendPosition, label, }: DonutChartProps): default_2.JSX.Element | null;
|
1083
|
-
Segment: (_: DonutChartSegmentProps) => null;
|
1084
|
-
};
|
1092
|
+
export declare function DonutChart<TData extends object>(props: DonutChartProps<TData>): default_2.JSX.Element;
|
1085
1093
|
|
1086
|
-
export declare
|
1087
|
-
|
1088
|
-
|
1089
|
-
onClick?: (segment: DonutChartSegmentProps | DonutChartSegmentProps[]) => void;
|
1090
|
-
showLegend?: boolean;
|
1091
|
-
legendPosition?: string;
|
1092
|
-
label: string;
|
1093
|
-
};
|
1094
|
+
export declare namespace DonutChart {
|
1095
|
+
var Segment: <TData extends object>(_: DonutChartSegmentProps<TData>) => JSX.Element | null;
|
1096
|
+
}
|
1094
1097
|
|
1095
|
-
export declare
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
}
|
1098
|
+
export declare interface DonutChartProps<TData extends object> extends Omit<PieChartProps<TData>, 'showLabels'> {
|
1099
|
+
showTotal?: boolean;
|
1100
|
+
}
|
1101
|
+
|
1102
|
+
export declare interface DonutChartSegmentProps<TData extends object> extends PieChartSegmentProps<TData> {
|
1103
|
+
}
|
1101
1104
|
|
1102
1105
|
export declare const Drawer: ForwardedDrawerWithStatics;
|
1103
1106
|
|
@@ -1632,6 +1635,27 @@ export declare type LayoutTopProps = {
|
|
1632
1635
|
}) => default_2.ReactNode);
|
1633
1636
|
};
|
1634
1637
|
|
1638
|
+
export declare const LegacyDonutChart: {
|
1639
|
+
({ children, formatter, onClick, label }: LegacyDonutChartProps): default_2.JSX.Element | null;
|
1640
|
+
Segment: (_: LegacyDonutChartSegmentProps) => null;
|
1641
|
+
};
|
1642
|
+
|
1643
|
+
export declare type LegacyDonutChartProps = {
|
1644
|
+
children: default_2.ReactElement<LegacyDonutChartSegmentProps> | default_2.ReactElement<LegacyDonutChartSegmentProps>[];
|
1645
|
+
formatter?: (value: number) => string;
|
1646
|
+
onClick?: (segment: LegacyDonutChartSegmentProps | LegacyDonutChartSegmentProps[]) => void;
|
1647
|
+
label: string;
|
1648
|
+
};
|
1649
|
+
|
1650
|
+
export declare type LegacyDonutChartSegmentProps = {
|
1651
|
+
color: Color_2;
|
1652
|
+
id: string;
|
1653
|
+
label: string;
|
1654
|
+
value: number;
|
1655
|
+
};
|
1656
|
+
|
1657
|
+
export declare type LegacyDonutSegmentIds = string[];
|
1658
|
+
|
1635
1659
|
export declare type LegacyTableCell<TRow extends {}> = {
|
1636
1660
|
accessor: string;
|
1637
1661
|
/** Represents the row which renders the specific cell, exposing its properties */
|
@@ -1849,22 +1873,19 @@ export declare type LegacyTableTexts = {
|
|
1849
1873
|
loading: string;
|
1850
1874
|
};
|
1851
1875
|
|
1852
|
-
export declare
|
1853
|
-
<TType = unknown>(externalProps: LineChartProps<TType>): default_2.JSX.Element;
|
1854
|
-
Line: (_: LineChartBarProps<any>) => null;
|
1855
|
-
};
|
1876
|
+
export declare function LineChart<TData extends object>(props: LineChartProps<TData>): default_2.JSX.Element;
|
1856
1877
|
|
1857
|
-
declare
|
1858
|
-
|
1859
|
-
|
1860
|
-
label?: string;
|
1861
|
-
};
|
1878
|
+
export declare namespace LineChart {
|
1879
|
+
var Line: <TData extends object>(_: LineChartAreaProps<TData>) => JSX.Element | null;
|
1880
|
+
}
|
1862
1881
|
|
1863
|
-
declare
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1882
|
+
export declare interface LineChartAreaProps<TData extends object> extends ChartChildProps<TData> {
|
1883
|
+
}
|
1884
|
+
|
1885
|
+
export declare interface LineChartProps<TData extends object> extends ChartProps<TData>, default_2.ComponentProps<'div'> {
|
1886
|
+
showDots?: boolean;
|
1887
|
+
type?: CurveType;
|
1888
|
+
}
|
1868
1889
|
|
1869
1890
|
declare const Link: default_2.ForwardRefExoticComponent<LinkProps & default_2.RefAttributes<HTMLAnchorElement>>;
|
1870
1891
|
|
@@ -2449,6 +2470,22 @@ export declare const parseFromCustomString: (date?: string, mask?: string, defau
|
|
2449
2470
|
|
2450
2471
|
export declare const parseFromISOString: (date: string) => Date | undefined;
|
2451
2472
|
|
2473
|
+
export declare function PieChart<TData extends object>(props: PieChartProps<TData>): default_2.JSX.Element;
|
2474
|
+
|
2475
|
+
export declare namespace PieChart {
|
2476
|
+
var Segment: <TData extends object>(_: PieChartSegmentProps<TData>) => JSX.Element | null;
|
2477
|
+
}
|
2478
|
+
|
2479
|
+
export declare interface PieChartProps<TData extends object> extends Pick<ChartProps<TData>, 'showLegend' | 'tooltipTitle'>, default_2.ComponentProps<'div'> {
|
2480
|
+
formatter?: ChartValueFormatter;
|
2481
|
+
showLabels?: boolean;
|
2482
|
+
unit?: string;
|
2483
|
+
}
|
2484
|
+
|
2485
|
+
export declare interface PieChartSegmentProps<TData extends object> extends Omit<ChartChildProps<TData>, 'dataKey' | 'formatter' | 'unit'> {
|
2486
|
+
value: number;
|
2487
|
+
}
|
2488
|
+
|
2452
2489
|
export declare type Placement = 'right' | 'left' | 'top' | 'bottom';
|
2453
2490
|
|
2454
2491
|
export declare const Popover: ForwardedPopoverWithStatics;
|
@@ -2650,8 +2687,6 @@ declare const Section: default_2.ForwardRefExoticComponent<default_2.LiHTMLAttri
|
|
2650
2687
|
heading?: string;
|
2651
2688
|
} & default_2.RefAttributes<HTMLLIElement>>;
|
2652
2689
|
|
2653
|
-
export declare type SegmentIds = string[];
|
2654
|
-
|
2655
2690
|
export declare const Select: React_2.ForwardRefExoticComponent<Omit<ListboxProps, "dialog"> & Omit<ComboboxProps, "inline"> & {
|
2656
2691
|
/**
|
2657
2692
|
* Allows to select multiple values.
|
@@ -3535,6 +3570,8 @@ export declare type TextareaProps = React_2.TextareaHTMLAttributes<HTMLTextAreaE
|
|
3535
3570
|
value?: string;
|
3536
3571
|
};
|
3537
3572
|
|
3573
|
+
declare type TickFormatter = (value: any) => string;
|
3574
|
+
|
3538
3575
|
export declare const Title: React_2.ForwardRefExoticComponent<HangerTitleProps & React_2.RefAttributes<HTMLHeadingElement>>;
|
3539
3576
|
|
3540
3577
|
declare const Title_2: default_2.ForwardRefExoticComponent<Listbox2TitleProps & default_2.RefAttributes<HTMLDivElement>>;
|
@@ -3622,6 +3659,8 @@ export declare type TooltipProps = Omit<React_2.HTMLAttributes<HTMLDivElement>,
|
|
3622
3659
|
placement?: 'top' | 'right' | 'bottom' | 'left';
|
3623
3660
|
};
|
3624
3661
|
|
3662
|
+
declare type TooltipTitle = JSX.Element | string | null | false;
|
3663
|
+
|
3625
3664
|
declare const Top: (props: LayoutTopProps) => default_2.JSX.Element;
|
3626
3665
|
|
3627
3666
|
export declare const Tour: {
|