@rafal.lemieszewski/tide-ui 0.18.1 → 0.20.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.
@@ -2,11 +2,11 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
4
4
  declare const avatarVariants: (props?: ({
5
- size?: "sm" | "md" | "lg" | "xxs" | "xs" | "xl" | null | undefined;
5
+ size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
6
6
  shape?: "circle" | "rounded" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  declare const avatarFallbackVariants: (props?: ({
9
- size?: "sm" | "md" | "lg" | "xxs" | "xs" | "xl" | null | undefined;
9
+ size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | null | undefined;
10
10
  shape?: "circle" | "rounded" | null | undefined;
11
11
  variant?: "success" | "warning" | "magenta" | "violet" | "information" | "error" | null | undefined;
12
12
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -4,7 +4,7 @@ import { IconType } from './icon';
4
4
  declare const buttonVariants: (props?: ({
5
5
  variant?: "default" | "success" | "destructive" | "secondary" | "primary" | "ghost" | null | undefined;
6
6
  size?: "sm" | "md" | "lg" | null | undefined;
7
- iconPosition?: "none" | "left" | "right" | "only" | null | undefined;
7
+ iconPosition?: "none" | "right" | "left" | "only" | null | undefined;
8
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
9
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  icon?: IconType;
@@ -1,3 +1,4 @@
1
+ export declare const formatNumber: (value: number, decimals?: number) => string;
1
2
  export declare const chartColorSchemes: {
2
3
  readonly bar: readonly ["var(--color-chart-bar-1)", "var(--color-chart-bar-2)", "var(--color-chart-bar-3)", "var(--color-chart-bar-4)", "var(--color-chart-bar-5)", "var(--color-chart-bar-6)"];
3
4
  readonly line: readonly ["var(--color-chart-line-1)", "var(--color-chart-line-2)", "var(--color-chart-line-3)", "var(--color-chart-line-4)", "var(--color-chart-line-5)"];
@@ -19,7 +20,6 @@ export interface ChartConfig {
19
20
  fill?: string;
20
21
  showDots?: boolean;
21
22
  strokeStyle?: "solid" | "dashed" | "dotted";
22
- yAxisId?: "left" | "right";
23
23
  };
24
24
  }
25
25
  export interface ChartMargin {
@@ -28,7 +28,26 @@ export interface ChartMargin {
28
28
  bottom: number;
29
29
  left: number;
30
30
  }
31
- export type ChartMarginSize = 'sm' | 'md' | 'lg' | 'auto';
31
+ export interface ReferenceMarkerDataPoint {
32
+ yValue: number;
33
+ label?: string;
34
+ shape?: 'circle' | 'triangle' | 'square';
35
+ size?: number;
36
+ fill?: string;
37
+ stroke?: string;
38
+ strokeWidth?: number;
39
+ }
40
+ export interface ReferenceMarker {
41
+ xValue: string | number;
42
+ showLine?: boolean;
43
+ lineStyle?: {
44
+ stroke?: string;
45
+ strokeWidth?: number;
46
+ strokeDasharray?: string;
47
+ };
48
+ tooltipLabel?: string;
49
+ dataPoints: ReferenceMarkerDataPoint[];
50
+ }
32
51
  export interface ChartProps {
33
52
  type: ChartType;
34
53
  data: ChartDataPoint[];
@@ -47,22 +66,19 @@ export interface ChartProps {
47
66
  responsive?: boolean;
48
67
  maintainAspectRatio?: boolean;
49
68
  margin?: Partial<ChartMargin>;
50
- marginSize?: ChartMarginSize;
51
69
  yAxisWidth?: number;
52
70
  yAxisTickCount?: number;
71
+ yAxisDomain?: [number | 'auto' | 'dataMin' | 'dataMax', number | 'auto' | 'dataMin' | 'dataMax'];
53
72
  xAxisTickFormatter?: (value: any, index: number) => string;
54
73
  yAxisTickFormatter?: (value: any, index: number) => string;
55
- rightYAxisWidth?: number;
56
- rightYAxisTickCount?: number;
57
- rightYAxisTickFormatter?: (value: any, index: number) => string;
58
- showRightYAxis?: boolean;
59
74
  title?: string;
60
75
  description?: string;
61
76
  showDataTable?: boolean;
62
77
  tooltipMaxWidth?: string;
63
78
  legendOrder?: string[];
64
- legendPosition?: 'bottom' | 'top' | 'right';
79
+ legendPosition?: 'bottom';
80
+ referenceMarkers?: ReferenceMarker[];
65
81
  }
66
- export declare function Chart({ type, data, config, className, height, width, minWidth, onDataPointClick, onDataPointHover, highlightedIndex, showGrid, showLegend, showTooltip, colorScheme, responsive, maintainAspectRatio, margin, marginSize, yAxisWidth, yAxisTickCount, xAxisTickFormatter, yAxisTickFormatter, rightYAxisWidth, rightYAxisTickCount, rightYAxisTickFormatter, showRightYAxis, title, description, showDataTable, tooltipMaxWidth, legendOrder, legendPosition, ...props }: ChartProps): import("react/jsx-runtime").JSX.Element;
82
+ export declare function Chart({ type, data, config, className, height, width, minWidth, onDataPointClick, onDataPointHover, highlightedIndex, showGrid, showLegend, showTooltip, colorScheme, responsive, maintainAspectRatio, margin, yAxisWidth, yAxisTickCount, xAxisTickFormatter, yAxisTickFormatter, title, description, showDataTable, tooltipMaxWidth, legendOrder, legendPosition, referenceMarkers, yAxisDomain, ...props }: ChartProps): import("react/jsx-runtime").JSX.Element;
67
83
  export declare const generateChartColors: (count: number, scheme?: ChartColorScheme) => ("var(--color-chart-bar-1)" | "var(--color-chart-bar-2)" | "var(--color-chart-bar-3)" | "var(--color-chart-bar-4)" | "var(--color-chart-bar-5)" | "var(--color-chart-bar-6)" | "var(--color-chart-line-1)" | "var(--color-chart-line-2)" | "var(--color-chart-line-3)" | "var(--color-chart-line-4)" | "var(--color-chart-line-5)" | "var(--color-chart-scatter-1)" | "var(--color-chart-scatter-2)" | "var(--color-chart-scatter-3)" | "var(--color-chart-scatter-4)" | "var(--color-chart-scatter-5)" | "var(--color-chart-scatter-6)" | "var(--color-chart-area-1)" | "var(--color-chart-area-2)" | "var(--color-chart-area-3)" | "var(--color-chart-area-4)" | "var(--color-chart-area-5)" | "var(--color-chart-area-6)" | "#0066CC" | "#CC6600" | "#009966" | "#CC0066" | "#6600CC" | "#CC9900" | "#006666" | "#CC0000")[];
68
84
  export declare const createChartConfig: (input: ChartConfig | string[], labels?: string[], colors?: string[]) => ChartConfig;
@@ -45,6 +45,10 @@ interface DataTableFilterProps {
45
45
  column: any;
46
46
  }
47
47
  declare function DataTableFilter({ column }: DataTableFilterProps): import("react/jsx-runtime").JSX.Element;
48
+ interface DataTableViewOptionsProps<_TData = any> {
49
+ table: any;
50
+ }
51
+ declare function DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): import("react/jsx-runtime").JSX.Element;
48
52
  interface DataTableColumnHeaderProps<_TData = any, _TValue = any> extends React.HTMLAttributes<HTMLDivElement> {
49
53
  column: any;
50
54
  title: string;
@@ -93,6 +97,9 @@ export interface DataTableProps<TData, TValue> {
93
97
  enableNestedHeaders?: boolean;
94
98
  enableColumnOrdering?: boolean;
95
99
  enableRowSelection?: boolean;
100
+ showHeader?: boolean;
101
+ showPagination?: boolean;
102
+ onTableReady?: (table: any) => void;
96
103
  initialState?: {
97
104
  grouping?: GroupingState;
98
105
  expanded?: ExpandedState;
@@ -103,5 +110,7 @@ export interface DataTableProps<TData, TValue> {
103
110
  };
104
111
  };
105
112
  }
106
- export declare function DataTable<TData, TValue>({ columns, data, searchKey, searchPlaceholder, title, className, stickyHeader, stickyFirstColumn, stickyLeftColumns, stickyRightColumns, enableResponsiveWrapper, showScrollIndicators, isLoading, loadingRowCount, borderStyle, enableGlobalSearch, globalSearchPlaceholder, enableGlobalFaceting, enableColumnResizing, columnResizeMode, enableColumnResizePersistence, storageKey, enableExpanding, getSubRows, enableGrouping, groupedColumnMode, enableManualGrouping, enableRowPinning, keepPinnedRows, enableVirtualization, nestedHeaders, enableNestedHeaders, enableColumnOrdering, enableRowSelection, initialState, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
107
- export { DataTableColumnHeader, DataTableFilter, DataTableToolbar, DataTablePagination, DataTableSkeleton, fuzzyFilter, multiSelectFilter };
113
+ export declare function DataTable<TData, TValue>({ columns, data, searchKey, searchPlaceholder, title, className, stickyHeader, stickyFirstColumn, stickyLeftColumns, stickyRightColumns, enableResponsiveWrapper, showScrollIndicators, isLoading, loadingRowCount, borderStyle, enableGlobalSearch, globalSearchPlaceholder, enableGlobalFaceting, enableColumnResizing, columnResizeMode, enableColumnResizePersistence, storageKey, enableExpanding, getSubRows, enableGrouping, groupedColumnMode, enableManualGrouping, enableRowPinning, keepPinnedRows, enableVirtualization, nestedHeaders, enableNestedHeaders, enableColumnOrdering, enableRowSelection, showHeader, showPagination, onTableReady, initialState, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
114
+ export { DataTableColumnHeader, DataTableFilter, DataTableToolbar, DataTablePagination, DataTableSkeleton, DataTableViewOptions, fuzzyFilter, multiSelectFilter };
115
+ export { useReactTable } from '@tanstack/react-table';
116
+ export type { SortingState, ColumnFiltersState, VisibilityState, ExpandedState, GroupingState, ColumnOrderState, FilterFn, ColumnResizeMode, } from '@tanstack/react-table';
@@ -7,7 +7,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
7
7
  declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
8
8
  declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  declare const sheetVariants: (props?: ({
10
- side?: "left" | "right" | "bottom" | "top" | null | undefined;
10
+ side?: "bottom" | "top" | "right" | "left" | null | undefined;
11
11
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
12
12
  export interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
13
13
  showClose?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  declare const spinnerVariants: (props?: ({
4
- size?: "sm" | "md" | "lg" | "xs" | "xl" | "2xl" | null | undefined;
4
+ size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | null | undefined;
5
5
  variant?: "default" | "success" | "warning" | "error" | "secondary" | "primary" | "tertiary" | "disabled" | "inverse" | null | undefined;
6
6
  speed?: "normal" | "slow" | "fast" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
@@ -9,14 +9,14 @@ declare const tableRowVariants: (props?: ({
9
9
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
10
10
  declare const tableCellVariants: (props?: ({
11
11
  size?: "sm" | "md" | "lg" | null | undefined;
12
- align?: "left" | "right" | "center" | null | undefined;
12
+ align?: "center" | "right" | "left" | null | undefined;
13
13
  numeric?: boolean | null | undefined;
14
14
  showBorder?: boolean | null | undefined;
15
15
  showRowBorder?: boolean | null | undefined;
16
16
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
17
17
  declare const tableHeaderVariants: (props?: ({
18
18
  size?: "sm" | "md" | "lg" | null | undefined;
19
- align?: "left" | "right" | "center" | null | undefined;
19
+ align?: "center" | "right" | "left" | null | undefined;
20
20
  numeric?: boolean | null | undefined;
21
21
  showBorder?: boolean | null | undefined;
22
22
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;