@unifiedsoftware/react-ui 2.0.1-beta.1 → 2.0.1-beta.10
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 +288 -93
- 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,6 +345,8 @@ interface UseElementSizeOptions<T> {
|
|
|
345
345
|
}
|
|
346
346
|
declare function useElementSize<T extends HTMLElement = any>(options: UseElementSizeOptions<T>): Resize;
|
|
347
347
|
|
|
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
|
+
|
|
348
350
|
interface UseResizeObserverOptions<T> {
|
|
349
351
|
ref?: React.RefObject<T | undefined>;
|
|
350
352
|
onResize: () => void;
|
|
@@ -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;
|
|
@@ -525,39 +557,60 @@ declare function useFormat(options: FormatOptions): {
|
|
|
525
557
|
getValue: (value: any) => string | undefined;
|
|
526
558
|
};
|
|
527
559
|
|
|
528
|
-
type
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
* Minimum captured size: 992px
|
|
546
|
-
*/
|
|
547
|
-
lg?: T;
|
|
548
|
-
/**
|
|
549
|
-
* Minimum captured size: 1200px
|
|
550
|
-
*/
|
|
551
|
-
xl?: T;
|
|
552
|
-
/**
|
|
553
|
-
* Minimum captured size: 1400px
|
|
554
|
-
*/
|
|
555
|
-
'2xl'?: T;
|
|
560
|
+
type TimerMode = 'up' | 'down';
|
|
561
|
+
interface UseTimerOptions {
|
|
562
|
+
mode: TimerMode;
|
|
563
|
+
initialSeconds: number;
|
|
564
|
+
maxSeconds?: number;
|
|
565
|
+
onTick?: (seconds: number) => void;
|
|
566
|
+
onComplete?: () => void;
|
|
567
|
+
}
|
|
568
|
+
declare const useTimer: ({ mode, initialSeconds, maxSeconds, onTick, onComplete }: UseTimerOptions) => {
|
|
569
|
+
seconds: number;
|
|
570
|
+
formattedTime: string;
|
|
571
|
+
isRunning: boolean;
|
|
572
|
+
isCompleted: boolean;
|
|
573
|
+
start: () => void;
|
|
574
|
+
pause: () => void;
|
|
575
|
+
reset: (newSeconds?: number) => void;
|
|
576
|
+
stop: () => void;
|
|
556
577
|
};
|
|
578
|
+
type Timer = ReturnType<typeof useTimer>;
|
|
579
|
+
|
|
580
|
+
type SelectionItem = Record<string, any>;
|
|
557
581
|
|
|
558
|
-
type InputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
559
|
-
type InputColor = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'dark' | 'light';
|
|
560
582
|
type InputVariant = 'filled' | 'outlined' | 'flat' | 'text';
|
|
583
|
+
type InputColor = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'dark' | 'light';
|
|
584
|
+
type InputSize = 'xs' | '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>;
|
|
561
614
|
|
|
562
615
|
interface Props$K {
|
|
563
616
|
}
|
|
@@ -565,12 +618,20 @@ type NativeAttrs$M = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props$K>;
|
|
|
565
618
|
type InputGroupProps = Props$K & NativeAttrs$M;
|
|
566
619
|
declare const InputGroup: react.ForwardRefExoticComponent<Props$K & NativeAttrs$M & react.RefAttributes<HTMLDivElement>>;
|
|
567
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
|
+
|
|
568
628
|
type ListSize = 'sm' | 'md' | 'lg';
|
|
569
629
|
|
|
570
630
|
interface ListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
571
631
|
as?: React.ElementType;
|
|
572
632
|
size?: ListSize;
|
|
573
633
|
divider?: boolean;
|
|
634
|
+
nav?: boolean;
|
|
574
635
|
}
|
|
575
636
|
declare const List: react.ForwardRefExoticComponent<ListProps & react.RefAttributes<HTMLDivElement>>;
|
|
576
637
|
|
|
@@ -636,47 +697,47 @@ declare const Result: React.FC<ResultProps>;
|
|
|
636
697
|
|
|
637
698
|
type AutocompleteMultiple = false;
|
|
638
699
|
type AutocompleteClearable = true;
|
|
639
|
-
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>>;
|
|
640
703
|
type BaseProps$1<TItem extends Record<string, any>> = {
|
|
641
704
|
textField?: keyof TItem;
|
|
642
705
|
placeholder?: string;
|
|
643
706
|
filter?: string;
|
|
644
707
|
loading?: boolean;
|
|
645
708
|
disabled?: boolean;
|
|
646
|
-
readOnly?: boolean;
|
|
647
709
|
disclosure?: Disclosure;
|
|
648
710
|
virtual?: Omit<VirtualizerOptions, 'parentRef'>;
|
|
649
|
-
color?: InputColor;
|
|
650
|
-
variant?: InputVariant;
|
|
651
|
-
size?: InputSize;
|
|
652
711
|
startContent?: React.ReactNode;
|
|
653
712
|
endContent?: React.ReactNode;
|
|
713
|
+
target?: boolean;
|
|
714
|
+
readOnly?: boolean;
|
|
715
|
+
inner?: boolean;
|
|
716
|
+
onClear?: () => void;
|
|
654
717
|
onItemSelect?: (item: TItem) => void;
|
|
655
718
|
onFilterChange?: (value: string) => void;
|
|
656
719
|
renderItem?: (item: TItem, props: ListItemProps) => React.ReactNode;
|
|
657
720
|
renderNoData?: (props: ResultProps) => React.ReactNode;
|
|
658
721
|
};
|
|
659
|
-
type Props$H<TItem extends Record<string, any>, TKeyField extends keyof TItem = '
|
|
660
|
-
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
|
+
}
|
|
661
738
|
|
|
662
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;
|
|
663
740
|
|
|
664
|
-
type AutocompleteContextValue<TItem extends Record<string, any>, TKeyField extends keyof TItem = 'key'> = {
|
|
665
|
-
data: TItem[];
|
|
666
|
-
values: TItem[TKeyField][];
|
|
667
|
-
keyField: TKeyField;
|
|
668
|
-
textField: keyof TItem;
|
|
669
|
-
isMultiple: boolean;
|
|
670
|
-
virtual?: Omit<VirtualizerOptions, 'parentRef'>;
|
|
671
|
-
onChange: (value: TItem[]) => void;
|
|
672
|
-
onItemSelect: (item: TItem) => void;
|
|
673
|
-
renderItem?: (item: TItem, props: ListItemProps) => React.ReactNode;
|
|
674
|
-
offset: number;
|
|
675
|
-
setOffset: React.Dispatch<React.SetStateAction<number>>;
|
|
676
|
-
};
|
|
677
|
-
declare const AutocompleteContext: react.Context<AutocompleteContextValue<Record<string, any>, string> | null>;
|
|
678
|
-
declare const useAutocomplete: () => AutocompleteContextValue<Record<string, any>, string>;
|
|
679
|
-
|
|
680
741
|
type BackdropPlacement = 'top' | 'left' | 'center' | 'right' | 'bottom';
|
|
681
742
|
type BackdropVariant = 'opaque' | 'blur' | 'transparent';
|
|
682
743
|
|
|
@@ -1271,7 +1332,7 @@ type BaseProps<TItem extends Record<string, any>> = {
|
|
|
1271
1332
|
renderItem?: (item: TItem, props: ListItemProps) => React.ReactNode;
|
|
1272
1333
|
renderNoData?: (props: ResultProps) => React.ReactNode;
|
|
1273
1334
|
};
|
|
1274
|
-
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>;
|
|
1275
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>;
|
|
1276
1337
|
|
|
1277
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;
|
|
@@ -1389,6 +1450,8 @@ type TextInputProps = Props$m & NativeAttrs$o;
|
|
|
1389
1450
|
declare const TextInput: react.ForwardRefExoticComponent<Props$m & NativeAttrs$o & react.RefAttributes<HTMLInputElement>>;
|
|
1390
1451
|
|
|
1391
1452
|
type ToolbarSize = 'auto' | 'sm' | 'md' | 'lg';
|
|
1453
|
+
type ToolbarVariant = 'filled' | 'text';
|
|
1454
|
+
type ToolbarColor = 'secondary' | 'primary';
|
|
1392
1455
|
|
|
1393
1456
|
interface Props$l {
|
|
1394
1457
|
size?: ToolbarSize;
|
|
@@ -1396,14 +1459,9 @@ interface Props$l {
|
|
|
1396
1459
|
subtitle?: React.ReactNode;
|
|
1397
1460
|
startContent?: React.ReactNode;
|
|
1398
1461
|
endContent?: React.ReactNode;
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
startAction?: React.ReactNode;
|
|
1403
|
-
/**
|
|
1404
|
-
* @deprecated Use `endContent` instead
|
|
1405
|
-
*/
|
|
1406
|
-
endAction?: React.ReactNode;
|
|
1462
|
+
bordered?: boolean;
|
|
1463
|
+
variant?: ToolbarVariant;
|
|
1464
|
+
color?: ToolbarColor;
|
|
1407
1465
|
slotProps?: {
|
|
1408
1466
|
startContent?: React.HTMLAttributes<HTMLDivElement>;
|
|
1409
1467
|
content?: React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -1936,6 +1994,8 @@ declare const Dropdown: (props: DropdownProps) => react_jsx_runtime.JSX.Element;
|
|
|
1936
1994
|
|
|
1937
1995
|
interface DropdownContentProps {
|
|
1938
1996
|
children: React.ReactNode;
|
|
1997
|
+
className?: string;
|
|
1998
|
+
style?: React.CSSProperties;
|
|
1939
1999
|
}
|
|
1940
2000
|
declare const DropdownContent: (props: DropdownContentProps) => react_jsx_runtime.JSX.Element;
|
|
1941
2001
|
|
|
@@ -2035,27 +2095,162 @@ interface UploadFileProps {
|
|
|
2035
2095
|
}
|
|
2036
2096
|
declare const UploadFiles: ({ data, max, readOnly, disabled, accept, multiple, onChange }: UploadFileProps) => react_jsx_runtime.JSX.Element;
|
|
2037
2097
|
|
|
2038
|
-
type
|
|
2098
|
+
type Optional<T, K extends keyof T> = Partial<Pick<T, K>> & Omit<T, K>;
|
|
2099
|
+
type Rect = {
|
|
2100
|
+
x: number;
|
|
2101
|
+
y: number;
|
|
2102
|
+
width: number;
|
|
2103
|
+
height: number;
|
|
2104
|
+
};
|
|
2105
|
+
type LayoutMeta = {
|
|
2106
|
+
id: string;
|
|
2107
|
+
x: number;
|
|
2108
|
+
y: number;
|
|
2109
|
+
width: number;
|
|
2110
|
+
height: number;
|
|
2111
|
+
minWidth?: number;
|
|
2112
|
+
maxWidth?: number;
|
|
2113
|
+
minHeight?: number;
|
|
2114
|
+
maxHeight?: number;
|
|
2115
|
+
};
|
|
2116
|
+
type PanelMeta = {
|
|
2039
2117
|
id: string;
|
|
2040
2118
|
title: string;
|
|
2041
|
-
|
|
2119
|
+
icon?: React.ReactNode;
|
|
2120
|
+
render?: React.ReactNode;
|
|
2042
2121
|
x?: number;
|
|
2043
2122
|
y?: number;
|
|
2044
2123
|
width?: number;
|
|
2045
2124
|
height?: number;
|
|
2046
2125
|
minimized?: boolean;
|
|
2047
2126
|
maximized?: boolean;
|
|
2127
|
+
snapped?: boolean;
|
|
2048
2128
|
closed?: boolean;
|
|
2129
|
+
zIndex: number;
|
|
2130
|
+
zIndexFloating: number;
|
|
2131
|
+
zIndexLayout: number;
|
|
2132
|
+
layoutId?: string;
|
|
2133
|
+
closable?: boolean;
|
|
2134
|
+
minWidth?: number;
|
|
2135
|
+
maxWidth?: number;
|
|
2136
|
+
minHeight?: number;
|
|
2137
|
+
maxHeight?: number;
|
|
2049
2138
|
};
|
|
2050
|
-
type
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2139
|
+
type Direction = 'top' | 'bottom' | 'left' | 'right';
|
|
2140
|
+
interface EdgeFlags {
|
|
2141
|
+
top: boolean;
|
|
2142
|
+
bottom: boolean;
|
|
2143
|
+
left: boolean;
|
|
2144
|
+
right: boolean;
|
|
2145
|
+
}
|
|
2146
|
+
interface LayoutRect extends Rect {
|
|
2147
|
+
id: string;
|
|
2148
|
+
gridX: number;
|
|
2149
|
+
gridY: number;
|
|
2150
|
+
gridW: number;
|
|
2151
|
+
gridH: number;
|
|
2152
|
+
isEmpty: boolean;
|
|
2153
|
+
isVertical: boolean;
|
|
2154
|
+
baseFull: Rect;
|
|
2155
|
+
baseEmpty: Rect;
|
|
2156
|
+
dimensions: Rect;
|
|
2157
|
+
fullDimensions: Rect;
|
|
2158
|
+
emptyDimensions: Rect;
|
|
2159
|
+
edges: LayoutEdge[];
|
|
2160
|
+
gridEdges: EdgeFlags;
|
|
2161
|
+
gridBorders: EdgeFlags;
|
|
2162
|
+
}
|
|
2163
|
+
interface LayoutEdge {
|
|
2164
|
+
layoutId: string | null;
|
|
2165
|
+
direction: Direction;
|
|
2166
|
+
border: boolean;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
declare function useLayoutPanelManager({ layouts, setLayouts, panels, setPanels, windowContainerRef, layoutContainerRef, }: {
|
|
2170
|
+
layouts: LayoutMeta[];
|
|
2171
|
+
setLayouts: React.Dispatch<React.SetStateAction<LayoutMeta[]>>;
|
|
2172
|
+
panels: PanelMeta[];
|
|
2173
|
+
setPanels: React.Dispatch<React.SetStateAction<PanelMeta[]>>;
|
|
2174
|
+
windowContainerRef: React.RefObject<HTMLDivElement>;
|
|
2175
|
+
layoutContainerRef: React.RefObject<HTMLDivElement>;
|
|
2176
|
+
}): {
|
|
2177
|
+
isMobile: boolean;
|
|
2178
|
+
layouts: LayoutMeta[];
|
|
2179
|
+
setLayouts: react.Dispatch<react.SetStateAction<LayoutMeta[]>>;
|
|
2180
|
+
panels: PanelMeta[];
|
|
2181
|
+
panelsRef: react.MutableRefObject<Record<string, PanelMeta>>;
|
|
2182
|
+
setPanels: react.Dispatch<react.SetStateAction<PanelMeta[]>>;
|
|
2183
|
+
layoutContainerRef: react.RefObject<HTMLDivElement>;
|
|
2184
|
+
windowContainerRef: react.RefObject<HTMLDivElement>;
|
|
2185
|
+
windowContainerRect: Rect;
|
|
2186
|
+
layoutContainerRect: Rect;
|
|
2187
|
+
panelPrevRectsRef: react.MutableRefObject<Record<string, Rect>>;
|
|
2188
|
+
activePanel: string | null;
|
|
2189
|
+
activeFloatingPanel: string | null;
|
|
2190
|
+
layoutPanelIds: Record<string, string[]>;
|
|
2191
|
+
selectWindow: (id: string) => void;
|
|
2192
|
+
updateWindow: (id: string, patch: Partial<PanelMeta>) => void;
|
|
2193
|
+
closeWindow: (id: string) => void;
|
|
2194
|
+
minimizeWindow: (id: string) => void;
|
|
2195
|
+
createWindow: (win: Optional<Omit<PanelMeta, "zIndex" | "zIndexFloating" | "zIndexLayout">, "id">) => string;
|
|
2196
|
+
newPositions: LayoutRect[];
|
|
2197
|
+
simulateLayoutPositions: (panelId: string, layoutId: string) => LayoutRect[];
|
|
2198
|
+
hoveredLayoutIdRef: react.MutableRefObject<Record<string, string | null>>;
|
|
2199
|
+
hoveredLayoutId: Record<string, string | null>;
|
|
2200
|
+
setHoveredLayoutId: react.Dispatch<react.SetStateAction<Record<string, string | null>>>;
|
|
2201
|
+
activePanelsByLayout: Record<string, string | null>;
|
|
2202
|
+
updateLayoutSize: (layoutId: string, newRect: Rect, isResizing?: boolean) => void;
|
|
2203
|
+
registerTabDragHandler: (panelId: string, handler: (event: React.PointerEvent) => void) => void;
|
|
2204
|
+
getTabDragHandler: (panelId: string) => (event: React.PointerEvent) => void;
|
|
2058
2205
|
};
|
|
2059
|
-
declare function WindowManager({ parentRef: externalParentRef, windows, onChange, children }: DesktopWindowSystemProps): react_jsx_runtime.JSX.Element;
|
|
2060
2206
|
|
|
2061
|
-
|
|
2207
|
+
declare const useLayoutManager: () => {
|
|
2208
|
+
isMobile: boolean;
|
|
2209
|
+
layouts: LayoutMeta[];
|
|
2210
|
+
setLayouts: react__default.Dispatch<react__default.SetStateAction<LayoutMeta[]>>;
|
|
2211
|
+
panels: PanelMeta[];
|
|
2212
|
+
panelsRef: react__default.MutableRefObject<Record<string, PanelMeta>>;
|
|
2213
|
+
setPanels: react__default.Dispatch<react__default.SetStateAction<PanelMeta[]>>;
|
|
2214
|
+
layoutContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2215
|
+
windowContainerRef: react__default.RefObject<HTMLDivElement>;
|
|
2216
|
+
windowContainerRect: Rect;
|
|
2217
|
+
layoutContainerRect: Rect;
|
|
2218
|
+
panelPrevRectsRef: react__default.MutableRefObject<Record<string, Rect>>;
|
|
2219
|
+
activePanel: string | null;
|
|
2220
|
+
activeFloatingPanel: string | null;
|
|
2221
|
+
layoutPanelIds: Record<string, string[]>;
|
|
2222
|
+
selectWindow: (id: string) => void;
|
|
2223
|
+
updateWindow: (id: string, patch: Partial<PanelMeta>) => void;
|
|
2224
|
+
closeWindow: (id: string) => void;
|
|
2225
|
+
minimizeWindow: (id: string) => void;
|
|
2226
|
+
createWindow: (win: Optional<Omit<PanelMeta, "zIndex" | "zIndexFloating" | "zIndexLayout">, "id">) => string;
|
|
2227
|
+
newPositions: LayoutRect[];
|
|
2228
|
+
simulateLayoutPositions: (panelId: string, layoutId: string) => LayoutRect[];
|
|
2229
|
+
hoveredLayoutIdRef: react__default.MutableRefObject<Record<string, string | null>>;
|
|
2230
|
+
hoveredLayoutId: Record<string, string | null>;
|
|
2231
|
+
setHoveredLayoutId: react__default.Dispatch<react__default.SetStateAction<Record<string, string | null>>>;
|
|
2232
|
+
activePanelsByLayout: Record<string, string | null>;
|
|
2233
|
+
updateLayoutSize: (layoutId: string, newRect: Rect, isResizing?: boolean) => void;
|
|
2234
|
+
registerTabDragHandler: (panelId: string, handler: (event: react__default.PointerEvent) => void) => void;
|
|
2235
|
+
getTabDragHandler: (panelId: string) => (event: react__default.PointerEvent) => void;
|
|
2236
|
+
};
|
|
2237
|
+
declare function LayoutManager({ children, ...manager }: ReturnType<typeof useLayoutPanelManager> & {
|
|
2238
|
+
children: react__default.ReactNode;
|
|
2239
|
+
}): react_jsx_runtime.JSX.Element;
|
|
2240
|
+
|
|
2241
|
+
declare function LayoutCollisions({ layoutIds }: {
|
|
2242
|
+
layoutIds: string[];
|
|
2243
|
+
}): react_jsx_runtime.JSX.Element | undefined;
|
|
2244
|
+
|
|
2245
|
+
declare function Layouts(): react_jsx_runtime.JSX.Element | undefined;
|
|
2246
|
+
|
|
2247
|
+
declare function Panels(): react_jsx_runtime.JSX.Element;
|
|
2248
|
+
|
|
2249
|
+
declare function Taskbar(): react_jsx_runtime.JSX.Element;
|
|
2250
|
+
|
|
2251
|
+
interface PanelContextValue {
|
|
2252
|
+
panel: PanelMeta;
|
|
2253
|
+
}
|
|
2254
|
+
declare const usePanel: () => PanelContextValue;
|
|
2255
|
+
|
|
2256
|
+
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 };
|