@cagatayfdn/flora-components 0.0.20 → 0.0.21

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/index.d.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  /// <reference types="react" />
2
2
 
3
3
  import { AxiosError } from 'axios';
4
+ import { ChartProps } from 'react-chartjs-2';
4
5
  import { CustomLocale } from 'flatpickr/dist/types/locale';
5
6
  import { Dispatch as Dispatch_2 } from 'react';
6
7
  import { FC } from 'react';
7
8
  import { FieldError } from 'react-hook-form';
8
9
  import i18n from 'i18next';
9
10
  import { JSX as JSX_2 } from 'react/jsx-runtime';
11
+ import { LegendItem } from 'chart.js';
10
12
  import { LinkProps } from 'react-router-dom';
11
13
  import { MouseEvent as MouseEvent_2 } from 'react';
12
14
  import NiceModal from '@ebay/nice-modal-react';
@@ -158,6 +160,15 @@ declare type AutocompleteProps = {
158
160
  items: OptionItem[];
159
161
  } & InputProps;
160
162
 
163
+ declare function Bar({ data, options }: BarProps): JSX_2.Element;
164
+
165
+ declare type BarChartProps = ChartProps<'bar', number[], unknown>;
166
+
167
+ declare type BarProps = {
168
+ options?: BarChartProps['options'];
169
+ data: BarChartProps['data'];
170
+ };
171
+
161
172
  export declare const Button: ({ children, size, isLoading, isDisabled, isBlock, noBorder, noBackground, round, isSolid, type, className, prefixIcon, appearance, onClick, }: ButtonProps) => JSX.Element;
162
173
 
163
174
  declare type ButtonProps = {
@@ -188,6 +199,13 @@ declare type CanProps = {
188
199
 
189
200
  export declare const changeLanguage: (user: any, t: TFunction) => void;
190
201
 
202
+ export declare const Chart: {
203
+ Bar: typeof Bar;
204
+ Pie: typeof Pie;
205
+ Line: typeof Line;
206
+ Legends: typeof Legends;
207
+ };
208
+
191
209
  export declare const Checkbox: React_2.ForwardRefExoticComponent<{
192
210
  id?: string | undefined;
193
211
  label?: string | undefined;
@@ -453,6 +471,23 @@ declare type LabelProps = {
453
471
  appearance?: FormFieldAppearance;
454
472
  };
455
473
 
474
+ declare function Legends({ items, colorMap }: LegendsProps): JSX_2.Element;
475
+
476
+ declare type LegendsProps = {
477
+ items: LegendItem[];
478
+ colorMap: Record<string, string>;
479
+ };
480
+
481
+ declare function Line({ data, options, lineRef }: LineProps): JSX_2.Element;
482
+
483
+ declare type LineChartProps = ChartProps<'line', any[], unknown>;
484
+
485
+ declare type LineProps = {
486
+ options?: LineChartProps['options'];
487
+ data: LineChartProps['data'];
488
+ lineRef?: any;
489
+ };
490
+
456
491
  export declare const Loading: ({ className, appearance, layer, wrapperClass, }: LoadingProps) => JSX.Element;
457
492
 
458
493
  declare type LoadingProps = {
@@ -675,6 +710,15 @@ declare type PermType = `${PermissionsSlug}`;
675
710
 
676
711
  declare type PermType_2 = `${PermissionsSlug_2}`
677
712
 
713
+ declare function Pie({ data, options }: PieProps): JSX_2.Element;
714
+
715
+ declare type PieChartProps = ChartProps<'pie', number[], unknown>;
716
+
717
+ declare type PieProps = {
718
+ options?: PieChartProps['options'];
719
+ data: PieChartProps['data'];
720
+ };
721
+
678
722
  export declare enum PodStatusEnum {
679
723
  TERMINATED = "Terminated",
680
724
  TERMINATING = "Terminating",