@unifiedsoftware/react-ui 2.0.1-beta.4 → 2.0.1-beta.6
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 +205 -193
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,9 +6,9 @@ import { FloatingRootContext } from '@floating-ui/react';
|
|
|
6
6
|
|
|
7
7
|
interface Props$O {
|
|
8
8
|
}
|
|
9
|
-
type NativeAttrs$
|
|
10
|
-
type DividerProps = Props$O & NativeAttrs$
|
|
11
|
-
declare const Divider: react.ForwardRefExoticComponent<Props$O & NativeAttrs$
|
|
9
|
+
type NativeAttrs$R = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$O>;
|
|
10
|
+
type DividerProps = Props$O & NativeAttrs$R;
|
|
11
|
+
declare const Divider: react.ForwardRefExoticComponent<Props$O & NativeAttrs$R & react.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
|
|
13
13
|
type BoxShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
14
|
type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -53,9 +53,9 @@ interface Props$N {
|
|
|
53
53
|
}) => React.ReactNode;
|
|
54
54
|
onChange?: (value: any[]) => void;
|
|
55
55
|
}
|
|
56
|
-
type NativeAttrs$
|
|
57
|
-
type AccordionProps = Props$N & NativeAttrs$
|
|
58
|
-
declare const Accordion: react.ForwardRefExoticComponent<Props$N & NativeAttrs$
|
|
56
|
+
type NativeAttrs$Q = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$N>;
|
|
57
|
+
type AccordionProps = Props$N & NativeAttrs$Q;
|
|
58
|
+
declare const Accordion: react.ForwardRefExoticComponent<Props$N & NativeAttrs$Q & react.RefAttributes<HTMLDivElement>>;
|
|
59
59
|
|
|
60
60
|
interface AccordionItemContextValue {
|
|
61
61
|
value: string;
|
|
@@ -72,9 +72,9 @@ interface Props$M {
|
|
|
72
72
|
isOpen: boolean;
|
|
73
73
|
}) => React.ReactNode;
|
|
74
74
|
}
|
|
75
|
-
type NativeAttrs$
|
|
76
|
-
type AccordionItemProps = Props$M & NativeAttrs$
|
|
77
|
-
declare const AccordionItem: react.ForwardRefExoticComponent<Props$M & NativeAttrs$
|
|
75
|
+
type NativeAttrs$P = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$M>;
|
|
76
|
+
type AccordionItemProps = Props$M & NativeAttrs$P;
|
|
77
|
+
declare const AccordionItem: react.ForwardRefExoticComponent<Props$M & NativeAttrs$P & react.RefAttributes<HTMLDivElement>>;
|
|
78
78
|
|
|
79
79
|
interface Props$L {
|
|
80
80
|
as?: React.ElementType;
|
|
@@ -94,9 +94,9 @@ interface Props$L {
|
|
|
94
94
|
subtitle?: React.HTMLAttributes<HTMLDivElement>;
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
type NativeAttrs$
|
|
98
|
-
type AccordionHeaderProps = Props$L & NativeAttrs$
|
|
99
|
-
declare const AccordionHeader: react.ForwardRefExoticComponent<Props$L & NativeAttrs$
|
|
97
|
+
type NativeAttrs$O = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$L>;
|
|
98
|
+
type AccordionHeaderProps = Props$L & NativeAttrs$O;
|
|
99
|
+
declare const AccordionHeader: react.ForwardRefExoticComponent<Props$L & NativeAttrs$O & react.RefAttributes<HTMLDivElement>>;
|
|
100
100
|
|
|
101
101
|
type AccordionBodyProps = React.HTMLAttributes<HTMLDivElement>;
|
|
102
102
|
declare const AccordionBody: react.ForwardRefExoticComponent<AccordionBodyProps & react.RefAttributes<HTMLDivElement>>;
|
|
@@ -345,12 +345,14 @@ interface UseElementSizeOptions<T> {
|
|
|
345
345
|
}
|
|
346
346
|
declare function useElementSize<T extends HTMLElement = any>(options: UseElementSizeOptions<T>): Resize;
|
|
347
347
|
|
|
348
|
-
|
|
348
|
+
declare function useExtractProps<T extends object, K extends keyof T>(props: T, keys: K[], defaults?: Partial<T>): [Pick<T, K>, Omit<T, K>];
|
|
349
|
+
|
|
350
|
+
interface UseResizeObserverOptions<T> {
|
|
349
351
|
ref?: React.RefObject<T | undefined>;
|
|
350
352
|
onResize: () => void;
|
|
351
353
|
}
|
|
352
354
|
declare function hasResizeObserver(): boolean;
|
|
353
|
-
declare function useResizeObserver<T extends Element>(options: UseResizeObserverOptions
|
|
355
|
+
declare function useResizeObserver<T extends Element>(options: UseResizeObserverOptions<T>): void;
|
|
354
356
|
|
|
355
357
|
declare function useEffectEvent<T extends Function>(fn: T): T;
|
|
356
358
|
|
|
@@ -482,19 +484,49 @@ interface FormatStringOptions {
|
|
|
482
484
|
type FormatOptions = FormatStringOptions | FormatNumberOptions | FormatDateOptions | FormatBooleanOptions | FormatCurrencyOptions | FormatPercentOptions | FormatFileSizeOptions;
|
|
483
485
|
declare function format(options: FormatOptions): string | undefined;
|
|
484
486
|
|
|
485
|
-
type
|
|
486
|
-
|
|
487
|
-
type
|
|
488
|
-
|
|
487
|
+
type ColorScheme = 'default' | 'light' | 'dark';
|
|
488
|
+
|
|
489
|
+
type MediaQuery = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
490
|
+
type Responsive<T> = T | {
|
|
491
|
+
/**
|
|
492
|
+
* Minimum captured size: 0px
|
|
493
|
+
*/
|
|
494
|
+
xs?: T;
|
|
495
|
+
/**
|
|
496
|
+
* Minimum captured size: 576px
|
|
497
|
+
*/
|
|
498
|
+
sm?: T;
|
|
499
|
+
/**
|
|
500
|
+
* Minimum captured size: 768px
|
|
501
|
+
*/
|
|
502
|
+
md?: T;
|
|
503
|
+
/**
|
|
504
|
+
* Minimum captured size: 992px
|
|
505
|
+
*/
|
|
506
|
+
lg?: T;
|
|
507
|
+
/**
|
|
508
|
+
* Minimum captured size: 1200px
|
|
509
|
+
*/
|
|
510
|
+
xl?: T;
|
|
511
|
+
/**
|
|
512
|
+
* Minimum captured size: 1400px
|
|
513
|
+
*/
|
|
514
|
+
'2xl'?: T;
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
type SelectionValue$1<TItem extends Record<string, any>, TKeyField extends keyof TItem, TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false> = TMultiple extends true ? TClearable extends true ? TItem[TKeyField][] | null : TItem[TKeyField][] : TClearable extends true ? TItem[TKeyField] | null : TItem[TKeyField];
|
|
518
|
+
type SelectionItem$1<TData extends Record<string, any>, TMultiple extends boolean | undefined, TClearable extends boolean | undefined> = TMultiple extends true ? TClearable extends true ? TData[] | null : TData[] : TClearable extends true ? TData | null : TData;
|
|
519
|
+
type SelectionOnChange$1<TData extends Record<string, any>, TKeyField extends keyof TData, TMultiple extends boolean | undefined, TClearable extends boolean | undefined> = (value: SelectionValue$1<TData, TKeyField, TMultiple, TClearable>, item: SelectionItem$1<TData, TMultiple, TClearable>) => void;
|
|
520
|
+
interface SelectionProps$1<TItem extends Record<string, any>, TKeyField extends keyof TItem, TMultiple extends boolean | undefined, TClearable extends boolean | undefined> {
|
|
489
521
|
data: TItem[];
|
|
490
522
|
isMultiple?: TMultiple;
|
|
491
523
|
clearable?: TClearable;
|
|
492
524
|
keyField?: TKeyField;
|
|
493
|
-
value?: SelectionValue<TItem, TKeyField, TMultiple, TClearable>;
|
|
494
|
-
onChange?: SelectionOnChange<TItem, TKeyField, TMultiple, TClearable>;
|
|
525
|
+
value?: SelectionValue$1<TItem, TKeyField, TMultiple, TClearable>;
|
|
526
|
+
onChange?: SelectionOnChange$1<TItem, TKeyField, TMultiple, TClearable>;
|
|
495
527
|
}
|
|
496
528
|
|
|
497
|
-
declare const valueToValues: <TItem extends Record<string, any>, TKeyField extends keyof TItem, TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false>(value?: SelectionValue<TItem, TKeyField, TMultiple, TClearable>) => TItem[TKeyField][];
|
|
529
|
+
declare const valueToValues: <TItem extends Record<string, any>, TKeyField extends keyof TItem, TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false>(value?: SelectionValue$1<TItem, TKeyField, TMultiple, TClearable>) => TItem[TKeyField][];
|
|
498
530
|
declare const valuesToValue: <TItem extends Record<string, any>, TKeyField extends keyof TItem>(values: TItem[TKeyField][]) => TItem[TKeyField] | null;
|
|
499
531
|
|
|
500
532
|
declare function areArraysEqual<T extends string | number | symbol>(arr1: T[], arr2: T[]): boolean;
|
|
@@ -545,39 +577,40 @@ declare const useTimer: ({ mode, initialSeconds, maxSeconds, onTick, onComplete
|
|
|
545
577
|
};
|
|
546
578
|
type Timer = ReturnType<typeof useTimer>;
|
|
547
579
|
|
|
548
|
-
type
|
|
549
|
-
|
|
550
|
-
type MediaQuery = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
551
|
-
type Responsive<T> = T | {
|
|
552
|
-
/**
|
|
553
|
-
* Minimum captured size: 0px
|
|
554
|
-
*/
|
|
555
|
-
xs?: T;
|
|
556
|
-
/**
|
|
557
|
-
* Minimum captured size: 576px
|
|
558
|
-
*/
|
|
559
|
-
sm?: T;
|
|
560
|
-
/**
|
|
561
|
-
* Minimum captured size: 768px
|
|
562
|
-
*/
|
|
563
|
-
md?: T;
|
|
564
|
-
/**
|
|
565
|
-
* Minimum captured size: 992px
|
|
566
|
-
*/
|
|
567
|
-
lg?: T;
|
|
568
|
-
/**
|
|
569
|
-
* Minimum captured size: 1200px
|
|
570
|
-
*/
|
|
571
|
-
xl?: T;
|
|
572
|
-
/**
|
|
573
|
-
* Minimum captured size: 1400px
|
|
574
|
-
*/
|
|
575
|
-
'2xl'?: T;
|
|
576
|
-
};
|
|
580
|
+
type SelectionItem = Record<string, any>;
|
|
577
581
|
|
|
578
|
-
type
|
|
582
|
+
type InputVariant = 'filled' | 'outlined' | 'text' | 'underlined';
|
|
579
583
|
type InputColor = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'dark' | 'light';
|
|
580
|
-
type
|
|
584
|
+
type InputSize = 'xl' | 'sm' | 'md' | 'lg' | 'xl';
|
|
585
|
+
|
|
586
|
+
interface InputBaseProps {
|
|
587
|
+
className?: string;
|
|
588
|
+
variant?: InputVariant;
|
|
589
|
+
color?: InputColor;
|
|
590
|
+
size?: InputSize;
|
|
591
|
+
startContent?: React.ReactNode;
|
|
592
|
+
endContent?: React.ReactNode;
|
|
593
|
+
startIcon?: React.ReactNode;
|
|
594
|
+
endIcon?: React.ReactNode;
|
|
595
|
+
startText?: string;
|
|
596
|
+
endText?: string;
|
|
597
|
+
disabled?: boolean;
|
|
598
|
+
clearable?: boolean;
|
|
599
|
+
closeButton?: boolean;
|
|
600
|
+
loading?: boolean;
|
|
601
|
+
error?: boolean;
|
|
602
|
+
readOnly?: boolean;
|
|
603
|
+
slotProps?: {
|
|
604
|
+
content?: React.HTMLAttributes<HTMLDivElement>;
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
type NativeAttrs$N = Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof InputBaseProps>;
|
|
608
|
+
type InputWrapperProps = InputBaseProps & NativeAttrs$N;
|
|
609
|
+
declare const InputWrapper: react.ForwardRefExoticComponent<InputBaseProps & NativeAttrs$N & react.RefAttributes<HTMLInputElement>>;
|
|
610
|
+
|
|
611
|
+
interface InputCloseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
612
|
+
}
|
|
613
|
+
declare const InputClose: React.FC<InputCloseProps>;
|
|
581
614
|
|
|
582
615
|
interface Props$K {
|
|
583
616
|
}
|
|
@@ -585,12 +618,20 @@ type NativeAttrs$M = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$K>;
|
|
|
585
618
|
type InputGroupProps = Props$K & NativeAttrs$M;
|
|
586
619
|
declare const InputGroup: react.ForwardRefExoticComponent<Props$K & NativeAttrs$M & react.RefAttributes<HTMLDivElement>>;
|
|
587
620
|
|
|
621
|
+
interface InputSelectorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
622
|
+
isOpen: boolean;
|
|
623
|
+
}
|
|
624
|
+
declare const InputSelector: React.FC<InputSelectorProps>;
|
|
625
|
+
|
|
626
|
+
declare function useInputProps<TProps extends InputBaseProps = InputBaseProps>(props: TProps): [Pick<TProps, "className" | "color" | "size" | "variant" | "disabled" | "startContent" | "endContent" | "slotProps" | "error" | "readOnly" | "startIcon" | "endIcon" | "startText" | "endText" | "loading">, Omit<TProps, "className" | "color" | "size" | "variant" | "disabled" | "startContent" | "endContent" | "slotProps" | "error" | "readOnly" | "startIcon" | "endIcon" | "startText" | "endText" | "loading">];
|
|
627
|
+
|
|
588
628
|
type ListSize = 'sm' | 'md' | 'lg';
|
|
589
629
|
|
|
590
630
|
interface ListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
591
631
|
as?: React.ElementType;
|
|
592
632
|
size?: ListSize;
|
|
593
633
|
divider?: boolean;
|
|
634
|
+
nav?: boolean;
|
|
594
635
|
}
|
|
595
636
|
declare const List: react.ForwardRefExoticComponent<ListProps & react.RefAttributes<HTMLDivElement>>;
|
|
596
637
|
|
|
@@ -656,47 +697,47 @@ declare const Result: React.FC<ResultProps>;
|
|
|
656
697
|
|
|
657
698
|
type AutocompleteMultiple = false;
|
|
658
699
|
type AutocompleteClearable = true;
|
|
659
|
-
type
|
|
700
|
+
type AutocompleteItem = SelectionItem;
|
|
701
|
+
type AutocompleteKeyField<TAutocompleteItem> = keyof TAutocompleteItem;
|
|
702
|
+
type NativeAttrs$J<TAutocompleteItem extends AutocompleteItem, TAutocompleteKeyField extends AutocompleteKeyField<TAutocompleteItem> = 'value'> = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$H<TAutocompleteItem, TAutocompleteKeyField>>;
|
|
660
703
|
type BaseProps$1<TItem extends Record<string, any>> = {
|
|
661
704
|
textField?: keyof TItem;
|
|
662
705
|
placeholder?: string;
|
|
663
706
|
filter?: string;
|
|
664
707
|
loading?: boolean;
|
|
665
708
|
disabled?: boolean;
|
|
666
|
-
readOnly?: boolean;
|
|
667
709
|
disclosure?: Disclosure;
|
|
668
710
|
virtual?: Omit<VirtualizerOptions, 'parentRef'>;
|
|
669
|
-
color?: InputColor;
|
|
670
|
-
variant?: InputVariant;
|
|
671
|
-
size?: InputSize;
|
|
672
711
|
startContent?: React.ReactNode;
|
|
673
712
|
endContent?: React.ReactNode;
|
|
713
|
+
target?: boolean;
|
|
714
|
+
readOnly?: boolean;
|
|
715
|
+
inner?: boolean;
|
|
716
|
+
onClear?: () => void;
|
|
674
717
|
onItemSelect?: (item: TItem) => void;
|
|
675
718
|
onFilterChange?: (value: string) => void;
|
|
676
719
|
renderItem?: (item: TItem, props: ListItemProps) => React.ReactNode;
|
|
677
720
|
renderNoData?: (props: ResultProps) => React.ReactNode;
|
|
678
721
|
};
|
|
679
|
-
type Props$H<TItem extends Record<string, any>, TKeyField extends keyof TItem = '
|
|
680
|
-
type AutocompleteProps<TItem extends Record<string, any>, TKeyField extends keyof TItem = '
|
|
722
|
+
type Props$H<TItem extends Record<string, any>, TKeyField extends keyof TItem = 'value', TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false> = BaseProps$1<TItem> & SelectionProps<TItem, TKeyField, TMultiple, TClearable> & Omit<InputBaseProps, 'clearable'>;
|
|
723
|
+
type AutocompleteProps<TItem extends Record<string, any>, TKeyField extends keyof TItem = 'value', TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false> = Props$H<TItem, TKeyField, TMultiple, TClearable> & NativeAttrs$J<TItem, TKeyField>;
|
|
724
|
+
type SelectionValue<TItem extends Record<string, any>, TKeyField extends keyof TItem, TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false> = TMultiple extends true ? TClearable extends true ? TItem[TKeyField][] | undefined | null : TItem[TKeyField][] : TClearable extends true ? TItem[TKeyField] | undefined | null : TItem[TKeyField];
|
|
725
|
+
type SelectionOnChangeValue<TItem extends Record<string, any>, TKeyField extends keyof TItem, TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false> = TMultiple extends true ? TClearable extends true ? TItem[TKeyField][] | null : TItem[TKeyField][] : TClearable extends true ? TItem[TKeyField] | null : TItem[TKeyField];
|
|
726
|
+
type SelectionOnChangeItem<TData extends Record<string, any>, TMultiple extends boolean | undefined, TClearable extends boolean | undefined> = TMultiple extends true ? TClearable extends true ? TData[] | null : TData[] : TClearable extends true ? TData | null : TData;
|
|
727
|
+
type SelectionOnChange<TData extends Record<string, any>, TKeyField extends keyof TData, TMultiple extends boolean | undefined, TClearable extends boolean | undefined> = (value: SelectionOnChangeValue<TData, TKeyField, TMultiple, TClearable>, item: SelectionOnChangeItem<TData, TMultiple, TClearable>) => void;
|
|
728
|
+
type SelectionRenderTrigger<TData extends Record<string, any>, TKeyField extends keyof TData, TMultiple extends boolean | undefined, TClearable extends boolean | undefined> = (value?: SelectionOnChangeValue<TData, TKeyField, TMultiple, TClearable>, item?: SelectionOnChangeItem<TData, TMultiple, TClearable>) => React.ReactNode;
|
|
729
|
+
interface SelectionProps<TItem extends Record<string, any>, TKeyField extends keyof TItem, TMultiple extends boolean | undefined, TClearable extends boolean | undefined> {
|
|
730
|
+
data: TItem[];
|
|
731
|
+
isMultiple?: TMultiple;
|
|
732
|
+
clearable?: TClearable;
|
|
733
|
+
keyField?: TKeyField;
|
|
734
|
+
value?: SelectionValue<TItem, TKeyField, TMultiple, TClearable>;
|
|
735
|
+
onChange?: SelectionOnChange<TItem, TKeyField, TMultiple, TClearable>;
|
|
736
|
+
renderTrigger?: SelectionRenderTrigger<TItem, TKeyField, TMultiple, TClearable>;
|
|
737
|
+
}
|
|
681
738
|
|
|
682
739
|
declare const Autocomplete: <TItem extends Record<string, any>, TKeyField extends keyof TItem = "key", TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = true>(props: AutocompleteProps<TItem, TKeyField, TMultiple, TClearable>) => react_jsx_runtime.JSX.Element;
|
|
683
740
|
|
|
684
|
-
type AutocompleteContextValue<TItem extends Record<string, any>, TKeyField extends keyof TItem = 'key'> = {
|
|
685
|
-
data: TItem[];
|
|
686
|
-
values: TItem[TKeyField][];
|
|
687
|
-
keyField: TKeyField;
|
|
688
|
-
textField: keyof TItem;
|
|
689
|
-
isMultiple: boolean;
|
|
690
|
-
virtual?: Omit<VirtualizerOptions, 'parentRef'>;
|
|
691
|
-
onChange: (value: TItem[]) => void;
|
|
692
|
-
onItemSelect: (item: TItem) => void;
|
|
693
|
-
renderItem?: (item: TItem, props: ListItemProps) => React.ReactNode;
|
|
694
|
-
offset: number;
|
|
695
|
-
setOffset: React.Dispatch<React.SetStateAction<number>>;
|
|
696
|
-
};
|
|
697
|
-
declare const AutocompleteContext: react.Context<AutocompleteContextValue<Record<string, any>, string> | null>;
|
|
698
|
-
declare const useAutocomplete: () => AutocompleteContextValue<Record<string, any>, string>;
|
|
699
|
-
|
|
700
741
|
type BackdropPlacement = 'top' | 'left' | 'center' | 'right' | 'bottom';
|
|
701
742
|
type BackdropVariant = 'opaque' | 'blur' | 'transparent';
|
|
702
743
|
|
|
@@ -1291,7 +1332,7 @@ type BaseProps<TItem extends Record<string, any>> = {
|
|
|
1291
1332
|
renderItem?: (item: TItem, props: ListItemProps) => React.ReactNode;
|
|
1292
1333
|
renderNoData?: (props: ResultProps) => React.ReactNode;
|
|
1293
1334
|
};
|
|
1294
|
-
type Props$q<TItem extends Record<string, any>, TKeyField extends keyof TItem = 'key', TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false> = BaseProps<TItem> & SelectionProps<TItem, TKeyField, TMultiple, TClearable>;
|
|
1335
|
+
type Props$q<TItem extends Record<string, any>, TKeyField extends keyof TItem = 'key', TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false> = BaseProps<TItem> & SelectionProps$1<TItem, TKeyField, TMultiple, TClearable>;
|
|
1295
1336
|
type SelectProps<TItem extends Record<string, any>, TKeyField extends keyof TItem = 'key', TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false> = Props$q<TItem, TKeyField, TMultiple, TClearable> & NativeAttrs$s<TItem, TKeyField>;
|
|
1296
1337
|
|
|
1297
1338
|
declare const Select: <TItem extends Record<string, any>, TKeyField extends keyof TItem = "key", TMultiple extends boolean | undefined = false, TClearable extends boolean | undefined = false>(props: SelectProps<TItem, TKeyField, TMultiple, TClearable>) => react_jsx_runtime.JSX.Element;
|
|
@@ -2059,48 +2100,22 @@ type Rect = {
|
|
|
2059
2100
|
width: number;
|
|
2060
2101
|
height: number;
|
|
2061
2102
|
};
|
|
2062
|
-
type Cursor = {
|
|
2063
|
-
x: number;
|
|
2064
|
-
y: number;
|
|
2065
|
-
};
|
|
2066
2103
|
type LayoutMeta = {
|
|
2067
2104
|
id: string;
|
|
2068
2105
|
x: number;
|
|
2069
2106
|
y: number;
|
|
2070
2107
|
width: number;
|
|
2071
2108
|
height: number;
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
id: string;
|
|
2077
|
-
x: number;
|
|
2078
|
-
y: number;
|
|
2079
|
-
isEmpty: boolean;
|
|
2080
|
-
isVertical: boolean;
|
|
2081
|
-
windows: PanelMeta[];
|
|
2082
|
-
gridX: number;
|
|
2083
|
-
gridY: number;
|
|
2084
|
-
gridW: number;
|
|
2085
|
-
gridH: number;
|
|
2086
|
-
fullDimensions: {
|
|
2087
|
-
x: number;
|
|
2088
|
-
y: number;
|
|
2089
|
-
width: number;
|
|
2090
|
-
height: number;
|
|
2091
|
-
};
|
|
2092
|
-
emptyDimensions: {
|
|
2093
|
-
x: any;
|
|
2094
|
-
y: any;
|
|
2095
|
-
width: any;
|
|
2096
|
-
height: any;
|
|
2097
|
-
};
|
|
2109
|
+
minWidth?: number;
|
|
2110
|
+
maxWidth?: number;
|
|
2111
|
+
minHeight?: number;
|
|
2112
|
+
maxHeight?: number;
|
|
2098
2113
|
};
|
|
2099
2114
|
type PanelMeta = {
|
|
2100
2115
|
id: string;
|
|
2101
2116
|
title: string;
|
|
2102
|
-
icon?:
|
|
2103
|
-
render?:
|
|
2117
|
+
icon?: React.ReactNode;
|
|
2118
|
+
render?: React.ReactNode;
|
|
2104
2119
|
x?: number;
|
|
2105
2120
|
y?: number;
|
|
2106
2121
|
width?: number;
|
|
@@ -2109,7 +2124,7 @@ type PanelMeta = {
|
|
|
2109
2124
|
maximized?: boolean;
|
|
2110
2125
|
snapped?: boolean;
|
|
2111
2126
|
closed?: boolean;
|
|
2112
|
-
zIndex
|
|
2127
|
+
zIndex: number;
|
|
2113
2128
|
layoutId?: string;
|
|
2114
2129
|
closable?: boolean;
|
|
2115
2130
|
minWidth?: number;
|
|
@@ -2117,122 +2132,119 @@ type PanelMeta = {
|
|
|
2117
2132
|
minHeight?: number;
|
|
2118
2133
|
maxHeight?: number;
|
|
2119
2134
|
};
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2135
|
+
type Direction = 'top' | 'bottom' | 'left' | 'right';
|
|
2136
|
+
interface EdgeFlags {
|
|
2137
|
+
top: boolean;
|
|
2138
|
+
bottom: boolean;
|
|
2139
|
+
left: boolean;
|
|
2140
|
+
right: boolean;
|
|
2141
|
+
}
|
|
2142
|
+
interface LayoutRect extends Rect {
|
|
2143
|
+
id: string;
|
|
2144
|
+
gridX: number;
|
|
2145
|
+
gridY: number;
|
|
2146
|
+
gridW: number;
|
|
2147
|
+
gridH: number;
|
|
2148
|
+
isEmpty: boolean;
|
|
2149
|
+
isVertical: boolean;
|
|
2150
|
+
baseFull: Rect;
|
|
2151
|
+
baseEmpty: Rect;
|
|
2152
|
+
dimensions: Rect;
|
|
2153
|
+
fullDimensions: Rect;
|
|
2154
|
+
emptyDimensions: Rect;
|
|
2155
|
+
edges: LayoutEdge[];
|
|
2156
|
+
gridEdges: EdgeFlags;
|
|
2157
|
+
gridBorders: EdgeFlags;
|
|
2158
|
+
}
|
|
2159
|
+
interface LayoutEdge {
|
|
2160
|
+
layoutId: string | null;
|
|
2161
|
+
direction: Direction;
|
|
2162
|
+
border: boolean;
|
|
2126
2163
|
}
|
|
2127
|
-
|
|
2164
|
+
|
|
2128
2165
|
declare function useLayoutPanelManager({ layouts, setLayouts, panels, setPanels, windowContainerRef, layoutContainerRef, }: {
|
|
2129
2166
|
layouts: LayoutMeta[];
|
|
2130
|
-
setLayouts:
|
|
2167
|
+
setLayouts: React.Dispatch<React.SetStateAction<LayoutMeta[]>>;
|
|
2131
2168
|
panels: PanelMeta[];
|
|
2132
|
-
setPanels:
|
|
2133
|
-
windowContainerRef:
|
|
2134
|
-
layoutContainerRef:
|
|
2169
|
+
setPanels: React.Dispatch<React.SetStateAction<PanelMeta[]>>;
|
|
2170
|
+
windowContainerRef: React.RefObject<HTMLDivElement>;
|
|
2171
|
+
layoutContainerRef: React.RefObject<HTMLDivElement>;
|
|
2135
2172
|
}): {
|
|
2136
2173
|
isMobile: boolean;
|
|
2137
2174
|
layouts: LayoutMeta[];
|
|
2138
|
-
setLayouts:
|
|
2175
|
+
setLayouts: react.Dispatch<react.SetStateAction<LayoutMeta[]>>;
|
|
2139
2176
|
panels: PanelMeta[];
|
|
2140
|
-
panelsRef:
|
|
2141
|
-
setPanels:
|
|
2142
|
-
layoutContainerRef:
|
|
2143
|
-
windowContainerRef:
|
|
2177
|
+
panelsRef: react.MutableRefObject<Record<string, PanelMeta>>;
|
|
2178
|
+
setPanels: react.Dispatch<react.SetStateAction<PanelMeta[]>>;
|
|
2179
|
+
layoutContainerRef: react.RefObject<HTMLDivElement>;
|
|
2180
|
+
windowContainerRef: react.RefObject<HTMLDivElement>;
|
|
2144
2181
|
windowContainerRect: Rect;
|
|
2145
2182
|
layoutContainerRect: Rect;
|
|
2146
|
-
panelPrevRectsRef:
|
|
2147
|
-
activePanel:
|
|
2183
|
+
panelPrevRectsRef: react.MutableRefObject<Record<string, Rect>>;
|
|
2184
|
+
activePanel: string | null;
|
|
2148
2185
|
layoutPanelIds: Record<string, string[]>;
|
|
2149
2186
|
selectWindow: (id: string) => void;
|
|
2150
2187
|
updateWindow: (id: string, patch: Partial<PanelMeta>) => void;
|
|
2151
2188
|
closeWindow: (id: string) => void;
|
|
2152
2189
|
minimizeWindow: (id: string) => void;
|
|
2153
2190
|
createWindow: (win: Optional<Omit<PanelMeta, "zIndex">, "id">) => string;
|
|
2154
|
-
newPositions:
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
gridY: number;
|
|
2158
|
-
gridW: number;
|
|
2159
|
-
gridH: number;
|
|
2160
|
-
windows: PanelMeta[];
|
|
2161
|
-
isEmpty: boolean;
|
|
2162
|
-
isVertical: boolean;
|
|
2163
|
-
fullDimensions: Rect;
|
|
2164
|
-
emptyDimensions: Rect;
|
|
2165
|
-
baseFull: Rect;
|
|
2166
|
-
baseEmpty: Rect;
|
|
2167
|
-
} & Rect)[];
|
|
2168
|
-
simulateLayoutPositions: (panelId: string, layoutId: string) => ({
|
|
2169
|
-
id: string;
|
|
2170
|
-
gridX: number;
|
|
2171
|
-
gridY: number;
|
|
2172
|
-
gridW: number;
|
|
2173
|
-
gridH: number;
|
|
2174
|
-
windows: PanelMeta[];
|
|
2175
|
-
isEmpty: boolean;
|
|
2176
|
-
isVertical: boolean;
|
|
2177
|
-
fullDimensions: Rect;
|
|
2178
|
-
emptyDimensions: Rect;
|
|
2179
|
-
baseFull: Rect;
|
|
2180
|
-
baseEmpty: Rect;
|
|
2181
|
-
} & Rect)[];
|
|
2182
|
-
hoveredLayoutIdRef: react__default.MutableRefObject<Record<string, string | null>>;
|
|
2191
|
+
newPositions: LayoutRect[];
|
|
2192
|
+
simulateLayoutPositions: (panelId: string, layoutId: string) => LayoutRect[];
|
|
2193
|
+
hoveredLayoutIdRef: react.MutableRefObject<Record<string, string | null>>;
|
|
2183
2194
|
hoveredLayoutId: Record<string, string | null>;
|
|
2184
|
-
setHoveredLayoutId:
|
|
2195
|
+
setHoveredLayoutId: react.Dispatch<react.SetStateAction<Record<string, string | null>>>;
|
|
2196
|
+
activePanelsByLayout: Record<string, string | null>;
|
|
2197
|
+
updateLayoutSize: (layoutId: string, newRect: Rect, isResizing?: boolean) => void;
|
|
2198
|
+
registerTabDragHandler: (panelId: string, handler: (event: React.PointerEvent) => void) => void;
|
|
2199
|
+
getTabDragHandler: (panelId: string) => (event: React.PointerEvent) => void;
|
|
2185
2200
|
};
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
layoutContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2189
|
-
windowContainerRect: Rect;
|
|
2190
|
-
layoutContainerRect: Rect;
|
|
2201
|
+
|
|
2202
|
+
declare const useLayoutManager: () => {
|
|
2191
2203
|
isMobile: boolean;
|
|
2204
|
+
layouts: LayoutMeta[];
|
|
2205
|
+
setLayouts: react__default.Dispatch<react__default.SetStateAction<LayoutMeta[]>>;
|
|
2192
2206
|
panels: PanelMeta[];
|
|
2193
2207
|
panelsRef: react__default.MutableRefObject<Record<string, PanelMeta>>;
|
|
2194
2208
|
setPanels: react__default.Dispatch<react__default.SetStateAction<PanelMeta[]>>;
|
|
2209
|
+
layoutContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2210
|
+
windowContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2211
|
+
windowContainerRect: Rect;
|
|
2212
|
+
layoutContainerRect: Rect;
|
|
2195
2213
|
panelPrevRectsRef: react__default.MutableRefObject<Record<string, Rect>>;
|
|
2196
|
-
activePanel
|
|
2197
|
-
|
|
2214
|
+
activePanel: string | null;
|
|
2215
|
+
layoutPanelIds: Record<string, string[]>;
|
|
2198
2216
|
selectWindow: (id: string) => void;
|
|
2217
|
+
updateWindow: (id: string, patch: Partial<PanelMeta>) => void;
|
|
2199
2218
|
closeWindow: (id: string) => void;
|
|
2200
2219
|
minimizeWindow: (id: string) => void;
|
|
2201
|
-
createWindow: (win: Optional<Omit<PanelMeta,
|
|
2202
|
-
|
|
2203
|
-
|
|
2220
|
+
createWindow: (win: Optional<Omit<PanelMeta, "zIndex">, "id">) => string;
|
|
2221
|
+
newPositions: LayoutRect[];
|
|
2222
|
+
simulateLayoutPositions: (panelId: string, layoutId: string) => LayoutRect[];
|
|
2204
2223
|
hoveredLayoutIdRef: react__default.MutableRefObject<Record<string, string | null>>;
|
|
2205
2224
|
hoveredLayoutId: Record<string, string | null>;
|
|
2206
2225
|
setHoveredLayoutId: react__default.Dispatch<react__default.SetStateAction<Record<string, string | null>>>;
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
gridW: number;
|
|
2213
|
-
gridH: number;
|
|
2214
|
-
windows: PanelMeta[];
|
|
2215
|
-
isEmpty: boolean;
|
|
2216
|
-
isVertical: boolean;
|
|
2217
|
-
fullDimensions: Rect;
|
|
2218
|
-
emptyDimensions: Rect;
|
|
2219
|
-
baseFull: Rect;
|
|
2220
|
-
baseEmpty: Rect;
|
|
2221
|
-
} & Rect)[];
|
|
2222
|
-
}
|
|
2223
|
-
declare const useLayoutManager: () => LayoutManagerContextValue;
|
|
2226
|
+
activePanelsByLayout: Record<string, string | null>;
|
|
2227
|
+
updateLayoutSize: (layoutId: string, newRect: Rect, isResizing?: boolean) => void;
|
|
2228
|
+
registerTabDragHandler: (panelId: string, handler: (event: react__default.PointerEvent) => void) => void;
|
|
2229
|
+
getTabDragHandler: (panelId: string) => (event: react__default.PointerEvent) => void;
|
|
2230
|
+
};
|
|
2224
2231
|
declare function LayoutManager({ children, ...manager }: ReturnType<typeof useLayoutPanelManager> & {
|
|
2225
2232
|
children: react__default.ReactNode;
|
|
2226
2233
|
}): react_jsx_runtime.JSX.Element;
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
}
|
|
2230
|
-
declare const useLayoutManagerPanel: () => LayoutManagerPanelContextValue;
|
|
2231
|
-
declare function LayoutManagerLayouts(): react_jsx_runtime.JSX.Element | undefined;
|
|
2232
|
-
declare function LayoutManagerPanels(): react_jsx_runtime.JSX.Element;
|
|
2233
|
-
declare function LayoutManagerTaskbar(): react_jsx_runtime.JSX.Element;
|
|
2234
|
-
declare function LayoutManagerColissions({ layoutIds }: {
|
|
2234
|
+
|
|
2235
|
+
declare function LayoutCollisions({ layoutIds }: {
|
|
2235
2236
|
layoutIds: string[];
|
|
2236
2237
|
}): react_jsx_runtime.JSX.Element | undefined;
|
|
2237
2238
|
|
|
2238
|
-
|
|
2239
|
+
declare function Layouts(): react_jsx_runtime.JSX.Element | undefined;
|
|
2240
|
+
|
|
2241
|
+
declare function Panels(): react_jsx_runtime.JSX.Element;
|
|
2242
|
+
|
|
2243
|
+
declare function Taskbar(): react_jsx_runtime.JSX.Element;
|
|
2244
|
+
|
|
2245
|
+
interface PanelContextValue {
|
|
2246
|
+
panel: PanelMeta;
|
|
2247
|
+
}
|
|
2248
|
+
declare const usePanel: () => PanelContextValue;
|
|
2249
|
+
|
|
2250
|
+
export { Accordion, type AccordionArrow, AccordionBody, type AccordionBodyProps, type AccordionColor, AccordionContent, type AccordionContentProps, AccordionContext, AccordionHeader, type AccordionHeaderProps, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionSize, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, Autocomplete, type AutocompleteClearable, type AutocompleteItem, type AutocompleteKeyField, type AutocompleteMultiple, type AutocompleteProps, Backdrop, type BackdropPlacement, type BackdropProps, type BackdropVariant, Badge, type BadgeProps, Button, type ButtonColor, ButtonGroup, ButtonGroupContext, type ButtonGroupContextValue, type ButtonGroupDirection, type ButtonGroupProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, CardMedia, type CardMediaProps, type CardProps, CardSubtitle, type CardSubtitleProps, CardTitle, type CardTitleProps, Checkbox, type CheckboxColor, CheckboxGroup, type CheckboxGroupAlignment, CheckboxGroupContext, type CheckboxGroupContextValue, type CheckboxGroupDirection, type CheckboxGroupProps, type CheckboxLabelPlacement, type CheckboxProps, type CheckboxSize, type CheckboxValue, Chip, type ChipProps, Collapse, CollapseContent, type CollapseContentProps, CollapseContext, type CollapseContextValue, type CollapseProps, CollapseTrigger, type CollapseTriggerProps, type ColorScheme, type ContainerBreakpoints, ContainerMediaQuery, DataList, type DataListItem, type DataListKeyField, type DataListMultipleProps, type DataListProps, type DataListSingleProps, Description, DescriptionEmpty, type DescriptionEmptyProps, type DescriptionProps, DescriptionText, type DescriptionTextProps, Descriptions, type DescriptionsAlign, DescriptionsContext, type DescriptionsContextValue, type DescriptionsLayout, type DescriptionsMode, type DescriptionsProps, type DescriptionsSize, type Disclosure, Divider, type DividerProps, Draggable, DraggableContent, type DraggableContentProps, DraggableTrigger, Drawer, type DrawerBackdrop, DrawerBody, type DrawerBodyProps, type DrawerClose, DrawerContext, type DrawerContextValue, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, type DrawerPosition, type DrawerProps, type DrawerSize, Dropdown, DropdownContent, type DropdownContentProps, DropdownContext, type DropdownContextValue, DropdownItem, type DropdownItemProps, type DropdownProps, DropdownTrigger, type DropdownTriggerProps, Field, type FieldProps, type FormatBooleanOptions, type FormatCurrencyOptions, type FormatDateOptions, type FormatFileSizeOptions, type FormatNumberOptions, type FormatOptions, type FormatPercentOptions, type FormatStringOptions, Grid, GridContext, type GridContextValue, GridItem, type GridItemProps, type GridMode, type GridProps, GridSub, type GridSubProps, Html, type HtmlProps, INDENT_SIZE, Icon, type IconColor, type IconProps, type IconSize, Iframe, type IframeProps, type InfiniteData, type InfiniteQueryFunction, type InfiniteQueryOptions, type InfiniteQueryRefetchOptions, type InputBaseProps, InputClose, type InputCloseProps, type InputColor, InputGroup, type InputGroupProps, InputSelector, type InputSelectorProps, type InputSize, type InputVariant, InputWrapper, type InputWrapperProps, LayoutManager, LayoutCollisions as LayoutManagerColissions, Layouts as LayoutManagerLayouts, Panels as LayoutManagerPanels, Taskbar as LayoutManagerTaskbar, type LayoutMeta, List, ListGroup, type ListGroupProps, ListItem, type ListItemProps, type ListProps, type ListSize, ListSubheader, type ListSubheaderProps, ListTree, ListTreeContext, type ListTreeContextValue, ListTreeItem, ListTreeItemIndentation, type ListTreeItemProps, type ListTreeProps, type MediaQuery, Menu, MenuContext, type MenuContextValue, MenuGroup, type MenuGroupItemType, type MenuGroupProps, MenuItem, type MenuItemProps, type MenuItemType, type MenuProps, MenuSubmenu, type MenuSubmenuProps, MenuValueContext, Modal, type ModalBackdrop, ModalBody, type ModalBodyProps, type ModalClose, ModalContent, type ModalContentProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, type ModalPlacement, type ModalProps, type ModalScrollBehavior, type ModalSize, type MutationError, type MutationFunction, type MutationOK, type MutationResult, MutationStatus, NavRail, NavRailItem, type NavRailItemProps, type NavRailPlacement, type NavRailProps, type PanelMeta, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, type PortalProps, type QueryFunction, QueryStatus, Radio, type RadioColor, RadioGroup, type RadioGroupAlignment, RadioGroupContext, type RadioGroupContextValue, type RadioGroupDirection, type RadioGroupProps, type RadioLabelPlacement, type RadioProps, type RadioSize, type RadioValue, type ReactRef, type Resize, type Responsive, Result, type ResultProps, type ResultStatus, STRING_RULES, type ScrollAlignment, ScrollArea, type ScrollAreaProps, type ScrollBehavior, type ScrollToOptions, Select, type SelectClearable, SelectContext, type SelectContextValue, type SelectMultiple, type SelectProps, type SelectionItem$1 as SelectionItem, type SelectionOnChange$1 as SelectionOnChange, type SelectionProps$1 as SelectionProps, type SelectionValue$1 as SelectionValue, Step, type StepColor, type StepProps, Steps, StepsContext, type StepsContextValue, type StepsProps, type StringRules, Swipe, SwipeItem, type SwipeItemProps, type SwipeProps, Switch, type SwitchColor, type SwitchLabelPlacement, type SwitchProps, type SwitchSize, Tab, type TabProps, Tabs, type TabsAlignment, type TabsProps, type TabsVariant, TextInput, type TextInputProps, type Timer, type TimerMode, Toolbar, type ToolbarColor, type ToolbarProps, type ToolbarSize, type ToolbarVariant, Transition, type TransitionProps, Tree, TreeContext, type TreeContextValue, TreeItem, type TreeItemBase, type TreeItemData, type TreeItemProps, type TreeItemValue, type TreeProps$1 as TreeProps, type UploadFileData, type UploadFileProps, UploadFiles, type UseContainerMediaQueryOptions, type UseInfiniteQueryOptions, type UseInfiniteQueryResult, type UseMutationOptions, type UseMutationResult, type UseQueryOptions, type UseQueryResult, type UseResizeObserverOptions, type VirtualItem, type Virtualizer, type VirtualizerOptions, areArraysEqual, assignRef, breakpointsMap, clsx, containsPlainText, defaultBreakpoints, doesNotContainEmojis, flattenTree, format, formatCurrency, formatDate, formatDateTime, formatFileSize, formatPercent, formatShortDateTime, formatTime, generateId, getOpenValuesByPathname, hasResizeObserver, initializeTreeValues, isAlphanumeric, isEmpty, isEmptyString, isNumeric, mergeRefs, reactNodeToText, scrollToItem, toAlphaString, toAlphanumericString, toLocalDateString, toLocalDateTimeString, toNotEmojisString, toNumericString, toPlainTextString, toRulesString, updateTreeValues, useAccordion, useAccordionItem, useButtonGroup, useCheckboxGroup, useCollapse, useContainerMediaQuery, useDebounce, useDescriptionsContext, useDisclosure, useDrawer, useDropdownContext, useEffectEvent, useElementSize, useExtractProps, useFormat, useGridContext, useInfiniteQuery, useInputProps, useLayoutManager, usePanel as useLayoutManagerPanel, useLayoutPanelManager, useLocalStorage, useMediaQuery, useMenu, useMenuItemValue, useModal, useMutation, useOnClickOutside, usePopover, usePrevious, useQuery, useRadioGroup, useResizeObserver, useSelect, useStep, useStepsContext, useTimer, useTree, useValueEffect, useVirtualizer, validateRules, valueToValues, valuesToValue };
|