@cagatayfdn/flora-components 0.0.19 → 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';
@@ -152,6 +154,21 @@ export declare const AuthProvider: (props: {
152
154
  children: React_2.ReactNode;
153
155
  }) => JSX_2.Element;
154
156
 
157
+ export declare const Autocomplete: (props: AutocompleteProps) => JSX.Element;
158
+
159
+ declare type AutocompleteProps = {
160
+ items: OptionItem[];
161
+ } & InputProps;
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
+
155
172
  export declare const Button: ({ children, size, isLoading, isDisabled, isBlock, noBorder, noBackground, round, isSolid, type, className, prefixIcon, appearance, onClick, }: ButtonProps) => JSX.Element;
156
173
 
157
174
  declare type ButtonProps = {
@@ -182,6 +199,13 @@ declare type CanProps = {
182
199
 
183
200
  export declare const changeLanguage: (user: any, t: TFunction) => void;
184
201
 
202
+ export declare const Chart: {
203
+ Bar: typeof Bar;
204
+ Pie: typeof Pie;
205
+ Line: typeof Line;
206
+ Legends: typeof Legends;
207
+ };
208
+
185
209
  export declare const Checkbox: React_2.ForwardRefExoticComponent<{
186
210
  id?: string | undefined;
187
211
  label?: string | undefined;
@@ -391,6 +415,48 @@ declare interface InfiniteScrollProps {
391
415
  loadMore: () => void;
392
416
  }
393
417
 
418
+ export declare const Input: React_2.ForwardRefExoticComponent<{
419
+ type?: "number" | "email" | "search" | "text" | "password" | "url" | "tel" | "hidden" | undefined;
420
+ prefix?: ReactNode;
421
+ suffix?: ReactNode;
422
+ suffixClickable?: boolean | undefined;
423
+ id?: string | undefined;
424
+ size?: Size | undefined;
425
+ className?: string | undefined;
426
+ appearance?: FormFieldAppearance | undefined;
427
+ autoComplete?: string | undefined;
428
+ isFormGroup?: boolean | undefined;
429
+ wrapperClassName?: string | undefined;
430
+ fieldWrapClassName?: string | undefined;
431
+ addonAfter?: string | undefined;
432
+ value?: any;
433
+ onChange?: ((event: any, value: any) => void) | undefined;
434
+ required?: boolean | undefined;
435
+ isRadius?: boolean | undefined;
436
+ textFillColor?: string | undefined;
437
+ } & Omit<FormElementProps, "value"> & Omit<EventProps<HTMLInputElement>, "onMouseDown" | "onMouseUp" | "onMouseEnter" | "onMouseLeave"> & React_2.RefAttributes<HTMLInputElement>>;
438
+
439
+ declare type InputProps = {
440
+ type?: 'text' | 'url' | 'number' | 'tel' | 'password' | 'email' | 'search' | 'hidden';
441
+ prefix?: ReactNode;
442
+ suffix?: ReactNode;
443
+ suffixClickable?: boolean;
444
+ id?: string;
445
+ size?: Size;
446
+ className?: string;
447
+ appearance?: FormFieldAppearance;
448
+ autoComplete?: string;
449
+ isFormGroup?: boolean;
450
+ wrapperClassName?: string;
451
+ fieldWrapClassName?: string;
452
+ addonAfter?: string;
453
+ value?: any;
454
+ onChange?: (event: any, value: any) => void;
455
+ required?: boolean;
456
+ isRadius?: boolean;
457
+ textFillColor?: string;
458
+ } & Omit<FormElementProps, 'value'> & Omit<EventProps<HTMLInputElement>, 'onMouseUp' | 'onMouseDown' | 'onMouseEnter' | 'onMouseLeave'>;
459
+
394
460
  export declare enum isActiveColor {
395
461
  inActive = "#4482ff",
396
462
  active = "#3f4b5c"
@@ -405,6 +471,23 @@ declare type LabelProps = {
405
471
  appearance?: FormFieldAppearance;
406
472
  };
407
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
+
408
491
  export declare const Loading: ({ className, appearance, layer, wrapperClass, }: LoadingProps) => JSX.Element;
409
492
 
410
493
  declare type LoadingProps = {
@@ -627,6 +710,15 @@ declare type PermType = `${PermissionsSlug}`;
627
710
 
628
711
  declare type PermType_2 = `${PermissionsSlug_2}`
629
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
+
630
722
  export declare enum PodStatusEnum {
631
723
  TERMINATED = "Terminated",
632
724
  TERMINATING = "Terminating",