> extends React.Component {
static defaultProps: {
disabled: boolean;
id: string;
};
render(): JSX.Element;
private _onClick;
private _onMouseEnter;
private _onMouseMove;
private _onMouseLeave;
private _onFocus;
}
export declare const GroupedList: React.StatelessComponent;
export declare class GroupedListBase extends React.Component implements IGroupedList {
static defaultProps: {
selectionMode: SelectionMode;
isHeaderVisible: boolean;
groupProps: {};
compact: boolean;
};
refs: {
[key: string]: React.ReactInstance;
};
private _classNames;
private _list;
private _isSomeGroupExpanded;
constructor(props: IGroupedListProps);
scrollToIndex(index: number, measureItem?: (itemIndex: number) => number, scrollToMode?: ScrollToMode): void;
getStartItemIndexInView(): number;
componentWillReceiveProps(newProps: IGroupedListProps): void;
componentDidMount(): void;
render(): JSX.Element;
forceUpdate(): void;
toggleCollapseAll(allCollapsed: boolean): void;
private _setGroupsCollapsedState;
private _renderGroup;
private _returnOne;
private _getDefaultGroupItemLimit;
private _getGroupItemLimit;
private _getGroupHeight;
private _getPageHeight;
private _getGroupKey;
private _getGroupNestingDepth;
private _onToggleCollapse;
private _onToggleSelectGroup;
private _forceListUpdates;
private _onToggleSummarize;
private _getPageSpecification;
private _computeIsSomeGroupExpanded;
private _updateIsSomeGroupExpanded;
}
export declare const GroupFooter: React.StatelessComponent;
export declare const GroupHeader: React.StatelessComponent;
export declare const groupOne: IExtendedPersonaProps[];
export declare const GroupShowAll: React.StatelessComponent;
export declare const GroupSpacer: React.FunctionComponent;
export declare const groupTwo: IExtendedPersonaProps[];
/** Regular expression matching only valid hexadecimal chars */
export declare const HEX_REGEX: RegExp;
export declare const HoverCard: React.StatelessComponent;
export declare class HoverCardBase extends BaseComponent implements IHoverCard {
static defaultProps: {
cardOpenDelay: number;
cardDismissDelay: number;
expandedCardOpenDelay: number;
instantOpenOnClick: boolean;
setInitialFocus: boolean;
openHotKey: number;
type: HoverCardType;
};
private _hoverCard;
private _dismissTimerId;
private _openTimerId;
private _currentMouseTarget;
private _nativeDismissEvent;
private _childDismissEvent;
private _classNames;
constructor(props: IHoverCardProps);
componentDidMount(): void;
componentDidUpdate(prevProps: IHoverCardProps, prevState: IHoverCardState): void;
dismiss: (withTimeOut?: boolean | undefined) => void;
render(): JSX.Element;
private _getTargetElement;
private _shouldBlockHoverCard;
private _cardOpen;
private _executeCardOpen;
/**
* Hide HoverCard
* How we dismiss the card depends on where the callback is coming from.
* This is provided by the `isNativeEvent` argument.
* true: Event is coming from event listeners set up in componentDidMount.
* false: Event is coming from the `onLeave` prop from the HoverCard component.
*/
private _cardDismiss;
private _setDismissedState;
private _instantOpenAsExpanded;
private _setEventListeners;
}
/**
* {@docCategory HoverCard}
*/
export declare enum HoverCardType {
/**
* Plain card consisting of one part responsive to the size of content.
*/
plain = "PlainCard",
/**
* File card consisting of two parts: compact and expanded. Has some default sizes if not specified.
*/
expanding = "ExpandingCard"
}
/** Converts HSL components to an HSV color. */
export declare function hsl2hsv(h: number, s: number, l: number): IHSV;
/** Converts HSL components to an RGB color. Does not set the alpha value. */
export declare function hsl2rgb(h: number, s: number, l: number): IRGB;
/** Converts HSV components to a hex color string (without # prefix). */
export declare function hsv2hex(h: number, s: number, v: number): string;
/** Converts HSV components to an HSL color. */
export declare function hsv2hsl(h: number, s: number, v: number): IHSL;
/** Converts HSV components to an RGB color. Does not set the alpha value. */
export declare function hsv2rgb(h: number, s: number, v: number): IRGB;
declare interface IAccessiblePopupProps {
/**
* Sets the HTMLElement to focus on when exiting the FocusTrapZone.
* @defaultvalue The element.target that triggered the Panel.
*/
elementToFocusOnDismiss?: HTMLElement;
/**
* Indicates if this dialog will ignore keeping track of HTMLElement that activated the Zone.
* @defaultvalue false
*/
ignoreExternalFocusing?: boolean;
/**
* Indicates whether dialog should force focus inside the focus trap zone
* @defaultvalue true
*/
forceFocusInsideTrap?: boolean;
/**
* Indicates the selector for first focusable item
*/
firstFocusableSelector?: string | (() => string);
/**
* Aria label on close button
*/
closeButtonAriaLabel?: string;
/**
* Indicates if this dialog will allow clicks outside the FocusTrapZone
* @defaultvalue false
*/
isClickableOutsideFocusTrap?: boolean;
}
/**
* {@docCategory ActivityItem}
*/
export declare interface IActivityItemProps extends React.AllHTMLAttributes {
/**
* An element describing the activity that took place. If no activityDescription, activityDescriptionText, or
* onRenderActivityDescription are included, no description of the activity is shown.
*/
activityDescription?: React.ReactNode[] | React.ReactNode;
/**
* Text describing the activity that occurred and naming the people involved in it.
* Deprecated, use `activityDescription` instead.
* @deprecated Use `activityDescription` instead.
*/
activityDescriptionText?: string;
/**
* An element containing an icon shown next to the activity item.
*/
activityIcon?: React.ReactNode;
/**
* If activityIcon is not set, then the persona props in this array will be used as the icon for the this activity item.
*/
activityPersonas?: Array;
/**
* An element containing the text of comments or \@mention messages.
* If no comments, commentText, or onRenderComments are included, no comments are shown.
*/
comments?: React.ReactNode[] | React.ReactNode;
/**
* Text of comments or \@mention messages.
* Deprecated, use `comments` instead.
* @deprecated Use `comments` instead.
*/
commentText?: string;
/**
* Indicated if the compact styling should be used.
*/
isCompact?: boolean;
/**
* A renderer for the description of the current activity.
*/
onRenderActivityDescription?: IRenderFunction;
/**
* A renderer that adds the text of a comment below the activity description.
*/
onRenderComments?: IRenderFunction;
/**
* A renderer to create the icon next to the activity item.
*/
onRenderIcon?: IRenderFunction;
/**
* A renderer adds a time stamp. If not included, timeStamp is shown as plain text below the activity.
*/
onRenderTimeStamp?: IRenderFunction;
/**
* Optional styling for the elements within the Activity Item.
*/
styles?: IActivityItemStyles;
/**
* Element shown as a timestamp on this activity. If not included, no timestamp is shown.
*/
timeStamp?: string | React.ReactNode[] | React.ReactNode;
/**
* Beacon color one
*/
beaconColorOne?: string;
/**
* Beacon color two
*/
beaconColorTwo?: string;
/**
* Enables/Disables the beacon that radiates
* from the center of the center of the activity icon. Signals an activity has started.
* @defaultvalue false
*/
animateBeaconSignal?: boolean;
}
/**
* {@docCategory ActivityItem}
*/
export declare interface IActivityItemStyles {
/**
* Styles applied to the root activity item container.
*/
root?: IStyle;
/**
* Styles applied to the root activity item container.
*/
pulsingBeacon?: IStyle;
/**
* Styles applied to the main container of the activity's description.
*/
activityContent?: IStyle;
/**
* Styles applied to the persona of the user that did this activity.
*/
activityPersona?: IStyle;
/**
* Styles applied to the activity's description.
*/
activityText?: IStyle;
/**
* Styles applied to the icon indicating the type of the activity. Only shown when personas are unavailable.
*/
activityTypeIcon?: IStyle;
/**
* Styles applied to the text of comments.
*/
commentText?: IStyle;
/**
* Styles applied to personas when two users are involved in a single activity.
*/
doublePersona?: IStyle;
/**
* Styles applied to root in the compact variant.
*/
isCompactRoot?: IStyle;
/**
* Styles applied to personas and icons in the compact variant.
*/
isCompactIcon?: IStyle;
/**
* Styles applied to main text container in the compact variant.
*/
isCompactContent?: IStyle;
/**
* Styles applied to personas in the compact variant.
*/
isCompactPersona?: IStyle;
/**
* Styles applied to a wrapper around personas in the compact variant.
*/
isCompactPersonaContainer?: IStyle;
/**
* Styles applied to the container of the persona image or activity type icon.
*/
personaContainer?: IStyle;
/**
* Styles applied to the timestamp at the end of each activity item.
*/
timeStamp?: IStyle;
/**
* Styles applied to the timestamp in compact mode.
* This can occur if a host overrides the render behavior to force the timestamp to render.
*/
isCompactTimeStamp?: IStyle;
}
/**
* {@docCategory Announced}
*/
export declare interface IAnnouncedProps extends React.Props, React.HTMLAttributes {
/** Call to provide customized styling that will layer on top of the variant rules. */
styles?: IStyleFunctionOrObject<{}, IAnnouncedStyles>;
/**
* The status message provided as screen reader output
*/
message?: string;
}
/**
* {@docCategory Announced}
*/
export declare interface IAnnouncedStyles {
/**
* Style override for the screen reader text.
*/
screenReaderText: IStyle;
}
/**
* {@docCategory Autofill}
*/
export declare interface IAutofill {
/**
* The current index of the cursor in the input area. Returns -1 if the input element
* is not ready.
*/
cursorLocation: number | null;
/**
* A boolean for whether or not there is a value selected in the input area.
*/
isValueSelected: boolean;
/**
* The current text value that the user has entered.
*/
value: string;
/**
* The current index of where the selection starts. Returns -1 if the input element
* is not ready.
*/
selectionStart: number | null;
/**
* the current index of where the selection ends. Returns -1 if the input element
* is not ready.
*/
selectionEnd: number | null;
/**
* The current input element.
*/
inputElement: HTMLInputElement | null;
/**
* Focus the input element.
*/
focus(): void;
/**
* Clear all text in the input. Sets value to '';
*/
clear(): void;
}
/**
* {@docCategory Autofill}
*/
export declare interface IAutofillProps extends React.InputHTMLAttributes {
/**
* Gets the compoonent ref.
*/
componentRef?: IRefObject;
/**
* The suggested autofill value that will display.
*/
suggestedDisplayValue?: string;
/**
* A callback for when the current input value changes.
*/
onInputValueChange?: (newValue?: string) => void;
/**
* When the user uses left arrow, right arrow, clicks, or deletes text autofill is disabled
* Since the user has taken control. It is automatically reenabled when the user enters text and the
* cursor is at the end of the text in the input box. This specifies other key presses that will reenabled
* autofill.
* @defaultvalue [KeyCodes.down, KeyCodes.up]
*/
enableAutofillOnKeyPress?: KeyCodes[];
/**
* The default value to be visible. This is different from placeholder
* because it actually sets the current value of the picker
* Note: This will only be set upon component creation
* and will not update with subsequent prop updates.
*/
defaultVisibleValue?: string;
/**
* Handler for checking and updating the value if needed
* in componentWillReceiveProps
*
* @param defaultVisibleValue - The defaultVisibleValue that got passed
* in to the auto fill's componentWillReceiveProps
* @returns - the updated value to set, if needed
*/
updateValueInWillReceiveProps?: () => string | null;
/**
* Handler for checking if the full value of the input should
* be seleced in componentDidUpdate
*
* @returns - should the full value of the input be selected?
*/
shouldSelectFullInputValueInComponentDidUpdate?: () => boolean;
/**
* A callback used to modify the input string.
*/
onInputChange?: (value: string) => string;
/**
* Should the value of the input be selected? True if we're focused on our input, false otherwise.
* We need to explicitly not select the text in the autofill if we are no longer focused.
* In IE11, selecting a input will also focus the input, causing other element's focus to be stolen.
*/
preventValueSelection?: boolean;
}
export declare interface IAutofillState {
displayValue?: string;
}
/**
* Deprecated, do not use.
* @deprecated do not use, will be removed in 6.0
* {@docCategory Autofill}
*/
export declare interface IBaseAutoFill extends IAutofill {
}
/**
* Deprecated, do not use.
* @deprecated do not use, will be removed in 6.0
* {@docCategory Autofill}
*/
export declare interface IBaseAutoFillProps extends IAutofillProps {
}
/**
* {@docCategory Button}
*/
export declare interface IBaseButtonProps extends IButtonProps {
baseClassName?: string;
variantClassName?: string;
}
export declare interface IBaseButtonState {
menuProps?: IContextualMenuProps | null;
}
/**
* Interface containing props common for all types of cards.
*/
declare interface IBaseCardProps extends React.HTMLAttributes {
/**
* Optional callback to access the TComponent interface. Use this instead of ref for accessing
* the public methods and properties of the component.
*/
componentRef?: IRefObject;
/**
* Additional CSS class(es) to apply to the Card content wrapper div.
*/
className?: string;
/**
* How the element should be positioned
* @defaultvalue DirectionalHint.bottomLeftEdge
*/
directionalHint?: DirectionalHint;
/**
* Make callout content show on the set side
* @defaultvalue true
*/
directionalHintFixed?: boolean;
/**
* Focus on first element by default on card or not
*/
firstFocus?: boolean;
/**
* The gap between the card and the target
* @defaultvalue 0
*/
gapSpace?: number;
/**
* Callback upon focus or mouse enter event
*/
onEnter?: (ev?: any) => void;
/**
* Callback upon blur or mouse leave event
*/
onLeave?: (ev?: any) => void;
/**
* Item to be returned with onRender functions
*/
renderData?: any;
/**
* Custom styles for this component
*/
styles?: IStyleFunctionOrObject;
/**
* Element to anchor the card to.
*/
targetElement?: HTMLElement;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Trap focus or not
*/
trapFocus?: boolean;
}
/**
* Interface containing styleProps common for all types of cards.
*/
declare interface IBaseCardStyleProps {
/**
* ClassName to inject into wrapper div of the content.
*/
className?: string;
/**
* Theme provided by High-Order Component.
*/
theme: ITheme;
}
/**
* Interface containing style sections common for all types of cards.
*/
declare interface IBaseCardStyles {
/**
* Style for the root element in the default enabled, non-toggled state.
*/
root?: IStyle;
}
export declare interface IBaseExtendedPicker {
/** Forces the picker to resolve */
forceResolve?: () => void;
/** Gets the current value of the input. */
items: T[] | undefined;
/** Sets focus to the input. */
focus: () => void;
}
export declare interface IBaseExtendedPickerProps {
/**
* Ref of the component
*/
componentRef?: IRefObject>;
/**
* Header/title element for the picker
*/
headerComponent?: JSX.Element;
/**
* Initial items that have already been selected and should appear in the people picker.
*/
defaultSelectedItems?: T[];
/**
* A callback for when the selected list of items changes.
*/
onChange?: (items?: T[]) => void;
/**
* A callback for when text is pasted into the input
*/
onPaste?: (pastedText: string) => T[];
/**
* A callback for when the user put focus on the picker
*/
onFocus?: React.FocusEventHandler;
/**
* A callback for when the user moves the focus away from the picker
*/
onBlur?: React.FocusEventHandler;
/**
* ClassName for the picker.
*/
className?: string;
/**
* Function that specifies how the floating picker will appear.
*/
onRenderFloatingPicker: React.ComponentType>;
/**
* Function that specifies how the floating picker will appear.
*/
onRenderSelectedItems: React.ComponentType>;
/**
* Floating picker properties
*/
floatingPickerProps: IBaseFloatingPickerProps;
/**
* Selected items list properties
*/
selectedItemsListProps: IBaseSelectedItemsListProps;
/**
* Autofill input native props
* @defaultvalue undefined
*/
inputProps?: IInputProps;
/**
* Flag for disabling the picker.
* @defaultvalue false
*/
disabled?: boolean;
/**
* Restrict the amount of selectable items.
* @defaultvalue undefined
*/
itemLimit?: number;
/**
* A callback to process a selection after the user selects a suggestion from the picker.
* The returned item will be added to the selected items list
*/
onItemSelected?: (selectedItem?: T) => T | PromiseLike;
/**
* A callback on when an item was added to the selected item list
*/
onItemAdded?: (addedItem: T) => void;
/**
* A callback on when an item or items were removed from the selected item list
*/
onItemsRemoved?: (removedItems: T[]) => void;
/**
* If using as a controlled component use selectedItems here instead of the SelectedItemsList
*/
selectedItems?: T[];
/**
* If using as a controlled component use suggestionItems here instead of FloatingPicker
*/
suggestionItems?: T[];
/**
* Focus zone props
*/
focusZoneProps?: IFocusZoneProps;
/**
* Current rendered query string that's corealte to current rendered result
**/
currentRenderedQueryString?: string;
}
export declare interface IBaseExtendedPickerState {
queryString: string | null;
selectedItems: T[] | null;
suggestionItems: T[] | null;
}
export declare interface IBaseFloatingPicker {
/** Whether the suggestions are shown */
isSuggestionsShown: boolean;
/** On queryString changed */
onQueryStringChanged: (input: string) => void;
/** Hides the picker */
hidePicker: () => void;
/** Shows the picker
* @param updateValue - Optional param to indicate whether to update the query string
*/
showPicker: (updateValue?: boolean) => void;
/** Gets the suggestions */
suggestions: any[];
/** Gets the input text */
inputText: string;
}
export declare interface IBaseFloatingPickerProps extends React.ClassAttributes {
componentRef?: IRefObject;
/**
* The suggestions store
*/
suggestionsStore: SuggestionsStore;
/**
* The suggestions to show on zero query, return null if using as a controlled component
*/
onZeroQuerySuggestion?: (selectedItems?: T[]) => T[] | PromiseLike | null;
/**
* The input element to listen on events
*/
inputElement?: HTMLInputElement | null;
/**
* Function that specifies how an individual suggestion item will appear.
*/
onRenderSuggestionsItem?: (props: T, itemProps: ISuggestionItemProps) => JSX.Element;
/**
* A callback for what should happen when a person types text into the input.
* Returns the already selected items so the resolver can filter them out.
* If used in conjunction with resolveDelay this will ony kick off after the delay throttle.
* Return null if using as a controlled component
*/
onResolveSuggestions: (filter: string, selectedItems?: T[]) => T[] | PromiseLike | null;
/**
* A callback for when the input has been changed
*/
onInputChanged?: (filter: string) => void;
/**
* The delay time in ms before resolving suggestions, which is kicked off when input has been changed.
* e.g. If a second input change happens within the resolveDelay time, the timer will start over.
* Only until after the timer completes will onResolveSuggestions be called.
*/
resolveDelay?: number;
/**
* A callback for when a suggestion is clicked
*/
onChange?: (item: T) => void;
/**
* ClassName for the picker.
*/
className?: string;
/**
* The properties that will get passed to the Suggestions component.
*/
pickerSuggestionsProps?: IBaseFloatingPickerSuggestionProps;
/**
* A callback for when an item is removed from the suggestion list
*/
onRemoveSuggestion?: (item: T) => void;
/**
* A function used to validate if raw text entered into the well can be added
*/
onValidateInput?: (input: string) => boolean;
/**
* The text to display while searching for more results in a limited suggestions list
*/
searchingText?: ((props: {
input: string;
}) => string) | string;
/**
* Function that specifies how arbitrary text entered into the well is handled.
*/
createGenericItem?: (input: string, isValid: boolean) => ISuggestionModel;
/**
* The callback that should be called to see if the force resolve command should be shown
*/
showForceResolve?: () => boolean;
/**
* The items that the base picker should currently display as selected. If this is provided then the picker will act as a controlled
* component.
*/
selectedItems?: T[];
/**
* A callback to get text from an item. Used to autofill text in the pickers.
*/
getTextFromItem?: (item: T, currentValue?: string) => string;
/**
* Width for the suggestions callout
*/
calloutWidth?: number;
/**
* The callback that should be called when the suggestions are shown
*/
onSuggestionsShown?: () => void;
/**
* The callback that should be called when the suggestions are hiden
*/
onSuggestionsHidden?: () => void;
/**
* If using as a controlled component, the items to show in the suggestion list
*/
suggestionItems?: T[];
}
export declare interface IBaseFloatingPickerState {
queryString: string;
suggestionsVisible?: boolean;
didBind: boolean;
}
/**
* Props which are passed on to the inner Suggestions component
*/
export declare type IBaseFloatingPickerSuggestionProps = Pick, 'shouldSelectFirstItem' | 'headerItemsProps' | 'footerItemsProps' | 'showRemoveButtons'>;
/**
* BasePicker component.
* {@docCategory Pickers}
*/
export declare interface IBasePicker {
/** Gets the current value of the input. */
items: T[] | undefined;
/** Sets focus to the focus zone. */
focus: () => void;
/** Set focus to the input */
focusInput: () => void;
}
/**
* Type T is the type of the item that is displayed
* and searched for by the picker. For example, if the picker is
* displaying persona's then type T could either be of Persona or IPersona props
* {@docCategory Pickers}
*/
export declare interface IBasePickerProps extends React.Props {
/**
* Optional callback to access the IBasePicker interface. Use this instead of ref for accessing
* the public methods and properties of the component.
*/
componentRef?: IRefObject>;
/**
* Function that specifies how the selected item will appear.
*/
onRenderItem?: (props: IPickerItemProps) => JSX.Element;
/**
* Function that specifies how an individual suggestion item will appear.
*/
onRenderSuggestionsItem?: (props: T, itemProps: ISuggestionItemProps) => JSX.Element;
/**
* A callback for what should happen when a person types text into the input.
* Returns the already selected items so the resolver can filter them out.
* If used in conjunction with resolveDelay this will ony kick off after the delay throttle.
*/
onResolveSuggestions: (filter: string, selectedItems?: T[]) => T[] | PromiseLike;
/**
* The delay time in ms before resolving suggestions, which is kicked off when input has been changed.
* e.g. If a second input change happens within the resolveDelay time, the timer will start over.
* Only until after the timer completes will onResolveSuggestions be called.
*/
resolveDelay?: number;
/**
* A callback for what should happen when a user clicks within the input area.
* @deprecated Please use onEmptyResolveSuggestions instead, as the suggestions aren't about
* setting focus as they are about resolving suggestions when there is no input.
*/
onEmptyInputFocus?: (selectedItems?: T[]) => T[] | PromiseLike;
/**
* A callback for what should happen when suggestions are shown without
* input provided.
* Returns the already selected items so the resolver can filter them out.
* If used in conjunction with resolveDelay this will ony kick off after the delay throttle.
*/
onEmptyResolveSuggestions?: (selectedItems?: T[]) => T[] | PromiseLike;
/**
* Initial items that have already been selected and should appear in the people picker.
*/
defaultSelectedItems?: T[];
/**
* A callback for when the selected list of items changes.
*/
onChange?: (items?: T[]) => void;
/**
* A callback for when the user put focus on the picker
*/
onFocus?: React.FocusEventHandler;
/**
* A callback for when the user moves the focus away from the picker
*/
onBlur?: React.FocusEventHandler;
/**
* A callback to get text from an item. Used to autofill text in the pickers.
*/
getTextFromItem?: (item: T, currentValue?: string) => string;
/**
* A callback that gets the rest of the results when a user clicks get more results.
*/
onGetMoreResults?: (filter: string, selectedItems?: T[]) => T[] | PromiseLike;
/**
* ClassName for the picker.
*/
className?: string;
/**
* The properties that will get passed to the Suggestions component.
*/
pickerSuggestionsProps?: IBasePickerSuggestionsProps;
/**
* The properties that will get passed to the Callout component.
*/
pickerCalloutProps?: ICalloutProps;
/**
* AutoFill input native props
* @defaultvalue undefined
*/
inputProps?: IInputProps;
/**
* A callback for when an item is removed from the suggestion list
*/
onRemoveSuggestion?: (item: T) => void;
/**
* A function used to validate if raw text entered into the well can be added into the selected items list
*/
onValidateInput?: (input: string) => ValidationState;
/**
* The text to display while searching for more results in a limited suggestions list
*/
searchingText?: ((props: {
input: string;
}) => string) | string;
/**
* Flag for disabling the picker.
* @defaultvalue false
*/
disabled?: boolean;
/**
* Restrict the amount of selectable items.
* @defaultvalue undefined
*/
itemLimit?: number;
/**
* Function that specifies how arbitrary text entered into the well is handled.
*/
createGenericItem?: (input: string, ValidationState: ValidationState) => ISuggestionModel | T;
/**
* Aria label for the "X" button in the selected item component.
* @defaultvalue ''
*/
removeButtonAriaLabel?: string;
/**
* A callback to process a selection after the user selects something from the picker. If the callback returns null,
* the item will not be added to the picker.
*/
onItemSelected?: (selectedItem?: T) => T | PromiseLike | null;
/**
* The items that the base picker should currently display as selected.
* If this is provided then the picker will act as a controlled component.
*/
selectedItems?: T[];
/**
* A callback used to modify the input string.
*/
onInputChange?: (input: string) => string;
/**
* A callback to override the default behavior of adding the selected suggestion on dismiss.
*/
onDismiss?: (ev?: any, selectedItem?: T) => void;
/**
* Adds an additional alert for the currently selected suggestion. This prop should be set to true for IE11 and below, as it
* enables proper screen reader behavior for each suggestion (since aria-activedescendant does not work with IE11).
* It should not be set for modern browsers (Edge, Chrome).
* @defaultvalue false
*/
enableSelectedSuggestionAlert?: boolean;
/**
* Call to provide customized styling that will layer on top of the variant rules.
*/
styles?: IStyleFunctionOrObject;
/**
* Theme provided by styled() function.
*/
theme?: ITheme;
}
export declare interface IBasePickerState {
items?: any;
suggestedDisplayValue?: string;
moreSuggestionsAvailable?: boolean;
isFocused?: boolean;
isSearching?: boolean;
isMostRecentlyUsedVisible?: boolean;
suggestionsVisible?: boolean;
suggestionsLoading?: boolean;
isResultsFooterVisible?: boolean;
selectedIndices?: number[];
}
/**
* The props needed to construct styles.
* {@docCategory Pickers}
*/
export declare type IBasePickerStyleProps = Pick, 'theme' | 'className' | 'disabled'> & {
/** Whether text style area is focused */
isFocused?: boolean;
/** Optional pickerInput className */
inputClassName?: string;
};
/**
* Represents the stylable areas of the control.
* {@docCategory Pickers}
*/
export declare interface IBasePickerStyles {
/** Root element of any picker extending from BasePicker (wraps all the elements). */
root: IStyle;
/** Refers to the elements already selected(picked) wrapped by `itemsWrapper` along with the input to type new selection. */
text: IStyle;
/** Refers to the items already selected(picked). */
itemsWrapper: IStyle;
/** Refers to the input were to type new selections(picks). */
input: IStyle;
/** Refers to helper element used for accessibility tools (hidden from view on screen). */
screenReaderText: IStyle;
}
/**
* Subset of picker options that may be legally passed through a picker to its
* internal Suggestions component.
* {@docCategory Pickers}
*/
export declare interface IBasePickerSuggestionsProps extends Pick, 'onRenderNoResultFound' | 'suggestionsHeaderText' | 'mostRecentlyUsedHeaderText' | 'noResultsFoundText' | 'className' | 'suggestionsClassName' | 'suggestionsItemClassName' | 'searchForMoreText' | 'forceResolveText' | 'loadingText' | 'searchingText' | 'resultsFooterFull' | 'resultsFooter' | 'resultsMaximumNumber' | 'showRemoveButtons' | 'suggestionsAvailableAlertText' | 'suggestionsContainerAriaLabel'> {
}
export declare interface IBaseSelectedItemsList {
/** Gets the current value of the input. */
items: T[] | undefined;
addItems: (items: T[]) => void;
}
export declare interface IBaseSelectedItemsListProps extends React.ClassAttributes {
componentRef?: IRefObject>;
/**
* The selection
*/
selection?: Selection;
/**
* A callback for when items are copied
*/
onCopyItems?: (items: T[]) => string;
/**
* Function that specifies how the selected item will appear.
*/
onRenderItem?: (props: ISelectedItemProps) => JSX.Element;
/**
* Initial items that have already been selected and should appear in the people picker.
*/
defaultSelectedItems?: T[];
/**
* A callback for when the selected list of items changes.
*/
onChange?: (items?: T[]) => void;
/**
* Function that specifies how arbitrary text entered into the well is handled.
*/
createGenericItem?: (input: string, ValidationState: ValidationState) => ISuggestionModel;
/**
* A callback to process a selection after the user selects something from the picker.
*/
onItemSelected?: (selectedItem?: T) => T | PromiseLike;
/**
* The items that the base picker should currently display as selected. If this is provided then the picker will act as a
* controlled component.
*/
selectedItems?: T[];
/**
* Aria label for the 'X' button in the selected item component.
* @defaultvalue ''
*/
removeButtonAriaLabel?: string;
/**
* A callback when an item is deleted
* @deprecated Use `onItemsDeleted` instead.
*/
onItemDeleted?: (deletedItem: T) => void;
/**
* A callback when and item or items are deleted
*/
onItemsDeleted?: (deletedItems: T[]) => void;
/**
* A callback on whether this item can be deleted
*/
canRemoveItem?: (item: T) => boolean;
}
export declare interface IBaseSelectedItemsListState {
items: T[];
}
/**
* {@docCategory Breadcrumb}
*/
export declare interface IBreadcrumb {
/**
* Sets focus to the first breadcrumb link.
*/
focus(): void;
}
/** @deprecated Use IBreadcrumbData */
export declare type IBreadCrumbData = IBreadcrumbData;
/**
* {@docCategory Breadcrumb}
*/
export declare interface IBreadcrumbData {
props: IBreadcrumbProps;
renderedItems: IBreadcrumbItem[];
renderedOverflowItems: IBreadcrumbItem[];
}
/**
* {@docCategory Breadcrumb}
*/
export declare interface IBreadcrumbItem {
/**
* Text to display to the user for the breadcrumb
*/
text: string;
/**
* Arbitrary unique string associated with the breadcrumb
*/
key: string;
/**
* Callback issued when the breadcrumb is selected.
*/
onClick?: (ev?: React.MouseEvent, item?: IBreadcrumbItem) => void;
/**
* Url to navigate to when this breadcrumb is clicked.
*/
href?: string;
/**
* If this breadcrumb item is the item the user is currently on, if set to true, aria-current="page" will be applied to this
* breadcrumb link
*/
isCurrentItem?: boolean;
}
/**
* {@docCategory Breadcrumb}
*/
export declare interface IBreadcrumbProps extends React.HTMLAttributes {
/**
* Optional callback to access the IBreadcrumb interface. Use this instead of ref for accessing
* the public methods and properties of the component.
*/
componentRef?: IRefObject;
/**
* Collection of breadcrumbs to render
*/
items: IBreadcrumbItem[];
/**
* Optional root classname for the root breadcrumb element.
*/
className?: string;
/**
* Render a custom divider in place of the default chevron `>`
*/
dividerAs?: IComponentAs;
/**
* The maximum number of breadcrumbs to display before coalescing.
* If not specified, all breadcrumbs will be rendered.
*/
maxDisplayedItems?: number;
/** Method to call when trying to render an item. */
onRenderItem?: IRenderFunction;
/**
* Method to call when reducing the length of the breadcrumb.
* Return undefined to never reduce breadcrumb length
*/
onReduceData?: (data: IBreadcrumbData) => IBreadcrumbData | undefined;
/**
* Aria label to place on the navigation landmark for breadcrumb
*/
ariaLabel?: string;
/**
* Optional name to use for aria label on overflow button.
*/
overflowAriaLabel?: string;
/**
* Optional index where overflow items will be collapsed. Defaults to 0.
*/
overflowIndex?: number;
styles?: IStyleFunctionOrObject;
theme?: ITheme;
/**
* Focuszone props that will get passed through to the root focus zone.
*/
focusZoneProps?: IFocusZoneProps;
/**
* TooltipHost props that will get passed through to overflow tooltips.
*/
tooltipHostProps?: ITooltipHostProps;
}
/**
* {@docCategory Breadcrumb}
*/
export declare interface IBreadcrumbStyleProps {
className?: string;
theme: ITheme;
}
/**
* {@docCategory Breadcrumb}
*/
export declare interface IBreadcrumbStyles {
root: IStyle;
list: IStyle;
listItem: IStyle;
chevron: IStyle;
overflow: IStyle;
overflowButton: IStyle;
itemLink: IStyle;
item: IStyle;
}
/**
* {@docCategory Button}
*/
export declare interface IButton {
/**
* Sets focus to the button.
*/
focus: () => void;
/**
* If there is a menu associated with this button and it is visible, this will dismiss the menu
*/
dismissMenu: () => void;
/**
* If there is a menu associated with this button and it is visible, this will open the menu.
* Params are optional overrides to the ones defined in 'menuProps' to apply to just this instance of opening the menu.
*
* @param shouldFocusOnContainer - override to the ContextualMenu shouldFocusOnContainer prop.
* BaseButton implementation defaults to 'undefined'.
* @param shouldFocusOnMount - override to the ContextualMenu shouldFocusOnMount prop. BaseButton implementation defaults to 'true'.
*/
openMenu: (shouldFocusOnContainer?: boolean, shouldFocusOnMount?: boolean) => void;
}
declare interface IButtonClassNames {
root?: string;
flexContainer?: string;
textContainer?: string;
icon?: string;
label?: string;
menuIcon?: string;
description?: string;
screenReaderText?: string;
}
/**
* {@docCategory Button}
*/
export declare interface IButtonProps extends React.AllHTMLAttributes {
/**
* Optional callback to access the IButton interface. Use this instead of ref for accessing
* the public methods and properties of the component.
*/
componentRef?: IRefObject;
/**
* If provided, this component will be rendered as an anchor.
* @defaultvalue ElementType.anchor
*/
href?: string;
/**
* Changes the visual presentation of the button to be emphasized (if defined)
* @defaultvalue false
*/
primary?: boolean;
/**
* Unique id to identify the item. Typically a duplicate of key value.
*/
uniqueId?: string | number;
/**
* Whether the button is disabled
*/
disabled?: boolean;
/**
* Whether the button can have focus in disabled mode
*/
allowDisabledFocus?: boolean;
/**
* If set to true and if this is a splitButton (split == true) then the primary action of a split button is disabled.
*/
primaryDisabled?: boolean;
/**
* Custom styling for individual elements within the button DOM.
*/
styles?: IButtonStyles;
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Whether the button is checked
*/
checked?: boolean;
/**
* Whether button is a toggle button with distinct on and off states. This should be true for buttons that permanently
* change state when a press event finishes, such as a volume mute button.
*/
toggle?: boolean;
/**
* If provided, additional class name to provide on the root element.
*/
className?: string;
/**
* The aria label of the button for the benefit of screen readers.
*/
ariaLabel?: string;
/**
* Detailed description of the button for the benefit of screen readers.
*
* Besides the compound button, other button types will need more information provided to screen reader.
*/
ariaDescription?: string;
/**
* If provided and is true it adds an 'aria-hidden' attribute instructing screen readers to ignore the element.
*/
ariaHidden?: boolean;
/**
* Text to render button label. If text is supplied, it will override any string in button children.
* Other children components will be passed through after the text.
*/
text?: string;
/**
* The props for the icon shown in the button.
*/
iconProps?: IIconProps;
/**
* Props for button menu. Providing this will default to showing the menu icon. See menuIconProps for overriding
* how the default icon looks. Providing this in addition of onClick and setting the split property to true will render a SplitButton.
*/
menuProps?: IContextualMenuProps;
/**
* Callback that runs after Button's contextualmenu was closed (removed from the DOM)
*/
onAfterMenuDismiss?: () => void;
/**
* If set to true, and if menuProps and onClick are provided, the button will render as a SplitButton. Defaults to false.
*/
split?: boolean;
/**
* The props for the icon shown when providing a menu dropdown.
*/
menuIconProps?: IIconProps;
/**
* Accessible label for the dropdown chevron button if this button is split.
*/
splitButtonAriaLabel?: string;
/**
* Optional callback when menu is clicked.
*/
onMenuClick?: (ev?: React.MouseEvent | React.KeyboardEvent, button?: IButtonProps) => void;
/**
* Custom render function for the icon
*/
onRenderIcon?: IRenderFunction;
/**
* Custom render function for the label text.
*/
onRenderText?: IRenderFunction;
/**
* Custom render function for the desciption text.
*/
onRenderDescription?: IRenderFunction;
/**
* Custom render function for the aria description element.
*/
onRenderAriaDescription?: IRenderFunction;
/**
* Custom render function for rendering the button children.
*/
onRenderChildren?: IRenderFunction;
/**
* Custom render function for button menu icon
*/
onRenderMenuIcon?: IRenderFunction;
/**
* Deprecated at v6.3.2, to be removed at \>= v7.0.0. Use `menuAs` instead.
* @deprecated Use `menuAs` instead.
*/
onRenderMenu?: IRenderFunction;
/**
* Render a custom menu in place of the normal one.
*/
menuAs?: IComponentAs;
/**
* Description of the action this button takes.
* Only used for compound buttons
*/
secondaryText?: string;
/**
* Deprecated at v1.2.3, to be removed at \>= v2.0.0. Use specific button component instead.
* @defaultvalue ButtonType.default
* @deprecated Use specific button component instead.
*/
buttonType?: ButtonType;
/**
* Deprecated at v0.56.2, to be removed at \>= v1.0.0. Just pass in button props instead.
* they will be mixed into the button/anchor element rendered by the component.
* @deprecated Use button props instead.
*/
rootProps?: React.ButtonHTMLAttributes | React.AnchorHTMLAttributes;
/**
* Any custom data the developer wishes to associate with the menu item.
* Deprecated, use `checked` if setting state.
* @deprecated unused, use `checked` if setting state.
*/
toggled?: boolean;
/**
* Any custom data the developer wishes to associate with the menu item.
*/
data?: any;
/**
* Method to provide the classnames to style a button.
* The default value for this prop is the getClassnames func
* defined in BaseButton.classnames.
* @defaultvalue getBaseButtonClassNames
*/
getClassNames?: (theme: ITheme, className: string, variantClassName: string, iconClassName: string | undefined, menuIconClassName: string | undefined, disabled: boolean, checked: boolean, expanded: boolean, isSplit: boolean | undefined, allowDisabledFocus: boolean) => IButtonClassNames;
/**
* Method to provide the classnames to style a button.
* The default value for this prop is the getClassnames func
* defined in BaseButton.classnames.
* @defaultvalue getBaseSplitButtonClassNames
*/
getSplitButtonClassNames?: (disabled: boolean, expanded: boolean, checked: boolean, allowDisabledFocus: boolean) => ISplitButtonClassNames;
/**
* Provides a custom KeyCode that can be used to open the button menu.
* The default KeyCode is the down arrow. A value of null can be provided to disable the key codes for opening the button menu.
*/
menuTriggerKeyCode?: KeyCodes | null;
/**
* Optional keytip for this button
*/
keytipProps?: IKeytipProps;
/**
* Menu will not be created or destroyed when opened or closed, instead it
* will be hidden. This will improve perf of the menu opening but could potentially
* impact overall perf by having more elemnts in the dom. Should only be used
* when perf is important.
* Note: This may increase the amount of time it takes for the button itself to mount.
*/
persistMenu?: boolean;
/**
* Experimental prop that get passed into the menuButton that's rendered as part of
* split button. Anything passed in will likely need to have accompanying
* style changes.
*/
splitButtonMenuProps?: IButtonProps;
/**
* Style for the description text if applicable (for compound buttons.)
* Deprecated, use `secondaryText` instead.
* @deprecated Use `secondaryText` instead.
*/
description?: IStyle;
/**
* yet unknown docs
*/
defaultRender?: any;
}
/**
* {@docCategory Button}
*/
export declare interface IButtonStyles {
/**
* Style for the root element in the default enabled, non-toggled state.
*/
root?: IStyle;
/**
* Style override for the root element in a checked state, layered on top of the root style.
*/
rootChecked?: IStyle;
/**
* Style override for the root element in a disabled state, layered on top of the root style.
*/
rootDisabled?: IStyle;
/**
* Style override applied to the root on hover in the default, enabled, non-toggled state.
*/
rootHovered?: IStyle;
/**
* Style override applied to the root on focus in the default, enabled, non-toggled state.
*/
rootFocused?: IStyle;
/**
* Style override applied to the root on pressed in the default, enabled, non-toggled state.
*/
rootPressed?: IStyle;
/**
* Style override applied to the root on when menu is expanded in the default, enabled, non-toggled state.
*/
rootExpanded?: IStyle;
/**
* Style override applied to the root on hover in a checked, enabled state
*/
rootCheckedHovered?: IStyle;
/**
* Style override applied to the root on pressed in a checked, enabled state
*/
rootCheckedPressed?: IStyle;
/**
* Style override applied to the root on hover in a checked, disabled state
*/
rootCheckedDisabled?: IStyle;
/**
* Style override applied to the root on hover in a expanded state on hover
*/
rootExpandedHovered?: IStyle;
/**
* Style for the flexbox container within the root element.
*/
flexContainer?: IStyle;
/**
* Style for the text container within the flexbox container element (and contains the text and description).
*/
textContainer?: IStyle;
/**
* Style for the icon on the near side of the label.
*/
icon?: IStyle;
/**
* Style for the icon on the near side of the label on hover.
*/
iconHovered?: IStyle;
/**
* Style for the icon on the near side of the label when pressed.
*/
iconPressed?: IStyle;
/**
* Style for the icon on the near side of the label when expanded.
*/
iconExpanded?: IStyle;
/**
* Style for the icon on the near side of the label when expanded and hovered.
*/
iconExpandedHovered?: IStyle;
/**
* Style override for the icon when the button is disabled.
*/
iconDisabled?: IStyle;
/**
* Style override for the icon when the button is checked.
*/
iconChecked?: IStyle;
/**
* Style for the text content of the button.
*/
label?: IStyle;
/**
* Style override for the text content when the button is hovered.
*/
labelHovered?: IStyle;
/**
* Style override for the text content when the button is disabled.
*/
labelDisabled?: IStyle;
/**
* Style override for the text content when the button is checked.
*/
labelChecked?: IStyle;
/**
* Style for the menu chevron.
*/
menuIcon?: IStyle;
/**
* Style for the menu chevron on hover.
*/
menuIconHovered?: IStyle;
/**
* Style for the menu chevron when pressed.
*/
menuIconPressed?: IStyle;
/**
* Style for the menu chevron when expanded.
*/
menuIconExpanded?: IStyle;
/**
* Style for the menu chevron when expanded and hovered.
*/
menuIconExpandedHovered?: IStyle;
/**
* Style override for the menu chevron when the button is disabled.
*/
menuIconDisabled?: IStyle;
/**
* Style override for the menu chevron when the button is checked.
*/
menuIconChecked?: IStyle;
/**
* Style for the description text if applicable (for compound buttons.)
*/
description?: IStyle;
/**
* Style for the description text if applicable (for compound buttons.)
*/
secondaryText?: IStyle;
/**
* Style override for the description text when the button is hovered.
*/
descriptionHovered?: IStyle;
/**
* Style for the description text when the button is pressed.
*/
descriptionPressed?: IStyle;
/**
* Style override for the description text when the button is disabled.
*/
descriptionDisabled?: IStyle;
/**
* Style override for the description text when the button is checked.
*/
descriptionChecked?: IStyle;
/**
* Style override for the screen reader text.
*/
screenReaderText?: IStyle;
/**
* Style override for the container div around a SplitButton element
*/
splitButtonContainer?: IStyle;
/**
* Style for container div around a SplitButton element when the button is hovered.
*/
splitButtonContainerHovered?: IStyle;
/**
* Style for container div around a SplitButton element when the button is focused.
*/
splitButtonContainerFocused?: IStyle;
/**
* Style for container div around a SplitButton element when the button is checked.
*/
splitButtonContainerChecked?: IStyle;
/**
* Style for container div around a SplitButton element when the button is checked and hovered.
*/
splitButtonContainerCheckedHovered?: IStyle;
/**
* Style override for the container div around a SplitButton element in a disabled state
*/
splitButtonContainerDisabled?: IStyle;
/**
* Style override for the divider element that appears between the button and menu button
* for a split button.
*/
splitButtonDivider?: IStyle;
/**
* Style override for the divider element that appears between the button and menu button
* for a split button in a disabled state.
*/
splitButtonDividerDisabled?: IStyle;
/**
* Style override for the SplitButton menu button
*/
splitButtonMenuButton?: IStyle;
/**
* Style override for the SplitButton menu button element in a disabled state.
*/
splitButtonMenuButtonDisabled?: IStyle;
/**
* Style override for the SplitButton menu button element in a checked state
*/
splitButtonMenuButtonChecked?: IStyle;
/**
* Style override for the SplitButton menu button element in an expanded state
*/
splitButtonMenuButtonExpanded?: IStyle;
/**
* Style override for the SplitButton menu icon element
*/
splitButtonMenuIcon?: IStyle;
/**
* Style override for the SplitButton menu icon element in a disabled state
*/
splitButtonMenuIconDisabled?: IStyle;
/**
* Style override for the SplitButton FlexContainer.
*/
splitButtonFlexContainer?: IStyle;
}
/**
* {@docCategory Calendar}
*/
export declare interface ICalendar {
/** Sets focus to the selected date. */
focus: () => void;
}
/**
* {@docCategory Calendar}
*/
export declare interface ICalendarFormatDateCallbacks {
/**
* Callback to apply formatting to mmmm d, yyyy formated dates
*/
formatMonthDayYear: (date: Date, strings?: ICalendarStrings) => string;
/**
* Callback to apply formatting to the month and year in the Day Picker header
*/
formatMonthYear: (date: Date, strings?: ICalendarStrings) => string;
/**
* Callback to apply formatting to the days in the Day Picker calendar
*/
formatDay: (date: Date) => string;
/**
* Callback to apply formatting to the year in the Month Picker header
*/
formatYear: (date: Date) => string;
}
/**
* {@docCategory Calendar}
*/
export declare interface ICalendarIconStrings {
/**
* FabricMDL2Icons name for the left navigation icon. Previous default: ChevronLeft.
* @defaultvalue 'Up'
*/
leftNavigation?: string;
/**
* FabricMDL2Icons name for the right navigation icon. Previous default: ChevronRight.
* @defaultvalue 'Down'
*/
rightNavigation?: string;
/**
* Close icon
* @defaultvalue 'CalculatorMultiply'
*/
closeIcon?: string;
}
/**
* {@docCategory Calendar}
*/
export declare interface ICalendarProps extends IBaseProps, React.HTMLAttributes {
/**
* Optional callback to access the ICalendar interface. Use this instead of ref for accessing
* the public methods and properties of the component.
*/
componentRef?: IRefObject;
/**
* Optional class name to add to the root element.
*/
className?: string;
/**
* Callback issued when a date is selected
* @param date - The date the user selected
* @param selectedDateRangeArray - The resultant list of dates that are selected based on the date range type set for the component.
*/
onSelectDate?: (date: Date, selectedDateRangeArray?: Date[]) => void;
/**
* Callback issued when calendar is closed
*/
onDismiss?: () => void;
/**
* Whether the month picker is shown beside the day picker or hidden.
* @defaultvalue true
*/
isMonthPickerVisible?: boolean;
/**
* Whether the day picker is shown beside the month picker or hidden.
* @defaultvalue true
*/
isDayPickerVisible?: boolean;
/**
* Show month picker on top of date picker when visible.
* @defaultvalue false
*/
showMonthPickerAsOverlay?: boolean;
/**
* Value of today. If null, current time in client machine will be used.
*/
today?: Date;
/**
* Default value of the Calendar, if any
*/
value?: Date;
/**
* The first day of the week for your locale.
* @defaultvalue DayOfWeek.Sunday
*/
firstDayOfWeek?: DayOfWeek;
/**
* The date range type indicating how many days should be selected as the user
* selects days
* @defaultvalue DateRangeType.Day
*/
dateRangeType?: DateRangeType;
/**
* Whether the month view should automatically navigate to the next or previous date range
* depending on the selected date. If this property is set to true and the currently displayed
* month is March 2017, if the user clicks on a day outside the month, i.e., April 1st, the
* picker will automatically navigate to the month of April.
* @defaultvalue false
*/
autoNavigateOnSelection?: boolean;
/**
* Whether the "Go to today" link should be shown or not
*/
showGoToToday?: boolean;
/**
* This property has been removed at 0.80.0 in place of the `focus` method, to be removed \@ 1.0.0.
* @deprecated Replaced with the `focus` method.
*/
shouldFocusOnMount?: boolean;
/**
* Localized strings to use in the Calendar
*/
strings: ICalendarStrings | null;
/**
* Whether the month picker should highlight the current month
* @defaultvalue false
*/
highlightCurrentMonth?: boolean;
/**
* Whether the month picker should highlight the selected month
* @defaultvalue false
*/
highlightSelectedMonth?: boolean;
/**
* Customize navigation icons using ICalendarIconStrings
*/
navigationIcons?: ICalendarIconStrings;
/**
* Whether the calendar should show the week number (weeks 1 to 53) before each week row
* @defaultvalue false
*/
showWeekNumbers?: boolean;
/**
* Defines when the first week of the year should start, FirstWeekOfYear.FirstDay,
* FirstWeekOfYear.FirstFullWeek or FirstWeekOfYear.FirstFourDayWeek are the possible values
* @defaultvalue FirstWeekOfYear.FirstDay
*/
firstWeekOfYear?: FirstWeekOfYear;
/**
* Apply additional formating to dates, for example localized date formatting.
*/
dateTimeFormatter?: ICalendarFormatDateCallbacks;
/**
* If set the Calendar will not allow navigation to or selection of a date earlier than this value.
*/
minDate?: Date;
/**
* If set the Calendar will not allow navigation to or selection of a date later than this value.
*/
maxDate?: Date;
/**
* If set the Calendar will not allow selection of dates in this array.
*/
restrictedDates?: Date[];
/**
* Whether the calendar should show 6 weeks by default.
* @defaultvalue false
*/
showSixWeeksByDefault?: boolean;
/**
* The days that are selectable when dateRangeType is WorkWeek. If dateRangeType is not WorkWeek this property does nothing.
* @defaultvalue [Monday,Tuesday,Wednesday,Thursday,Friday]
*/
workWeekDays?: DayOfWeek[];
/**
* When clicking on "Today", select the date and close the calendar.
* @defaultvalue false
*/
selectDateOnClick?: boolean;
/**
* Whether the close button should be shown or not
* @defaultvalue false
*/
showCloseButton?: boolean;
/**
* Allows all dates and buttons to be focused, including disabled ones
* @defaultvalue false
*/
allFocusable?: boolean;
/**
* Whether the year picker is enabled
* @defaultvalue false
*/
yearPickerHidden?: boolean;
}
export declare interface ICalendarState {
/** The currently focused date in the day picker, but not necessarily selected */
navigatedDayDate?: Date;
/** The currently focused date in the month picker, but not necessarily selected */
navigatedMonthDate?: Date;
/** The currently selected date in the calendar */
selectedDate?: Date;
/** State used to show/hide month picker */
isMonthPickerVisible?: boolean;
/** State used to show/hide day picker */
isDayPickerVisible?: boolean;
}
/**
* {@docCategory Calendar}
*/
export declare interface ICalendarStrings {
/**
* An array of strings for the full names of months.
* The array is 0-based, so months[0] should be the full name of January.
*/
months: string[];
/**
* An array of strings for the short names of months.
* The array is 0-based, so shortMonths[0] should be the short name of January.
*/
shortMonths: string[];
/**
* An array of strings for the full names of days of the week.
* The array is 0-based, so days[0] should be the full name of Sunday.
*/
days: string[];
/**
* An array of strings for the initials of the days of the week.
* The array is 0-based, so days[0] should be the initial of Sunday.
*/
shortDays: string[];
/**
* String to render for button to direct the user to today's date.
*/
goToToday: string;
/**
* Aria-label for the "previous month" button.
*/
prevMonthAriaLabel?: string;
/**
* Aria-label for the "next month" button.
*/
nextMonthAriaLabel?: string;
/**
* Aria-label for the "previous year" button.
*/
prevYearAriaLabel?: string;
/**
* Aria-label for the "next year" button.
*/
nextYearAriaLabel?: string;
/**
* Aria-label for the "previous year range" button.
*/
prevYearRangeAriaLabel?: string;
/**
* Aria-label for the "next year range" button.
*/
nextYearRangeAriaLabel?: string;
/**
* Aria-label for the "close" button.
*/
closeButtonAriaLabel?: string;
/**
* Aria-label format string for the week number header. Should have 1 string param e.g. "week number \{0\}"
*/
weekNumberFormatString?: string;
}
declare interface ICalloutBeakPositionedInfo extends IPositionedData {
closestEdge: RectangleEdge;
}
/**
* {@docCategory Callout}
*/
export declare interface ICalloutContentStyleProps {
/**
* Theme to apply to the calloutContent.
*/
theme: ITheme;
/**
* Width for callout including borders.
*/
calloutWidth?: number;
/**
* CSS class to apply to the callout.
*/
className?: string;
/**
* Callout positioning data
*/
positions?: ICalloutPositionedInfo;
/**
* Whether or not to clip content of the callout,
* if it overflows vertically.
*/
overflowYHidden?: boolean;
/**
* Background color for the beak and callout.
*/
backgroundColor?: string;
/**
* Width of Callout beak
*/
beakWidth?: number;
/**
* Max width for callout including borders.
*/
calloutMaxWidth?: number;
}
/**
* {@docCategory Callout}
*/
export declare interface ICalloutContentStyles {
/**
* Style for wrapper of Callout component.
*/
container: IStyle;
/**
* Style for callout container root element.
*/
root: IStyle;
/**
* Style for callout beak.
*/
beak: IStyle;
/**
* Style for callout beak curtain.
*/
beakCurtain: IStyle;
/**
* Style for content component of the callout.
*/
calloutMain: IStyle;
}
declare interface ICalloutPositionedInfo extends IPositionedData {
beakPosition: ICalloutBeakPositionedInfo;
}
/**
* {@docCategory Callout}
*/
export declare interface ICalloutProps extends React.HTMLAttributes {
/**
* The target that the Callout should try to position itself based on.
* It can be either an Element a querySelector string of a valid Element
* or a MouseEvent. If MouseEvent is given then the origin point of the event will be used.
*/
target?: Target;
/**
* How the element should be positioned
* @defaultvalue DirectionalHint.BottomAutoEdge
*/
directionalHint?: DirectionalHint;
/**
* How the element should be positioned in RTL layouts.
* If not specified, a mirror of `directionalHint` will be used instead
*/
directionalHintForRTL?: DirectionalHint;
/**
* The gap between the Callout and the target
* @defaultvalue 0
*/
gapSpace?: number;
/**
* The width of the beak.
* @defaultvalue 16
*/
beakWidth?: number;
/**
* Custom width for callout including borders. If value is 0, no width is applied.
* @defaultvalue 0
*/
calloutWidth?: number;
/**
* Custom width for callout including borders. If value is 0, no width is applied.
* @defaultvalue 0
*/
calloutMaxWidth?: number;
/**
* The background color of the Callout in hex format ie. #ffffff.
* @defaultvalue $ms-color-white
*/
backgroundColor?: string;
/**
* The bounding rectangle for which the contextual menu can appear in.
*/
bounds?: IRectangle;
/**
* The minimum distance the callout will be away from the edge of the screen.
* @defaultvalue 8
*/
minPagePadding?: number;
/**
* If true then the beak is visible. If false it will not be shown.
* @defaultvalue true
*/
isBeakVisible?: boolean;
/**
* If true then the callout will not dismiss on scroll
* @defaultvalue false
*/
preventDismissOnScroll?: boolean;
/**
* If true then the callout will not dismiss on resize
* @defaultvalue false
*/
preventDismissOnResize?: boolean;
/**
* If true then the callout will not dismiss when it loses focus
* @defaultvalue false
*/
preventDismissOnLostFocus?: boolean;
/**
* If true the position returned will have the menu element cover the target.
* If false then it will position next to the target;
* @defaultvalue false
*/
coverTarget?: boolean;
/**
* If true the positioning logic will prefer to flip edges rather than to nudge the rectangle to fit within bounds,
* thus making sure the element aligns perfectly with target's alignment edge
*/
alignTargetEdge?: boolean;
/**
* Aria role assigned to the callout (Eg. dialog, alertdialog).
*/
role?: string;
/**
* Accessible label text for callout.
*/
ariaLabel?: string;
/**
* Defines the element id referencing the element containing label text for callout.
*/
ariaLabelledBy?: string;
/**
* Defines the element id referencing the element containing the description for the callout.
*/
ariaDescribedBy?: string;
/**
* CSS class to apply to the callout.
* @defaultvalue null
*/
className?: string;
/**
* CSS style to apply to the callout.
*/
style?: React.CSSProperties;
/**
* Optional callback when the layer content has mounted.
*/
onLayerMounted?: () => void;
/**
* Optional props to pass to the Layer component hosting the panel.
*/
layerProps?: ILayerProps;
/**
* Optional callback that is called once the callout has been correctly positioned.
* @param positions - Gives the user information about how the callout is positioned such as the
* final edge of the target that it positioned against, the beak position, and the beaks relationship to the
* edges of the callout.
*/
onPositioned?: (positions?: ICalloutPositionedInfo) => void;
/**
* Callback when the Callout tries to close.
*/
onDismiss?: (ev?: any) => void;
/**
* If true do not render on a new layer. If false render on a new layer.
*/
doNotLayer?: boolean;
/**
* If true the position will not change sides in an attempt to fit the callout within bounds.
* It will still attempt to align it to whatever bounds are given.
* @defaultvalue false
*/
directionalHintFixed?: boolean;
/**
* Specify the final height of the content.
* To be used when expanding the content dynamically so that callout can adjust its position.
*/
finalHeight?: number;
/**
* Manually set OverflowYHidden style prop to true on calloutMain element
* A variety of callout load animations will need this to hide the scollbar that can appear
*/
hideOverflow?: boolean;
/**
* If true then the callout will attempt to focus the first focusable element that it contains.
* If it doesn't find an element, no focus will be set and the method will return false.
* This means that it's the contents responsibility to either set focus or have
* focusable items.
* @returns True if focus was set, false if it was not.
*/
setInitialFocus?: boolean;
/**
* Set max height of callout
* When not set the callout will expand with contents up to the bottom of the screen
*/
calloutMaxHeight?: number;
/**
* Callback when the Callout body is scrolled.
*/
onScroll?: () => void;
/**
* Optional theme for component
*/
theme?: ITheme;
/**
* Optional styles for the component.
*/
styles?: IStyleFunctionOrObject;
/**
* If specified, renders the Callout in a hidden state.
* Use this flag, rather than rendering a callout conditionally based on visibility,
* to improve rendering performance when it becomes visible.
* Note: When callout is hidden its content will not be rendered. It will only render
* once the callout is visible.
*/
hidden?: boolean;
/**
* If specified, determines whether the underlying "Popup" component should try to restore
* focus when it is dismissed. When set to false, the Popup won't try to restore focus to
* the last focused element.
* @defaultvalue true;
*/
shouldRestoreFocus?: boolean;
}
declare interface ICalloutState {
positions?: ICalloutPositionedInfo;
slideDirectionalClassName?: string;
calloutElementRect?: ClientRect;
heightOffset?: number;
}
/**
* {@docCategory DetailsList}
*/
export declare interface ICellStyleProps {
cellLeftPadding: number;
cellRightPadding: number;
cellExtraRightPadding: number;
}
/**
* Checkbox class interface.
* {@docCategory Checkbox}
*/
export declare interface ICheckbox {
/** Gets the current checked state. */
checked: boolean;
/** Sets focus to the checkbox. */
focus: () => void;
}
/**
* Checkbox properties.
* {@docCategory Checkbox}
*/
export declare interface ICheckboxProps extends React.ButtonHTMLAttributes {
/**
* Optional callback to access the ICheckbox interface. Use this instead of ref for accessing
* the public methods and properties of the component.
*/
componentRef?: IRefObject;
/**
* Additional class name to provide on the root element, in addition to the ms-Checkbox class.
*/
className?: string;
/**
* Checked state. Mutually exclusive to "defaultChecked". Use this if you control the checked state at a higher
* level and plan to pass in the correct value based on handling onChange events and re-rendering.
*/
checked?: boolean;
/**
* Default checked state. Mutually exclusive to "checked". Use this if you want an uncontrolled component, and
* want the Checkbox instance to maintain its own state.
*/
defaultChecked?: boolean;
/**
* Label to display next to the checkbox.
*/
label?: string;
/**
* Disabled state of the checkbox.
*/
disabled?: boolean;
/**
* Callback that is called when the checked value has changed.
*/
onChange?: (ev?: React.FormEvent, checked?: boolean) => void;
/**
* Optional input props that will be mixed into the input element, *before* other props are applied. This allows
* you to extend the input element with additional attributes, such as data-automation-id needed for automation.
* Note that if you provide, for example, "disabled" as well as "inputProps.disabled", the former will take
* precedence over the later.
*/
inputProps?: React.ButtonHTMLAttributes;
/**
* Allows you to set the checkbox to be at the before (start) or after (end) the label.
* @defaultvalue 'start'
*/
boxSide?: 'start' | 'end';
/**
* Theme provided by HOC.
*/
theme?: ITheme;
/**
* Accessible label for the checkbox.
*/
ariaLabel?: string;
/**
* ID for element that contains label information for the checkbox.
*/
ariaLabelledBy?: string;
/**
* ID for element that provides extended information for the checkbox.
*/
ariaDescribedBy?: string;
/**
* The position in the parent set (if in a set) for aria-posinset.
*/
ariaPositionInSet?: number;
/**
* The total size of the parent set (if in a set) for aria-setsize.
*/
ariaSetSize?: number;
/**
* Call to provide customized styling that will layer on top of the variant rules.
*/
styles?: IStyleFunctionOrObject