@tanishraj/ui-kit 2.0.1 → 2.1.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,8 +7,11 @@ import { FC } from 'react';
7
7
  import { FieldsetHTMLAttributes } from 'react';
8
8
  import { ForwardRefExoticComponent } from 'react';
9
9
  import { HTMLAttributes } from 'react';
10
+ import { ReactElement } from 'react';
10
11
  import { ReactNode } from 'react';
12
+ import { Ref } from 'react';
11
13
  import { RefAttributes } from 'react';
14
+ import { RefObject } from 'react';
12
15
  import { RemoveNull as RemoveNull_2 } from '../../../utils';
13
16
  import { SVGProps } from 'react';
14
17
  import { VariantProps } from 'class-variance-authority';
@@ -61,6 +64,15 @@ declare const alertWrapperStyles: (props?: ({
61
64
  inverted?: boolean | null | undefined;
62
65
  } & ClassProp) | undefined) => string;
63
66
 
67
+ export declare const AnimatePresence: FC<AnimatePresenceProps>;
68
+
69
+ export declare const AnimatePresenceChild: FC<PresenceChildProps>;
70
+
71
+ declare interface AnimatePresenceProps {
72
+ children: ReactElement | ReactElement[];
73
+ presence: boolean;
74
+ }
75
+
64
76
  export declare const Avatar: FC<AvatarProps>;
65
77
 
66
78
  declare const avatarContainerStyles: (props?: ({
@@ -310,11 +322,70 @@ declare const dividerRootStyles: (props?: ({
310
322
  hasContent?: boolean | null | undefined;
311
323
  } & ClassProp) | undefined) => string;
312
324
 
325
+ export declare const Drawer: FC<DrawerProps>;
326
+
327
+ declare const drawerPanelStyles: (props?: ({
328
+ placement?: "right" | "left" | "top" | "bottom" | null | undefined;
329
+ size?: "sm" | "md" | "lg" | "full" | null | undefined;
330
+ } & ClassProp) | undefined) => string;
331
+
332
+ export declare type DrawerPlacements = RemoveNull_2<VariantProps<typeof drawerPanelStyles>>['placement'];
333
+
334
+ export declare interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, RemoveNull_2<VariantProps<typeof drawerPanelStyles>> {
335
+ open: boolean;
336
+ children?: ReactNode;
337
+ title?: ReactNode;
338
+ description?: ReactNode;
339
+ footer?: ReactNode;
340
+ onClose?: () => void;
341
+ closeLabel?: string;
342
+ closeOnEscape?: boolean;
343
+ closeOnOverlayClick?: boolean;
344
+ container?: HTMLElement | null | undefined;
345
+ containerId?: string | undefined;
346
+ containerRef?: RefObject<HTMLElement | null> | undefined;
347
+ disablePortal?: boolean;
348
+ showCloseButton?: boolean;
349
+ showOverlay?: boolean;
350
+ }
351
+
352
+ export declare type DrawerSizes = RemoveNull_2<VariantProps<typeof drawerPanelStyles>>['size'];
353
+
313
354
  declare enum EThemeOptions {
314
355
  LIGHT = "light",
315
356
  DARK = "dark"
316
357
  }
317
358
 
359
+ export declare const Link: FC<LinkProps>;
360
+
361
+ export declare type LinkIcon = FC<SVGProps<SVGSVGElement>>;
362
+
363
+ export declare interface LinkProps extends Omit<ComponentPropsWithRef<'a'>, 'children'>, RemoveNull_2<Omit<VariantProps<typeof linkStyles>, 'disabled' | 'truncate'>> {
364
+ children: ReactNode;
365
+ leadingIcon?: LinkIcon;
366
+ trailingIcon?: LinkIcon;
367
+ external?: boolean;
368
+ disabled?: boolean;
369
+ truncate?: boolean;
370
+ }
371
+
372
+ export declare type LinkSizes = RemoveNull_2<VariantProps<typeof linkStyles>>['size'];
373
+
374
+ declare const linkStyles: (props?: ({
375
+ variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
376
+ size?: "sm" | "md" | "lg" | null | undefined;
377
+ underline?: "none" | "hover" | "always" | null | undefined;
378
+ disabled?: boolean | null | undefined;
379
+ inverted?: boolean | null | undefined;
380
+ truncate?: boolean | null | undefined;
381
+ } & ClassProp) | undefined) => string;
382
+
383
+ export declare type LinkUnderline = RemoveNull_2<VariantProps<typeof linkStyles>>['underline'];
384
+
385
+ export declare type LinkVariants = RemoveNull_2<VariantProps<typeof linkStyles>>['variant'];
386
+
387
+ export declare const mergeRefs: <T>(...refs: Array<PossibleRef<T>>) => (node: T | null) => (() => void) | undefined;
388
+
318
389
  export declare const OrganizationChart: ForwardRefExoticComponent<OrgChartComponentProps & RefAttributes<OrgChartRef>>;
319
390
 
320
391
  export declare interface OrgChartApiNodeData {
@@ -385,6 +456,53 @@ export declare interface OrgChartRef {
385
456
  collapseAll: () => void;
386
457
  }
387
458
 
459
+ export declare const Popover: FC<PopoverProps>;
460
+
461
+ export declare type PopoverAlignments = 'start' | 'center' | 'end';
462
+
463
+ declare const popoverIconStyles: (props?: ({
464
+ variant?: "default" | "primary" | "info" | "success" | "warning" | "danger" | null | undefined;
465
+ } & ClassProp) | undefined) => string;
466
+
467
+ export declare type PopoverPlacements = 'top' | 'right' | 'bottom' | 'left';
468
+
469
+ export declare interface PopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, RemoveNull_2<VariantProps<typeof popoverIconStyles>> {
470
+ trigger?: ReactNode;
471
+ title?: ReactNode;
472
+ children?: ReactNode;
473
+ placement?: PopoverPlacements;
474
+ align?: PopoverAlignments;
475
+ open?: boolean;
476
+ defaultOpen?: boolean;
477
+ onOpenChange?: (open: boolean) => void;
478
+ closeLabel?: string;
479
+ closeOnEscape?: boolean;
480
+ closeOnOutsideClick?: boolean;
481
+ showArrow?: boolean;
482
+ showCloseButton?: boolean;
483
+ showSlotBorder?: boolean;
484
+ contentClassName?: string;
485
+ triggerClassName?: string;
486
+ }
487
+
488
+ export declare type PopoverVariants = RemoveNull_2<VariantProps<typeof popoverIconStyles>>['variant'];
489
+
490
+ export declare const Portal: FC<PortalProps>;
491
+
492
+ export declare interface PortalProps {
493
+ children: ReactNode;
494
+ container?: HTMLElement | null | undefined;
495
+ containerId?: string | undefined;
496
+ containerRef?: RefObject<HTMLElement | null> | undefined;
497
+ disabled?: boolean;
498
+ }
499
+
500
+ declare type PossibleRef<T> = Ref<T> | undefined;
501
+
502
+ declare interface PresenceChildProps {
503
+ children: ReactElement;
504
+ }
505
+
388
506
  export declare type RemoveNull<T> = {
389
507
  [K in keyof T]: Exclude<T[K], null>;
390
508
  };