@cagatayfdn/flora-components 0.0.12 → 0.0.14

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
@@ -13,6 +13,7 @@ import NiceModal from '@ebay/nice-modal-react';
13
13
  import { NiceModalHocProps } from '@ebay/nice-modal-react';
14
14
  import { default as React_2 } from 'react';
15
15
  import { ReactNode } from 'react';
16
+ import { SelectItemRenderer } from 'react-dropdown-select';
16
17
  import { SetStateAction } from 'react';
17
18
  import { TFunction } from 'i18next';
18
19
 
@@ -175,6 +176,10 @@ export declare enum CopyTextStatusEnum {
175
176
  ERROR = "error"
176
177
  }
177
178
 
179
+ declare type CustomItemProps = {
180
+ item: OptionProps;
181
+ };
182
+
178
183
  declare type Dispatch = React_2.Dispatch<Actiontype>;
179
184
 
180
185
  export declare enum DividerAppearance {
@@ -223,6 +228,14 @@ declare type HashMap<K extends string | number, V> = {
223
228
  [key in K]: V
224
229
  }
225
230
 
231
+ export declare const Heading: React_2.FC<HeadingProps>;
232
+
233
+ declare type HeadingProps = {
234
+ level?: number;
235
+ className?: string;
236
+ children: React_2.ReactNode;
237
+ };
238
+
226
239
  export { i18n }
227
240
 
228
241
  export declare const Icon: (props: IconProps) => JSX.Element;
@@ -296,6 +309,17 @@ declare enum Icons {
296
309
 
297
310
  declare type IconsId = 'applications' | 'attach' | 'attachment' | 'billing' | 'box' | 'calendar' | 'cart' | 'certificate' | 'check' | 'chevron-left' | 'chevron-right' | 'circle-minus' | 'circle-plus' | 'clock' | 'close' | 'copy' | 'credit-card' | 'document' | 'domain-registration' | 'domains' | 'down-arrow' | 'down-square' | 'down' | 'download' | 'edit-outline' | 'edit' | 'email' | 'environment' | 'error-fill' | 'error' | 'fileTextOutlined' | 'info' | 'install' | 'link' | 'log' | 'menu-close' | 'menu-open' | 'monitoring' | 'network' | 'no-results' | 'not-edit' | 'path' | 'plus' | 'preview' | 'profile' | 'project-list' | 'projects' | 'reload' | 'retry' | 'search' | 'settings' | 'support' | 'trash' | 'users' | 'warning';
298
311
 
312
+ export declare function InfiniteScroll({ children, hasMore, height, loadMore, treshold, }: InfiniteScrollProps): JSX.Element;
313
+
314
+ declare interface InfiniteScrollProps {
315
+ className?: string;
316
+ children?: React.ReactNode;
317
+ height?: number;
318
+ treshold?: number;
319
+ hasMore?: boolean;
320
+ loadMore: () => void;
321
+ }
322
+
299
323
  export declare enum isActiveColor {
300
324
  inActive = "#4482ff",
301
325
  active = "#3f4b5c"
@@ -356,6 +380,17 @@ export declare enum NotificationAppearanceType {
356
380
  LOADING = "loading"
357
381
  }
358
382
 
383
+ declare interface OptionItem {
384
+ value: string | number;
385
+ label: string;
386
+ id?: string;
387
+ rest?: any;
388
+ }
389
+
390
+ declare interface OptionProps extends OptionItem {
391
+ name?: string;
392
+ }
393
+
359
394
  declare interface Permissions_2 {
360
395
  default: boolean
361
396
  depends_on: PermissionsType[] | null
@@ -470,6 +505,42 @@ declare type ScrollContainerProps = {
470
505
  className?: string;
471
506
  };
472
507
 
508
+ export declare const Select: {
509
+ (props: SelectProps): JSX.Element;
510
+ displayName: string;
511
+ };
512
+
513
+ declare type SelectProps = {
514
+ id?: string;
515
+ items?: OptionProps[];
516
+ itemPrefix?: string;
517
+ itemSuffix?: string | number;
518
+ infiniteScrollProps?: InfiniteScrollProps;
519
+ size?: Size;
520
+ searchable?: boolean;
521
+ clearable?: boolean;
522
+ className?: string;
523
+ style?: React_2.CSSProperties;
524
+ wrapperClassName?: string;
525
+ labelField?: string;
526
+ valueField?: string;
527
+ showPlaceholder?: boolean;
528
+ backspaceDelete?: boolean;
529
+ customOption?: (props: CustomItemProps) => JSX.Element;
530
+ onChange?: (value: any, values?: any) => void;
531
+ onSearch?: (value: string) => void;
532
+ isAllSelected?: boolean;
533
+ appearance?: FormFieldAppearance;
534
+ noDataRenderer?: (props: any) => any;
535
+ onAddItem?: ({ item, methods, props, state, itemIndex, }: SelectItemRenderer<OptionProps>) => void;
536
+ onRemoveItem?: (item: OptionProps) => void;
537
+ onDropdownClose?: () => void;
538
+ value?: any;
539
+ required?: boolean;
540
+ isMulti?: boolean;
541
+ isRadius?: boolean;
542
+ } & Omit<FormElementProps, 'value'>;
543
+
473
544
  export declare enum Size {
474
545
  XS = "xsmall",
475
546
  SM = "small",