@livetiles/reach-plugin-types 0.5.0-preview.1092 → 0.5.0-preview.1093
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/lib/index.d.ts +183 -118
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -6642,120 +6642,6 @@ declare module "libs/reach/ui/common/src/reach-2/lists/MenuList" {
|
|
|
6642
6642
|
const _default_1: import("react").ForwardRefExoticComponent<MenuProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6643
6643
|
export default _default_1;
|
|
6644
6644
|
}
|
|
6645
|
-
declare module "libs/reach/ui/common/src/reach-2/surfaces/BasePopover" {
|
|
6646
|
-
import { PopoverContentProps } from '@radix-ui/react-popover';
|
|
6647
|
-
import { FC } from 'react';
|
|
6648
|
-
export type BasePopoverAlignType = 'start' | 'center' | 'end';
|
|
6649
|
-
export type BasePopoverSideType = 'top' | 'left' | 'bottom' | 'right';
|
|
6650
|
-
export interface BasePopoverProps {
|
|
6651
|
-
align?: BasePopoverAlignType;
|
|
6652
|
-
alignOffset?: number;
|
|
6653
|
-
anchor?: JSX.Element;
|
|
6654
|
-
className?: string;
|
|
6655
|
-
collisionPadding?: PopoverContentProps['collisionPadding'];
|
|
6656
|
-
isOpen?: boolean;
|
|
6657
|
-
onCloseAutoFocus?: (event: Event) => void;
|
|
6658
|
-
onOpenAutoFocus?: (event: Event) => void;
|
|
6659
|
-
onOpenChange?: (open: boolean) => void;
|
|
6660
|
-
side?: BasePopoverSideType;
|
|
6661
|
-
sideOffset?: number;
|
|
6662
|
-
trigger?: JSX.Element;
|
|
6663
|
-
}
|
|
6664
|
-
export const BasePopover: FC<BasePopoverProps>;
|
|
6665
|
-
}
|
|
6666
|
-
declare module "libs/reach/ui/common/src/reach-2/utils" {
|
|
6667
|
-
import { TagSize } from "libs/reach/ui/common/src/reach-2/tags/Tag";
|
|
6668
|
-
export const getNormalizedPercentageBasedOnDeviceHeight: (heightToConvert: number, safeArea?: number, fullyExpandThreshold?: number) => number;
|
|
6669
|
-
export const useNormalizedBreakpointValuesBasedOnDeviceHeight: (heightToConvert: number, safeArea?: number, fullyExpandThreshold?: number) => {
|
|
6670
|
-
breakpoints: number[];
|
|
6671
|
-
initialBreakpoint: number;
|
|
6672
|
-
};
|
|
6673
|
-
export const getIsMobilePhone: () => boolean;
|
|
6674
|
-
export type TagValue = {
|
|
6675
|
-
id: string;
|
|
6676
|
-
label?: string;
|
|
6677
|
-
name?: string;
|
|
6678
|
-
};
|
|
6679
|
-
export const getMaxTagList: (items: TagValue[], availableWidth: number, options?: {
|
|
6680
|
-
hasError?: (value: TagValue) => boolean;
|
|
6681
|
-
isHighlighted?: boolean;
|
|
6682
|
-
onClose?: (value: TagValue) => void;
|
|
6683
|
-
size?: TagSize;
|
|
6684
|
-
}) => any[];
|
|
6685
|
-
}
|
|
6686
|
-
declare module "libs/reach/ui/common/src/reach-2/select/Select" {
|
|
6687
|
-
import { SVGProps } from 'react';
|
|
6688
|
-
import { IconProps } from "libs/reach/ui/common/src/reach-2/icons/index";
|
|
6689
|
-
import { BasePopoverAlignType } from "libs/reach/ui/common/src/reach-2/surfaces/BasePopover";
|
|
6690
|
-
type SelectSize = 'Large' | 'Small';
|
|
6691
|
-
export interface SelectItemProps {
|
|
6692
|
-
icon?: SVGProps<SVGElement>;
|
|
6693
|
-
id: string;
|
|
6694
|
-
label: string;
|
|
6695
|
-
}
|
|
6696
|
-
export interface SelectItemGroupProps<T> {
|
|
6697
|
-
title: string;
|
|
6698
|
-
options: T[];
|
|
6699
|
-
}
|
|
6700
|
-
interface SelectProps<T> {
|
|
6701
|
-
allowCreation?: boolean;
|
|
6702
|
-
className?: string;
|
|
6703
|
-
disabled?: boolean;
|
|
6704
|
-
emptyLabel?: string;
|
|
6705
|
-
errorItems?: string[];
|
|
6706
|
-
errorLabel?: string;
|
|
6707
|
-
fitToContent?: boolean;
|
|
6708
|
-
forcePlaceholder?: boolean;
|
|
6709
|
-
fullyControlled?: boolean;
|
|
6710
|
-
hideChevron?: boolean;
|
|
6711
|
-
leftIcon?: IconProps;
|
|
6712
|
-
multiple?: boolean;
|
|
6713
|
-
onAddItem?: (id: string) => void;
|
|
6714
|
-
onInputChange?: (value: string) => void;
|
|
6715
|
-
onItemsChange?: (items: T[]) => void;
|
|
6716
|
-
onItemSelected?: (item: T, index: number) => void;
|
|
6717
|
-
onRemoveItem?: (id: string) => void;
|
|
6718
|
-
options: T[] | SelectItemGroupProps<T>[];
|
|
6719
|
-
placeholder?: string;
|
|
6720
|
-
popoverAlign?: BasePopoverAlignType;
|
|
6721
|
-
popoverAlignOffset?: number;
|
|
6722
|
-
popoverHeight?: number;
|
|
6723
|
-
popoverWidth?: number;
|
|
6724
|
-
renderItem?: (item: T, isSelected: boolean, onSelect: () => void) => JSX.Element;
|
|
6725
|
-
searchable?: boolean;
|
|
6726
|
-
selectedValuesOptions?: {
|
|
6727
|
-
hide?: boolean;
|
|
6728
|
-
noWrap?: boolean;
|
|
6729
|
-
};
|
|
6730
|
-
size?: SelectSize;
|
|
6731
|
-
values?: T[];
|
|
6732
|
-
}
|
|
6733
|
-
const Select: <T extends SelectItemProps = SelectItemProps>({ allowCreation, className, disabled, emptyLabel, errorItems, errorLabel, fitToContent, forcePlaceholder, fullyControlled, hideChevron, leftIcon, multiple, onAddItem, onInputChange, onItemsChange, onItemSelected, onRemoveItem, options: preprocessedOptions, placeholder, popoverAlign, popoverAlignOffset, popoverHeight, popoverWidth, renderItem, searchable, selectedValuesOptions, size, values, }: SelectProps<T>) => JSX.Element;
|
|
6734
|
-
export default Select;
|
|
6735
|
-
}
|
|
6736
|
-
declare module "libs/reach/ui/common/src/reach-2/select/UserSelect" {
|
|
6737
|
-
import { FC } from 'react';
|
|
6738
|
-
export interface IUserSelectUser {
|
|
6739
|
-
displayName?: string;
|
|
6740
|
-
id: string;
|
|
6741
|
-
mail?: string;
|
|
6742
|
-
userPrincipalName: string;
|
|
6743
|
-
}
|
|
6744
|
-
interface IUserSelect {
|
|
6745
|
-
disabled?: boolean;
|
|
6746
|
-
onSelectedUsersChange: (selectedUsers: IUserSelectUser[]) => void;
|
|
6747
|
-
placeholder?: string;
|
|
6748
|
-
selectedUsers?: IUserSelectUser[];
|
|
6749
|
-
}
|
|
6750
|
-
const UserSelect: FC<IUserSelect>;
|
|
6751
|
-
export default UserSelect;
|
|
6752
|
-
}
|
|
6753
|
-
declare module "libs/reach/ui/common/src/reach-2/select/index" {
|
|
6754
|
-
export * from "libs/reach/ui/common/src/reach-2/select/Select";
|
|
6755
|
-
export { default as Select } from "libs/reach/ui/common/src/reach-2/select/Select";
|
|
6756
|
-
export * from "libs/reach/ui/common/src/reach-2/select/UserSelect";
|
|
6757
|
-
export { default as UserSelect } from "libs/reach/ui/common/src/reach-2/select/UserSelect";
|
|
6758
|
-
}
|
|
6759
6645
|
declare module "libs/reach/ui/common/src/reach-2/surfaces/BaseDialog" {
|
|
6760
6646
|
import { MouseEvent } from 'react';
|
|
6761
6647
|
export enum DialogType {
|
|
@@ -6858,6 +6744,27 @@ declare module "libs/reach/ui/common/src/reach-2/surfaces/ConfirmationDialog" {
|
|
|
6858
6744
|
description?: string;
|
|
6859
6745
|
}>;
|
|
6860
6746
|
}
|
|
6747
|
+
declare module "libs/reach/ui/common/src/reach-2/surfaces/BasePopover" {
|
|
6748
|
+
import { PopoverContentProps } from '@radix-ui/react-popover';
|
|
6749
|
+
import { FC } from 'react';
|
|
6750
|
+
export type BasePopoverAlignType = 'start' | 'center' | 'end';
|
|
6751
|
+
export type BasePopoverSideType = 'top' | 'left' | 'bottom' | 'right';
|
|
6752
|
+
export interface BasePopoverProps {
|
|
6753
|
+
align?: BasePopoverAlignType;
|
|
6754
|
+
alignOffset?: number;
|
|
6755
|
+
anchor?: JSX.Element;
|
|
6756
|
+
className?: string;
|
|
6757
|
+
collisionPadding?: PopoverContentProps['collisionPadding'];
|
|
6758
|
+
isOpen?: boolean;
|
|
6759
|
+
onCloseAutoFocus?: (event: Event) => void;
|
|
6760
|
+
onOpenAutoFocus?: (event: Event) => void;
|
|
6761
|
+
onOpenChange?: (open: boolean) => void;
|
|
6762
|
+
side?: BasePopoverSideType;
|
|
6763
|
+
sideOffset?: number;
|
|
6764
|
+
trigger?: JSX.Element;
|
|
6765
|
+
}
|
|
6766
|
+
export const BasePopover: FC<BasePopoverProps>;
|
|
6767
|
+
}
|
|
6861
6768
|
declare module "libs/reach/ui/common/src/reach-2/surfaces/index" {
|
|
6862
6769
|
export * from "libs/reach/ui/common/src/reach-2/surfaces/Dialog";
|
|
6863
6770
|
export * from "libs/reach/ui/common/src/reach-2/surfaces/Panel";
|
|
@@ -6869,6 +6776,164 @@ declare module "libs/reach/ui/common/src/reach-2/surfaces/index" {
|
|
|
6869
6776
|
export * from "libs/reach/ui/common/src/reach-2/surfaces/BasePopover";
|
|
6870
6777
|
export { DialogType } from "libs/reach/ui/common/src/reach-2/surfaces/BaseDialog";
|
|
6871
6778
|
}
|
|
6779
|
+
declare module "libs/reach/ui/common/src/reach-2/utils" {
|
|
6780
|
+
import { TagSize } from "libs/reach/ui/common/src/reach-2/tags/Tag";
|
|
6781
|
+
export const getNormalizedPercentageBasedOnDeviceHeight: (heightToConvert: number, safeArea?: number, fullyExpandThreshold?: number) => number;
|
|
6782
|
+
export const useNormalizedBreakpointValuesBasedOnDeviceHeight: (heightToConvert: number, safeArea?: number, fullyExpandThreshold?: number) => {
|
|
6783
|
+
breakpoints: number[];
|
|
6784
|
+
initialBreakpoint: number;
|
|
6785
|
+
};
|
|
6786
|
+
export const getIsMobilePhone: () => boolean;
|
|
6787
|
+
export type TagValue = {
|
|
6788
|
+
id: string;
|
|
6789
|
+
label?: string;
|
|
6790
|
+
name?: string;
|
|
6791
|
+
};
|
|
6792
|
+
export const getMaxTagList: (items: TagValue[], availableWidth: number, options?: {
|
|
6793
|
+
hasError?: (value: TagValue) => boolean;
|
|
6794
|
+
isHighlighted?: boolean;
|
|
6795
|
+
onClose?: (value: TagValue) => void;
|
|
6796
|
+
size?: TagSize;
|
|
6797
|
+
}) => any[];
|
|
6798
|
+
}
|
|
6799
|
+
declare module "libs/reach/ui/common/src/reach-2/select/types" {
|
|
6800
|
+
import { SVGProps } from 'react';
|
|
6801
|
+
export type SelectSize = 'Large' | 'Small';
|
|
6802
|
+
export interface ISelectItemProps {
|
|
6803
|
+
icon?: SVGProps<SVGElement>;
|
|
6804
|
+
id: string;
|
|
6805
|
+
label: string;
|
|
6806
|
+
}
|
|
6807
|
+
}
|
|
6808
|
+
declare module "libs/reach/ui/common/src/reach-2/select/components/PopoverContent" {
|
|
6809
|
+
import { MouseEvent, MutableRefObject } from 'react';
|
|
6810
|
+
import { ISelectItemProps } from "libs/reach/ui/common/src/reach-2/select/types";
|
|
6811
|
+
interface IPopoverContentProps<T> {
|
|
6812
|
+
areOptionsGrouped: boolean;
|
|
6813
|
+
emptyLabel?: string;
|
|
6814
|
+
focusedIndex: number | null;
|
|
6815
|
+
handleItemSelected: (item: T, index: number) => void;
|
|
6816
|
+
handleRemoveAllItems: (e: MouseEvent<Element>) => void;
|
|
6817
|
+
initialSelectedItems: T[];
|
|
6818
|
+
isItemSelected: (id: string) => boolean;
|
|
6819
|
+
listWrapperRef: MutableRefObject<HTMLDivElement | null>;
|
|
6820
|
+
menuListOptions: T[];
|
|
6821
|
+
multiple: boolean;
|
|
6822
|
+
renderGroupedOptions: () => JSX.Element[];
|
|
6823
|
+
renderItem?: (item: T, isSelected: boolean, onSelect: () => void) => JSX.Element;
|
|
6824
|
+
selectedValues: T[];
|
|
6825
|
+
}
|
|
6826
|
+
const PopoverContent: <T extends ISelectItemProps>({ areOptionsGrouped, emptyLabel, focusedIndex, handleItemSelected, handleRemoveAllItems, initialSelectedItems, isItemSelected, listWrapperRef, menuListOptions, multiple, renderGroupedOptions, renderItem, selectedValues, }: IPopoverContentProps<T>) => JSX.Element;
|
|
6827
|
+
export default PopoverContent;
|
|
6828
|
+
}
|
|
6829
|
+
declare module "libs/reach/ui/common/src/reach-2/select/components/Trigger" {
|
|
6830
|
+
import { ChangeEvent, KeyboardEvent, MouseEvent, ReactNode, RefObject } from 'react';
|
|
6831
|
+
import { IconProps } from "libs/reach/ui/common/src/reach-2/icons/index";
|
|
6832
|
+
import { ISelectItemProps, SelectSize } from "libs/reach/ui/common/src/reach-2/select/types";
|
|
6833
|
+
interface ITriggerProps<T> {
|
|
6834
|
+
className?: string;
|
|
6835
|
+
containerRef: RefObject<HTMLDivElement>;
|
|
6836
|
+
disabled?: boolean;
|
|
6837
|
+
errorLabel?: string;
|
|
6838
|
+
forcePlaceholder?: boolean;
|
|
6839
|
+
handleContainerClick: () => void;
|
|
6840
|
+
handleContainerKeyDown: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
6841
|
+
handleContainerOnFocus: () => void;
|
|
6842
|
+
handleContainerOnMouseEnter: () => void;
|
|
6843
|
+
handleContainerOnMouseLeave: () => void;
|
|
6844
|
+
handleInputChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
6845
|
+
handleInputKeyDown: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
6846
|
+
handleRemoveAllItems: (e: MouseEvent<Element>) => void;
|
|
6847
|
+
hideChevron?: boolean;
|
|
6848
|
+
inputRef: RefObject<HTMLInputElement>;
|
|
6849
|
+
inputSize?: number;
|
|
6850
|
+
inputValue: string;
|
|
6851
|
+
innerRef: RefObject<HTMLDivElement>;
|
|
6852
|
+
isHovered: boolean;
|
|
6853
|
+
isPopoverOpen: boolean;
|
|
6854
|
+
leftIcon?: IconProps;
|
|
6855
|
+
multiple?: boolean;
|
|
6856
|
+
placeholder?: string;
|
|
6857
|
+
renderSelectedValues: () => ReactNode;
|
|
6858
|
+
searchable?: boolean;
|
|
6859
|
+
selectedValues: T[];
|
|
6860
|
+
selectedValuesOptions?: {
|
|
6861
|
+
hide?: boolean;
|
|
6862
|
+
noWrap?: boolean;
|
|
6863
|
+
};
|
|
6864
|
+
size?: SelectSize;
|
|
6865
|
+
}
|
|
6866
|
+
const _default_2: import("react").ForwardRefExoticComponent<ITriggerProps<ISelectItemProps> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6867
|
+
export default _default_2;
|
|
6868
|
+
}
|
|
6869
|
+
declare module "libs/reach/ui/common/src/reach-2/select/Select" {
|
|
6870
|
+
import { IconProps } from "libs/reach/ui/common/src/reach-2/icons/index";
|
|
6871
|
+
import { BasePopoverAlignType } from "libs/reach/ui/common/src/reach-2/surfaces/index";
|
|
6872
|
+
import { ISelectItemProps, SelectSize } from "libs/reach/ui/common/src/reach-2/select/types";
|
|
6873
|
+
export interface ISelectItemGroupProps<T> {
|
|
6874
|
+
options: T[];
|
|
6875
|
+
title: string;
|
|
6876
|
+
}
|
|
6877
|
+
interface ISelectProps<T> {
|
|
6878
|
+
allowCreation?: boolean;
|
|
6879
|
+
className?: string;
|
|
6880
|
+
disabled?: boolean;
|
|
6881
|
+
emptyLabel?: string;
|
|
6882
|
+
errorItems?: string[];
|
|
6883
|
+
errorLabel?: string;
|
|
6884
|
+
fitToContent?: boolean;
|
|
6885
|
+
forcePlaceholder?: boolean;
|
|
6886
|
+
fullyControlled?: boolean;
|
|
6887
|
+
hideChevron?: boolean;
|
|
6888
|
+
leftIcon?: IconProps;
|
|
6889
|
+
multiple?: boolean;
|
|
6890
|
+
onAddItem?: (id: string) => void;
|
|
6891
|
+
onInputChange?: (value: string) => void;
|
|
6892
|
+
onItemsChange?: (items: T[]) => void;
|
|
6893
|
+
onItemSelected?: (item: T, index: number) => void;
|
|
6894
|
+
onRemoveItem?: (id: string) => void;
|
|
6895
|
+
options: T[] | ISelectItemGroupProps<T>[];
|
|
6896
|
+
placeholder?: string;
|
|
6897
|
+
popoverAlign?: BasePopoverAlignType;
|
|
6898
|
+
popoverAlignOffset?: number;
|
|
6899
|
+
popoverHeight?: number;
|
|
6900
|
+
popoverWidth?: number;
|
|
6901
|
+
renderItem?: (item: T, isSelected: boolean, onSelect: () => void) => JSX.Element;
|
|
6902
|
+
searchable?: boolean;
|
|
6903
|
+
selectedValuesOptions?: {
|
|
6904
|
+
hide?: boolean;
|
|
6905
|
+
noWrap?: boolean;
|
|
6906
|
+
};
|
|
6907
|
+
size?: SelectSize;
|
|
6908
|
+
values?: T[];
|
|
6909
|
+
}
|
|
6910
|
+
const Select: <T extends ISelectItemProps = ISelectItemProps>({ allowCreation, className, disabled, emptyLabel, errorItems, errorLabel, fitToContent, forcePlaceholder, fullyControlled, hideChevron, leftIcon, multiple, onAddItem, onInputChange, onItemsChange, onItemSelected, onRemoveItem, options: preprocessedOptions, placeholder, popoverAlign, popoverAlignOffset, popoverHeight, popoverWidth, renderItem, searchable, selectedValuesOptions, size, values, }: ISelectProps<T>) => JSX.Element;
|
|
6911
|
+
export default Select;
|
|
6912
|
+
}
|
|
6913
|
+
declare module "libs/reach/ui/common/src/reach-2/select/UserSelect" {
|
|
6914
|
+
import { FC } from 'react';
|
|
6915
|
+
export interface IUserSelectUser {
|
|
6916
|
+
displayName?: string;
|
|
6917
|
+
id: string;
|
|
6918
|
+
mail?: string;
|
|
6919
|
+
userPrincipalName: string;
|
|
6920
|
+
}
|
|
6921
|
+
interface IUserSelect {
|
|
6922
|
+
disabled?: boolean;
|
|
6923
|
+
onSelectedUsersChange: (selectedUsers: IUserSelectUser[]) => void;
|
|
6924
|
+
placeholder?: string;
|
|
6925
|
+
selectedUsers?: IUserSelectUser[];
|
|
6926
|
+
}
|
|
6927
|
+
const UserSelect: FC<IUserSelect>;
|
|
6928
|
+
export default UserSelect;
|
|
6929
|
+
}
|
|
6930
|
+
declare module "libs/reach/ui/common/src/reach-2/select/index" {
|
|
6931
|
+
export * from "libs/reach/ui/common/src/reach-2/select/Select";
|
|
6932
|
+
export { default as Select } from "libs/reach/ui/common/src/reach-2/select/Select";
|
|
6933
|
+
export type { ISelectItemProps } from "libs/reach/ui/common/src/reach-2/select/types";
|
|
6934
|
+
export * from "libs/reach/ui/common/src/reach-2/select/UserSelect";
|
|
6935
|
+
export { default as UserSelect } from "libs/reach/ui/common/src/reach-2/select/UserSelect";
|
|
6936
|
+
}
|
|
6872
6937
|
declare module "libs/reach/ui/common/src/reach-2/surfaces/Card" {
|
|
6873
6938
|
import { FC, ReactNode } from 'react';
|
|
6874
6939
|
interface ICardProps {
|
|
@@ -6887,8 +6952,8 @@ declare module "libs/reach/ui/common/src/reach-2/table/Table" {
|
|
|
6887
6952
|
$isExpanded?: boolean;
|
|
6888
6953
|
}, never>;
|
|
6889
6954
|
export const TableExpandIconPlaceholder: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6890
|
-
const
|
|
6891
|
-
export default
|
|
6955
|
+
const _default_3: import("react").ForwardRefExoticComponent<TableProps<any> & import("react").RefAttributes<any>>;
|
|
6956
|
+
export default _default_3;
|
|
6892
6957
|
}
|
|
6893
6958
|
declare module "libs/reach/ui/common/src/reach-2/tabs/TabGroup" {
|
|
6894
6959
|
import { FC } from 'react';
|
|
@@ -12087,8 +12152,8 @@ declare module "libs/reach/feature/content/src/reach-2/common/editor/EnhancedRic
|
|
|
12087
12152
|
shortcuts?: string[];
|
|
12088
12153
|
useHardBreak?: boolean;
|
|
12089
12154
|
}
|
|
12090
|
-
const
|
|
12091
|
-
export default
|
|
12155
|
+
const _default_4: import("react").ForwardRefExoticComponent<EnhancedRichTextEditorProps & import("react").RefAttributes<EnhancedRichTextEditorRef>>;
|
|
12156
|
+
export default _default_4;
|
|
12092
12157
|
}
|
|
12093
12158
|
declare module "libs/reach/feature/content/src/reach-2/common/editor/common/EmojiPicker" {
|
|
12094
12159
|
import { FC } from 'react';
|