@tanishraj/ui-kit 2.2.0 → 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.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +90 -29
- package/dist/index.es.js +49 -42
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +67 -1
package/dist/index.d.ts
CHANGED
|
@@ -360,33 +360,7 @@ export declare type DropdownAppearances = ButtonAppearances;
|
|
|
360
360
|
|
|
361
361
|
export declare type DropdownIcon = NonNullable<ButtonProps['leadingIcon']>;
|
|
362
362
|
|
|
363
|
-
export declare
|
|
364
|
-
|
|
365
|
-
declare interface DropdownItem_2 {
|
|
366
|
-
disabled?: boolean;
|
|
367
|
-
id?: string;
|
|
368
|
-
label: ReactNode;
|
|
369
|
-
leadingIcon?: DropdownIcon;
|
|
370
|
-
value: string;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
export declare interface DropdownItemComponentProps extends Omit<ComponentPropsWithoutRef<'button'>, 'children' | 'disabled' | 'onSelect' | 'value'> {
|
|
374
|
-
item: DropdownItem_2;
|
|
375
|
-
onSelect?: (item: DropdownItem_2) => void;
|
|
376
|
-
selected?: boolean;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
export declare const DropdownList: ForwardRefExoticComponent<DropdownListProps & RefAttributes<HTMLDivElement>>;
|
|
380
|
-
|
|
381
|
-
export declare interface DropdownListProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
|
|
382
|
-
children?: ReactNode;
|
|
383
|
-
closeMenu?: () => void;
|
|
384
|
-
closeOnSelect?: boolean;
|
|
385
|
-
items?: DropdownItem_2[];
|
|
386
|
-
leadingSlot?: ReactNode;
|
|
387
|
-
onItemSelect?: (item: DropdownItem_2) => void;
|
|
388
|
-
selectedValue?: string;
|
|
389
|
-
}
|
|
363
|
+
export declare type DropdownItem = ListBoxItemData;
|
|
390
364
|
|
|
391
365
|
export declare type DropdownPlacements = 'top' | 'right' | 'bottom' | 'left';
|
|
392
366
|
|
|
@@ -399,13 +373,13 @@ export declare interface DropdownProps extends Omit<ButtonProps, 'children' | 't
|
|
|
399
373
|
icon?: DropdownIcon;
|
|
400
374
|
iconOnly?: boolean;
|
|
401
375
|
inline?: boolean;
|
|
402
|
-
items?:
|
|
376
|
+
items?: DropdownItem[];
|
|
403
377
|
align?: DropdownAlignments;
|
|
404
378
|
menuClassName?: string;
|
|
405
379
|
menuContent?: ReactNode | ((closeMenu: () => void) => ReactNode);
|
|
406
380
|
menuOffset?: [number, number];
|
|
407
381
|
menuPlacement?: Placement;
|
|
408
|
-
onItemSelect?: (item:
|
|
382
|
+
onItemSelect?: (item: DropdownItem) => void;
|
|
409
383
|
onOpenChange?: (open: boolean) => void;
|
|
410
384
|
open?: boolean;
|
|
411
385
|
placement?: DropdownPlacements;
|
|
@@ -434,6 +408,31 @@ declare enum EThemeOptions {
|
|
|
434
408
|
DARK = "dark"
|
|
435
409
|
}
|
|
436
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
|
+
|
|
437
436
|
export declare const Link: FC<LinkProps>;
|
|
438
437
|
|
|
439
438
|
export declare type LinkIcon = FC<SVGProps<SVGSVGElement>>;
|
|
@@ -462,8 +461,70 @@ export declare type LinkUnderline = RemoveNull_2<VariantProps<typeof linkStyles>
|
|
|
462
461
|
|
|
463
462
|
export declare type LinkVariants = RemoveNull_2<VariantProps<typeof linkStyles>>['variant'];
|
|
464
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
|
+
|
|
465
497
|
export declare const mergeRefs: <T>(...refs: Array<PossibleRef<T>>) => (node: T | null) => (() => void) | undefined;
|
|
466
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
|
+
|
|
467
528
|
export declare const OrganizationChart: ForwardRefExoticComponent<OrgChartComponentProps & RefAttributes<OrgChartRef>>;
|
|
468
529
|
|
|
469
530
|
export declare interface OrgChartApiNodeData {
|