@tanishraj/ui-kit 2.1.1 → 2.3.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.
package/dist/index.d.ts CHANGED
@@ -7,6 +7,7 @@ import { FC } from 'react';
7
7
  import { FieldsetHTMLAttributes } from 'react';
8
8
  import { ForwardRefExoticComponent } from 'react';
9
9
  import { HTMLAttributes } from 'react';
10
+ import { Placement } from '@floating-ui/react';
10
11
  import { ReactElement } from 'react';
11
12
  import { ReactNode } from 'react';
12
13
  import { Ref } from 'react';
@@ -325,7 +326,7 @@ declare const dividerRootStyles: (props?: ({
325
326
  export declare const Drawer: FC<DrawerProps>;
326
327
 
327
328
  declare const drawerPanelStyles: (props?: ({
328
- placement?: "right" | "left" | "top" | "bottom" | null | undefined;
329
+ placement?: "top" | "right" | "bottom" | "left" | null | undefined;
329
330
  size?: "sm" | "md" | "lg" | "full" | null | undefined;
330
331
  } & ClassProp) | undefined) => string;
331
332
 
@@ -351,11 +352,87 @@ export declare interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>
351
352
 
352
353
  export declare type DrawerSizes = RemoveNull_2<VariantProps<typeof drawerPanelStyles>>['size'];
353
354
 
355
+ export declare const Dropdown: FC<DropdownProps>;
356
+
357
+ export declare type DropdownAlignments = 'start' | 'center' | 'end';
358
+
359
+ export declare type DropdownAppearances = ButtonAppearances;
360
+
361
+ export declare type DropdownIcon = NonNullable<ButtonProps['leadingIcon']>;
362
+
363
+ export declare type DropdownItem = ListBoxItemData;
364
+
365
+ export declare type DropdownPlacements = 'top' | 'right' | 'bottom' | 'left';
366
+
367
+ export declare interface DropdownProps extends Omit<ButtonProps, 'children' | 'trailingIcon' | 'value'> {
368
+ children?: ReactNode;
369
+ chevronIcon?: DropdownIcon;
370
+ clickOutsideToClose?: boolean;
371
+ closeOnSelect?: boolean;
372
+ defaultOpen?: boolean;
373
+ icon?: DropdownIcon;
374
+ iconOnly?: boolean;
375
+ inline?: boolean;
376
+ items?: DropdownItem[];
377
+ align?: DropdownAlignments;
378
+ menuClassName?: string;
379
+ menuContent?: ReactNode | ((closeMenu: () => void) => ReactNode);
380
+ menuOffset?: [number, number];
381
+ menuPlacement?: Placement;
382
+ onItemSelect?: (item: DropdownItem) => void;
383
+ onOpenChange?: (open: boolean) => void;
384
+ open?: boolean;
385
+ placement?: DropdownPlacements;
386
+ portalTarget?: HTMLElement | null;
387
+ renderAs?: DropdownRenderAs;
388
+ selectedValue?: string;
389
+ showChevron?: boolean;
390
+ trigger?: ReactNode | ((open: boolean) => ReactNode);
391
+ triggerAction?: DropdownTriggerAction;
392
+ triggerClassName?: string;
393
+ menuProps?: Omit<ComponentPropsWithoutRef<'div'>, 'children'>;
394
+ usePortal?: boolean;
395
+ withArrow?: boolean;
396
+ }
397
+
398
+ export declare type DropdownRenderAs = 'button' | 'unstyled';
399
+
400
+ export declare type DropdownSizes = ButtonSizes;
401
+
402
+ export declare type DropdownTriggerAction = 'click' | 'hover';
403
+
404
+ export declare type DropdownVariants = ButtonVariants;
405
+
354
406
  declare enum EThemeOptions {
355
407
  LIGHT = "light",
356
408
  DARK = "dark"
357
409
  }
358
410
 
411
+ export declare const Input: FC<InputProps>;
412
+
413
+ export declare type InputIcon = FC<SVGProps<SVGSVGElement>>;
414
+
415
+ export declare interface InputProps extends Omit<ComponentPropsWithRef<'input'>, 'children' | 'prefix' | 'size'> {
416
+ caption?: ReactNode;
417
+ clearLabel?: string;
418
+ clearable?: boolean;
419
+ containerClassName?: string;
420
+ error?: ReactNode;
421
+ fullWidth?: boolean;
422
+ inputClassName?: string;
423
+ label?: ReactNode;
424
+ labelClassName?: string;
425
+ leadingIcon?: InputIcon;
426
+ onClear?: () => void;
427
+ size?: InputSizes;
428
+ trailingIcon?: InputIcon;
429
+ variant?: InputVariants;
430
+ }
431
+
432
+ export declare type InputSizes = ButtonSizes;
433
+
434
+ export declare type InputVariants = ButtonVariants;
435
+
359
436
  export declare const Link: FC<LinkProps>;
360
437
 
361
438
  export declare type LinkIcon = FC<SVGProps<SVGSVGElement>>;
@@ -384,8 +461,70 @@ export declare type LinkUnderline = RemoveNull_2<VariantProps<typeof linkStyles>
384
461
 
385
462
  export declare type LinkVariants = RemoveNull_2<VariantProps<typeof linkStyles>>['variant'];
386
463
 
464
+ export declare const ListBox: ForwardRefExoticComponent<ListBoxProps & RefAttributes<HTMLDivElement>>;
465
+
466
+ export declare type ListBoxIcon = FC<SVGProps<SVGSVGElement>>;
467
+
468
+ export declare interface ListBoxItemData {
469
+ disabled?: boolean;
470
+ id?: string;
471
+ label: ReactNode;
472
+ leadingIcon?: ListBoxIcon;
473
+ value: string;
474
+ }
475
+
476
+ export declare interface ListBoxProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
477
+ children?: ReactNode;
478
+ itemRole?: 'option' | 'menuitem';
479
+ items?: ListBoxItemData[];
480
+ leadingSlot?: ReactNode;
481
+ onItemSelect?: (item: ListBoxItemData) => void;
482
+ selectedValue?: string;
483
+ size?: ListBoxSizes;
484
+ }
485
+
486
+ export declare type ListBoxSizes = 'sm' | 'md' | 'lg';
487
+
488
+ export declare const ListItem: ForwardRefExoticComponent<ListItemProps & RefAttributes<HTMLButtonElement>>;
489
+
490
+ export declare interface ListItemProps extends Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'disabled' | 'onSelect' | 'value'> {
491
+ item: ListBoxItemData;
492
+ onSelect?: (item: ListBoxItemData) => void;
493
+ selected?: boolean;
494
+ size?: ListBoxSizes;
495
+ }
496
+
387
497
  export declare const mergeRefs: <T>(...refs: Array<PossibleRef<T>>) => (node: T | null) => (() => void) | undefined;
388
498
 
499
+ export declare const Modal: FC<ModalProps>;
500
+
501
+ export declare type ModalIcon = FC<SVGProps<SVGSVGElement>>;
502
+
503
+ declare const modalPanelStyles: (props?: ({
504
+ size?: "sm" | "md" | "lg" | null | undefined;
505
+ } & ClassProp) | undefined) => string;
506
+
507
+ export declare interface ModalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, RemoveNull_2<VariantProps<typeof modalPanelStyles>> {
508
+ open: boolean;
509
+ children?: ReactNode;
510
+ title?: ReactNode;
511
+ description?: ReactNode;
512
+ footer?: ReactNode;
513
+ onClose?: () => void;
514
+ closeLabel?: string;
515
+ closeOnEscape?: boolean;
516
+ closeOnOverlayClick?: boolean;
517
+ container?: HTMLElement | null | undefined;
518
+ containerId?: string | undefined;
519
+ containerRef?: RefObject<HTMLElement | null> | undefined;
520
+ disablePortal?: boolean;
521
+ leadingIcon?: ModalIcon;
522
+ showCloseButton?: boolean;
523
+ showOverlay?: boolean;
524
+ }
525
+
526
+ export declare type ModalSizes = RemoveNull_2<VariantProps<typeof modalPanelStyles>>['size'];
527
+
389
528
  export declare const OrganizationChart: ForwardRefExoticComponent<OrgChartComponentProps & RefAttributes<OrgChartRef>>;
390
529
 
391
530
  export declare interface OrgChartApiNodeData {