{"version":3,"sources":["../../src/useControllableValue.ts","../../src/components/Button/ActionButton/ActionButton.styles.ts","../../src/components/Button/CommandButton/CommandButton.tsx","../../src/components/Button/ActionButton/ActionButton.tsx","../../src/utilities/selectableOption/SelectableOption.types.ts","../../src/utilities/selectableOption/SelectableOption.ts","../../src/components/Checkbox/Checkbox.base.tsx","../../src/components/Checkbox/Checkbox.styles.ts","../../src/components/Checkbox/Checkbox.tsx","../../src/components/Dropdown/utilities/DropdownSizePosCache.ts","../../src/components/Dropdown/Dropdown.base.tsx","../../src/safeRequestAnimationFrame.ts","../../src/components/Dropdown/Dropdown.styles.ts","../../src/components/Dropdown/Dropdown.tsx"],"names":["useControllableValue","controlledValue","defaultUncontrolledValue","onChange","_a","React","value","setValue","isControlled","useConst","undefined","currentValue","valueRef","onChangeRef","current","setValueOrCallOnChange","update","ev","newValue","getStyles","memoizeFunction","theme","customStyles","baseButtonStyles","getBaseButtonStyles","actionButtonStyles","root","padding","height","color","palette","neutralPrimary","backgroundColor","border","selectors","HighContrastSelector","borderColor","rootHovered","themePrimary","_b","iconHovered","rootPressed","black","rootExpanded","iconPressed","themeDarker","rootDisabled","neutralTertiary","_c","rootChecked","iconChecked","flexContainer","justifyContent","icon","themeDarkAlt","iconDisabled","menuIcon","neutralSecondary","textContainer","flexGrow","concatStyleSets","CommandButton","_super","ActionButton","__extends","prototype","render","this","props","styles","BaseButton","__assign","variantClassName","onRenderDescription","nullRender","__decorate","customizable","SelectableOptionMenuItemType","getAllSelectedOptions","options","selectedIndices","selectedOptions","_i","selectedIndices_1","length","option","push","getClassNames","classNamesFunction","CheckboxBase","forwardedRef","disabled","required","inputProps","name","ariaLabel","ariaLabelledBy","ariaDescribedBy","ariaPositionInSet","ariaSetSize","title","checkmarkIconProps","className","boxSide","id","useId","rootRef","mergedRootRefs","useMergedRefs","inputRef","checked","defaultChecked","isChecked","setIsChecked","indeterminate","defaultIndeterminate","isIndeterminate","setIsIndeterminate","useFocusRects","classNames","reversed","isUsingCustomLabelRender","onRenderLabel","event","defaultLabelRenderer","checkboxProps","label","text","setNativeIndeterminate","setIndeterminate","checkBoxRef","componentRef","focus","useComponentRef","ariaChecked","mergedInputProps","input","type","ref","htmlFor","checkbox","Icon","iconName","checkmark","displayName","GlobalClassNames","Checkbox","styled","semanticColors","effects","fonts","getGlobalClassNames","checkmarkFontColor","inputForegroundChecked","checkmarkFontColorHovered","checkboxBorderColor","checkboxBorderIndeterminateColor","inputBackgroundChecked","checkboxBorderColorChecked","checkboxBorderColorDisabled","disabledBodySubtext","checkboxBorderHoveredColor","inputBorderHovered","checkboxBorderIndeterminateHoveredColor","inputBackgroundCheckedHovered","checkboxBackgroundChecked","checkboxBackgroundCheckedHovered","checkboxBorderColorCheckedHovered","checkboxHoveredTextColor","inputTextHovered","checkboxBackgroundDisabledChecked","checkboxTextColor","bodyText","checkboxTextColorDisabled","disabledText","indeterminateDotStyles","content","borderRadius","roundedCorner2","position","width","top","left","boxSizing","borderWidth","borderStyle","transitionProperty","transitionDuration","transitionTimingFunction","display","_d","opacity","_e","background","_f","_g","_h","_j","_k","_l","IsFocusVisibleClassName","_m","outline","outlineOffset","medium","alignItems","cursor","userSelect","flexDirection","right","bottom","pointerEvents","flexShrink","overflow","_o","getHighContrastNoAdjustStyle","marginLeft","marginRight","_p","_q","_r","_s","fontSize","lineHeight","_t","scope","DropdownSizePosCache","_size","updateOptions","displayOnlyOptionsCache","notSelectableOptionsCache","size","i","itemType","hidden","DropdownMenuItemType","Divider","Header","_displayOnlyOptionsCache","_notSelectableOptionsCache","_cachedOptions","__spreadArray","Object","defineProperty","positionInSet","index","offset","Error","DEFAULT_PROPS","DropdownBase","propsWithoutDefaults","getPropsWithDefaults","mergedRootRef","responsiveMode","useResponsiveMode","selectedKeyPropToUse","defaultSelectedKeys","selectedKeys","defaultSelectedKey","selectedKey","multiSelect","oldOptions","usePrevious","setSelectedIndices","didOptionsChange","oldSelectedKeyProp","getAllSelectedIndices","map","selected","filter","getSelectedIndex","searchKey","findIndex","key","isSelected","selectedIndex","Array","isArray","returnValue","selectedKeyPropToUse_1","getSelectedIndexes","useSelectedItemsState","DropdownInternal","hoisted","_this","call","_host","_focusZone","_dropDown","_scrollIdleDelay","_sizePosCache","_requestAnimationFrame","component","activeTimeouts","cb","Set","extendComponent","componentWillUnmount","forEach","cancelAnimationFrame","timeoutId","requestAnimationFrame","delete","add","safeRequestAnimationFrame","dismissMenu","state","isOpen","setState","_onChange","onChanged","changedOpt","target","_getPlaceholder","placeholder","placeHolder","_getTitle","items","_unused","multiSelectDelimiter","join","_onRenderTitle","_onRenderPlaceholder","_onRenderContainer","calloutProps","panelProps","dropdownWidth","isSmall","ResponsiveMode","focusTrapZoneProps","firstFocusableTarget","_listId","panelStyles","_classNames","subComponentStyles","panel","calloutWidth","calloutMinWidth","clientWidth","Panel","closeButtonAriaLabel","hasCloseButton","isLightDismiss","onDismiss","_onDismiss","_renderFocusableList","Callout","isBeakVisible","gapSpace","doNotLayer","directionalHintFixed","directionalHint","DirectionalHint","bottomLeftEdge","callout","onScroll","_onScroll","onPositioned","_onPositioned","_onRenderCaretDown","caretDown","_onRenderList","onRenderItem","_onRenderItem","queue","renderedList","emptyQueue","newGroup","role","item","_id","placeRenderedOptionIntoQueue","_renderSeparator","_renderHeader","_renderOption","onRenderOption","_onRenderOption","isItemSelected","indexOf","itemClassName","dropdownItemHidden","dropdownItemSelectedAndDisabled","dropdownItemSelected","dropdownItemDisabled","dropdownItem","labelId","multiSelectItemStyles","multiSelectItem","_onItemClick","onMouseEnter","_onItemMouseEnter","bind","onMouseLeave","_onMouseItemLeave","onMouseMove","_onItemMouseMove","_onRenderItemLabel","css","optionSetSize","onClick","dropdownOptionText","_onRenderMultiselectOption","positions","_hasBeenPositioned","element","getDocument","getElementById","focusElement","calloutRenderEdge","targetEdge","setSelectedIndex","_isScrollIdle","_scrollIdleTimeoutId","clearTimeout","window","setTimeout","_shouldIgnoreMouseEvent","setActive","e","_onDropdownBlur","_isDisabled","hasFocus","onBlur","_onDropdownKeyDown","_lastKeyDownWasAltOrMeta","_isAltOrMeta","onKeyDown","defaultPrevented","newIndex","containsExpandCollapseModifier","altKey","metaKey","which","KeyCodes","enter","escape","up","_moveIndex","down","stopPropagation","preventDefault","home","end","space","_onDropdownKeyUp","shouldHandleKey","_shouldHandleKeyUp","onKeyUp","_onZoneKeyDown","elementToFocus","getLastFocusable","lastChild","pageUp","pageDown","getFirstFocusable","firstChild","tab","document_1","shiftKey","getPreviousElement","body","getNextElement","_onZoneKeyUp","_onDropdownClick","_shouldOpenOnFocus","_isFocusedByClick","_onDropdownMouseDown","_onFocus","onFocus","isDisabled","_onRenderLabel","labelStyles","Label","_labelId","initializeComponentRef","getId","_optionId","componentDidUpdate","prevProps","prevState","_gotMouseMove","errorMessage","propStyles","onRenderTitle","onRenderContainer","onRenderCaretDown","onRenderPlaceholder","onRenderPlaceHolder","cachedOptions","divProps","getNativeProps","divProperties","errorMessageId","hasError","hasLabel","isRenderingPlaceholder","panelClassName","calloutClassName","hasErrorMessage","tabIndex","mergeAriaAttributeValues","dropdown","onMouseDown","caretDownWrapper","shouldOpenOnFocus","notifyOnReselect","newIndexes","Math","max","min","_copyArray","splice","persist","array","newArray","array_1","stepValue","stepCounter","onRenderList","dropdownItemsWrapper","FocusZone","direction","FocusZoneDirection","vertical","dropdownItems","separatorClassName","dropdownDividerHidden","dropdownDivider","headerClassName","dropdownItemHeaderHidden","dropdownItemHeader","currentTarget","targetElement","document","activeElement","alt","keyPressIsAltOrMetaAlone","isMac","isIOS","openOnKeyboardFocus","defaultProps","titleIsPlaceHolder","titleHasError","highContrastAdjustMixin","HighContrastSelectorWhite","replace","highContrastItemAndTitleStateMixin","highContrastBorderState","MinimumScreenSelector","getScreenSelector","ScreenWidthMinMedium","Dropdown","globalClassnames","rootHoverFocusActiveSelectorNeutralDarkMixin","menuItemTextHovered","rootHoverFocusActiveSelectorNeutralPrimaryMixin","menuItemText","borderColorError","errorText","dropdownItemStyle","minHeight","wordWrap","overflowWrap","textAlign","dropdownHeaderStyle","fontWeight","FontWeights","semibold","menuHeader","selectedItemBackgroundColor","menuItemBackgroundPressed","itemSelectors","menuItemBackgroundHovered","inset","titleOpenBorderRadius","RectangleEdge","calloutOpenBorderRadius","normalize","focusBorder","inputBackground","inputBorder","DROPDOWN_HEIGHT","whiteSpace","textOverflow","inputPlaceholderText","disabledBackground","paddingTop","small","boxShadow","elevation8","bodyDivider","minWidth","maxWidth","margin","alignSelf","main","contentInner"],"mappings":"gHAAA,sDAmCM,SAAUA,EAKdC,EACAC,EACAC,GAEM,IAAAC,EAAoBC,WAAmCH,GAAtDI,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAChBI,EAAeC,iBAAsCC,IAApBT,GACjCU,EAAeH,EAAeP,EAAkBK,EAIhDM,EAAWP,SAAaM,GACxBE,EAAcR,SAAaF,GACjCE,aAAgB,WACdO,EAASE,QAAUH,EACnBE,EAAYC,QAAUX,KAKxB,IAAMY,EAAyBN,aAAS,WAAM,gBAACO,EAAkDC,GAG/F,IAAMC,EAA6B,oBAAXF,EAAyBA,EAAoBJ,EAASE,SAAWE,EAErFH,EAAYC,SACdD,EAAYC,QAAQG,EAAKC,GAGtBV,GACHD,EAASW,OAIb,MAAO,CAACP,EAAcI,K,yIChEXI,EAAYC,aAAgB,SAACC,EAAeC,G,UACjDC,EAAkCC,YAAoBH,GACtDI,EAAoC,CACxCC,KAAM,CACJC,QANkB,QAOlBC,OARwB,OASxBC,MAAOR,EAAMS,QAAQC,eACrBC,gBAAiB,cACjBC,OAAQ,wBACRC,WAAS9B,EAAA,GACPA,EAAC+B,KAAuB,CACtBC,YAAa,U,IAKnBC,YAAa,CACXR,MAAOR,EAAMS,QAAQQ,aACrBJ,WAASK,EAAA,GACPA,EAACJ,KAAuB,CACtBN,MAAO,a,IAKbW,YAAa,CACXX,MAAOR,EAAMS,QAAQQ,cAGvBG,YAAa,CACXZ,MAAOR,EAAMS,QAAQY,OAGvBC,aAAc,CACZd,MAAOR,EA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{ useConst } from './useConst';\n\nexport type ChangeCallback<\n TElement extends HTMLElement,\n TValue,\n TEvent extends React.SyntheticEvent<TElement> | undefined,\n> = (ev: TEvent, newValue: TValue | undefined) => void;\n\n/**\n * Hook to manage a value that could be either controlled or uncontrolled, such as a checked state or\n * text box string.\n * @param controlledValue - The controlled value passed in the props. This value will always be used if provided,\n * and the internal state will be updated to reflect it.\n * @param defaultUncontrolledValue - Initial value for the internal state in the uncontrolled case.\n * @returns An array of the current value and an updater callback. Like `React.useState`, the updater\n * callback always has the same identity, and it can take either a new value, or a function which\n * is passed the previous value and returns the new value.\n * @see https://reactjs.org/docs/uncontrolled-components.html\n */\nexport function useControllableValue<TValue, TElement extends HTMLElement>(\n controlledValue: TValue | undefined,\n defaultUncontrolledValue: TValue | undefined,\n): Readonly<[TValue | undefined, (update: React.SetStateAction<TValue | undefined>) => void]>;\nexport function useControllableValue<\n TValue,\n TElement extends HTMLElement,\n TEvent extends React.SyntheticEvent<TElement> | undefined,\n>(\n controlledValue: TValue | undefined,\n defaultUncontrolledValue: TValue | undefined,\n onChange: ChangeCallback<TElement, TValue, TEvent> | undefined,\n): Readonly<\n [TValue | undefined, (update: React.SetStateAction<TValue | undefined>, ev?: React.FormEvent<TElement>) => void]\n>;\nexport function useControllableValue<\n TValue,\n TElement extends HTMLElement,\n TEvent extends React.SyntheticEvent<TElement> | undefined,\n>(\n controlledValue: TValue | undefined,\n defaultUncontrolledValue: TValue | undefined,\n onChange?: ChangeCallback<TElement, TValue, TEvent>,\n) {\n const [value, setValue] = React.useState<TValue | undefined>(defaultUncontrolledValue);\n const isControlled = useConst<boolean>(controlledValue !== undefined);\n const currentValue = isControlled ? controlledValue : value;\n\n // Duplicate the current value and onChange in refs so they're accessible from\n // setValueOrCallOnChange without creating a new callback every time\n const valueRef = React.useRef(currentValue);\n const onChangeRef = React.useRef(onChange);\n React.useEffect(() => {\n valueRef.current = currentValue;\n onChangeRef.current = onChange;\n });\n\n // To match the behavior of the setter returned by React.useState, this callback's identity\n // should never change. This means it MUST NOT directly reference variables that can change.\n const setValueOrCallOnChange = useConst(() => (update: React.SetStateAction<TValue | undefined>, ev?: TEvent) => {\n // Assuming here that TValue is not a function, because a controllable value will typically\n // be something a user can enter as input\n const newValue = typeof update === 'function' ? (update as Function)(valueRef.current) : update;\n\n if (onChangeRef.current) {\n onChangeRef.current(ev!, newValue);\n }\n\n if (!isControlled) {\n setValue(newValue);\n }\n });\n\n return [currentValue, setValueOrCallOnChange] as const;\n}\n","import { concatStyleSets, HighContrastSelector } from '../../../Styling';\nimport { memoizeFunction } from '../../../Utilities';\nimport { getStyles as getBaseButtonStyles } from '../BaseButton.styles';\nimport type { IButtonStyles } from '../Button.types';\nimport type { ITheme } from '../../../Styling';\n\nconst DEFAULT_BUTTON_HEIGHT = '40px';\nconst DEFAULT_PADDING = '0 4px';\n\nexport const getStyles = memoizeFunction((theme: ITheme, customStyles?: IButtonStyles): IButtonStyles => {\n const baseButtonStyles: IButtonStyles = getBaseButtonStyles(theme);\n const actionButtonStyles: IButtonStyles = {\n root: {\n padding: DEFAULT_PADDING,\n height: DEFAULT_BUTTON_HEIGHT,\n color: theme.palette.neutralPrimary,\n backgroundColor: 'transparent',\n border: '1px solid transparent',\n selectors: {\n [HighContrastSelector]: {\n borderColor: 'Window',\n },\n },\n },\n\n rootHovered: {\n color: theme.palette.themePrimary,\n selectors: {\n [HighContrastSelector]: {\n color: 'Highlight',\n },\n },\n },\n\n iconHovered: {\n color: theme.palette.themePrimary,\n },\n\n rootPressed: {\n color: theme.palette.black,\n },\n\n rootExpanded: {\n color: theme.palette.themePrimary,\n },\n\n iconPressed: {\n color: theme.palette.themeDarker,\n },\n\n rootDisabled: {\n color: theme.palette.neutralTertiary,\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n selectors: {\n [HighContrastSelector]: {\n color: 'GrayText',\n },\n },\n },\n\n rootChecked: {\n color: theme.palette.black,\n },\n\n iconChecked: {\n color: theme.palette.themeDarker,\n },\n\n flexContainer: {\n justifyContent: 'flex-start',\n },\n\n icon: {\n color: theme.palette.themeDarkAlt,\n },\n\n iconDisabled: {\n color: 'inherit',\n },\n\n menuIcon: {\n color: theme.palette.neutralSecondary,\n },\n\n textContainer: {\n flexGrow: 0,\n },\n };\n\n return concatStyleSets(baseButtonStyles, actionButtonStyles, customStyles)!;\n});\n","import { ActionButton } from '../ActionButton/ActionButton';\n\n/**\n * {@docCategory Button}\n */\nexport const CommandButton = ActionButton;\n","import * as React from 'react';\nimport { BaseButton } from '../BaseButton';\nimport { customizable, nullRender } from '../../../Utilities';\nimport { getStyles } from './ActionButton.styles';\nimport type { IButtonProps } from '../Button.types';\n\n/**\n * {@docCategory Button}\n */\n@customizable('ActionButton', ['theme', 'styles'], true)\nexport class ActionButton extends React.Component<IButtonProps, {}> {\n public render(): JSX.Element {\n const { styles, theme } = this.props;\n\n return (\n <BaseButton\n {...this.props}\n variantClassName=\"ms-Button--action ms-Button--command\"\n styles={getStyles(theme!, styles)}\n onRenderDescription={nullRender}\n />\n );\n }\n}\n","export interface ISelectableOption<T = any> {\n /**\n * Arbitrary string associated with this option.\n */\n key: string | number;\n\n /**\n * ID attribute associated with this option\n */\n id?: string;\n\n /**\n * Text to render for this option\n */\n text: string;\n\n /**\n * Title attribute (built in tooltip) for a given option.\n */\n title?: string;\n\n /**\n * Text to render for this option\n * Note: the SelectAll itemType is only supported on one option in multiselect components\n */\n itemType?: SelectableOptionMenuItemType;\n\n /**\n * Index for this option\n */\n index?: number;\n\n /**\n * The aria label for the dropdown option. If not present, the `text` will be used.\n */\n ariaLabel?: string;\n\n /** If option is selected. */\n selected?: boolean;\n\n /**\n * Whether the option is disabled\n * @defaultvalue false\n */\n disabled?: boolean;\n\n /**\n * Defines whether the option is hidden or not.\n * @defaultvalue false\n */\n hidden?: boolean;\n\n /**\n * Data available to custom onRender functions.\n */\n data?: T;\n}\n\nexport enum SelectableOptionMenuItemType {\n Normal = 0,\n Divider = 1,\n Header = 2,\n SelectAll = 3,\n}\n","import type { ISelectableOption } from '../../utilities/selectableOption/SelectableOption.types';\n\nexport function getAllSelectedOptions(options: ISelectableOption[], selectedIndices: number[]): ISelectableOption[] {\n const selectedOptions: ISelectableOption[] = [];\n for (const index of selectedIndices) {\n const option = options[index];\n\n if (option) {\n selectedOptions.push(option);\n }\n }\n\n return selectedOptions;\n}\n","import * as React from 'react';\nimport { useControllableValue, useId, useMergedRefs, useWarnings } from '@fluentui/react-hooks';\nimport { useFocusRects, classNamesFunction } from '@fluentui/utilities';\nimport { Icon } from '../Icon/Icon';\nimport type { ICheckboxProps, ICheckboxStyleProps, ICheckboxStyles } from './Checkbox.types';\n\nconst getClassNames = classNamesFunction<ICheckboxStyleProps, ICheckboxStyles>();\n\nexport const CheckboxBase: React.FunctionComponent<ICheckboxProps> = React.forwardRef<HTMLDivElement, ICheckboxProps>(\n (props, forwardedRef) => {\n const {\n disabled,\n required,\n inputProps,\n name,\n ariaLabel,\n ariaLabelledBy,\n ariaDescribedBy,\n ariaPositionInSet,\n ariaSetSize,\n title,\n checkmarkIconProps,\n styles,\n theme,\n className,\n boxSide = 'start',\n } = props;\n\n const id = useId('checkbox-', props.id);\n\n const rootRef = React.useRef<HTMLDivElement | null>(null);\n const mergedRootRefs: React.Ref<HTMLDivElement> = useMergedRefs(rootRef, forwardedRef);\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n const [isChecked, setIsChecked] = useControllableValue(props.checked, props.defaultChecked, props.onChange);\n const [isIndeterminate, setIsIndeterminate] = useControllableValue(props.indeterminate, props.defaultIndeterminate);\n\n useFocusRects(rootRef);\n useDebugWarning(props);\n\n const classNames = getClassNames(styles!, {\n theme: theme!,\n className,\n disabled,\n indeterminate: isIndeterminate,\n checked: isChecked,\n reversed: boxSide !== 'start',\n isUsingCustomLabelRender: !!props.onRenderLabel,\n });\n\n const onChange = React.useCallback(\n (event: React.ChangeEvent<HTMLElement>): void => {\n if (isIndeterminate) {\n // If indeterminate, clicking the checkbox *only* removes the indeterminate state (or if\n // controlled, lets the consumer know to change it by calling onChange). It doesn't\n // change the checked state.\n setIsChecked(!!isChecked, event);\n setIsIndeterminate(false);\n } else {\n setIsChecked(!isChecked, event);\n }\n },\n [setIsChecked, setIsIndeterminate, isIndeterminate, isChecked],\n );\n\n const defaultLabelRenderer = React.useCallback(\n (checkboxProps?: ICheckboxProps): JSX.Element | null => {\n if (!checkboxProps) {\n return null;\n }\n return checkboxProps.label ? (\n <span className={classNames.text} title={checkboxProps.title}>\n {checkboxProps.label}\n </span>\n ) : null;\n },\n [classNames.text],\n );\n\n const setNativeIndeterminate = React.useCallback(\n (indeterminate: boolean | undefined) => {\n if (!inputRef.current) {\n return;\n }\n\n const value = !!indeterminate;\n\n inputRef.current.indeterminate = value;\n setIsIndeterminate(value);\n },\n [setIsIndeterminate],\n );\n\n useComponentRef(props, isChecked, isIndeterminate, setNativeIndeterminate, inputRef);\n React.useEffect(() => setNativeIndeterminate(isIndeterminate), [setNativeIndeterminate, isIndeterminate]);\n\n const onRenderLabel = props.onRenderLabel || defaultLabelRenderer;\n\n const ariaChecked: React.InputHTMLAttributes<HTMLInputElement>['aria-checked'] = isIndeterminate\n ? 'mixed'\n : undefined;\n\n const mergedInputProps: React.InputHTMLAttributes<HTMLInputElement> = {\n className: classNames.input,\n type: 'checkbox' as React.InputHTMLAttributes<HTMLInputElement>['type'],\n ...inputProps,\n checked: !!isChecked,\n disabled,\n required,\n name,\n id,\n title,\n onChange,\n 'aria-disabled': disabled,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n 'aria-describedby': ariaDescribedBy,\n 'aria-posinset': ariaPositionInSet,\n 'aria-setsize': ariaSetSize,\n 'aria-checked': ariaChecked,\n };\n\n return (\n <div className={classNames.root} title={title} ref={mergedRootRefs}>\n <input {...mergedInputProps} ref={inputRef} title={title} data-ktp-execute-target={true} />\n <label className={classNames.label} htmlFor={id}>\n <div className={classNames.checkbox} data-ktp-target={true}>\n <Icon iconName=\"CheckMark\" {...checkmarkIconProps} className={classNames.checkmark} />\n </div>\n {onRenderLabel(props, defaultLabelRenderer)}\n </label>\n </div>\n );\n },\n);\n\nCheckboxBase.displayName = 'CheckboxBase';\n\nfunction useDebugWarning(props: ICheckboxProps) {\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks -- build-time conditional\n useWarnings({\n name: 'Checkbox',\n props,\n mutuallyExclusive: {\n checked: 'defaultChecked',\n indeterminate: 'defaultIndeterminate',\n },\n });\n }\n}\n\nfunction useComponentRef(\n props: ICheckboxProps,\n isChecked: boolean | undefined,\n isIndeterminate: boolean | undefined,\n setIndeterminate: (indeterminate: boolean) => void,\n checkBoxRef: React.RefObject<HTMLInputElement>,\n) {\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n get checked() {\n return !!isChecked;\n },\n get indeterminate() {\n return !!isIndeterminate;\n },\n set indeterminate(indeterminate: boolean) {\n setIndeterminate(indeterminate);\n },\n focus() {\n if (checkBoxRef.current) {\n checkBoxRef.current.focus();\n }\n },\n }),\n [checkBoxRef, isChecked, isIndeterminate, setIndeterminate],\n );\n}\n","import { HighContrastSelector, getGlobalClassNames, getHighContrastNoAdjustStyle } from '@fluentui/style-utilities';\nimport { IsFocusVisibleClassName } from '@fluentui/utilities';\nimport type { ICheckboxStyleProps, ICheckboxStyles } from './Checkbox.types';\nimport type { IStyle } from '@fluentui/style-utilities';\n\nconst GlobalClassNames = {\n root: 'ms-Checkbox',\n label: 'ms-Checkbox-label',\n checkbox: 'ms-Checkbox-checkbox',\n checkmark: 'ms-Checkbox-checkmark',\n text: 'ms-Checkbox-text',\n};\n\nconst MS_CHECKBOX_LABEL_SIZE = '20px';\nconst MS_CHECKBOX_TRANSITION_DURATION = '200ms';\nconst MS_CHECKBOX_TRANSITION_TIMING = 'cubic-bezier(.4, 0, .23, 1)';\n\nexport const getStyles = (props: ICheckboxStyleProps): ICheckboxStyles => {\n const { className, theme, reversed, checked, disabled, isUsingCustomLabelRender, indeterminate } = props;\n const { semanticColors, effects, palette, fonts } = theme;\n\n const classNames = getGlobalClassNames(GlobalClassNames, theme);\n\n const checkmarkFontColor = semanticColors.inputForegroundChecked;\n // TODO: after updating the semanticColors slots mapping this needs to be semanticColors.inputBorder\n const checkmarkFontColorHovered = palette.neutralSecondary;\n // TODO: after updating the semanticColors slots mapping this needs to be semanticColors.smallInputBorder\n const checkboxBorderColor = palette.neutralPrimary;\n const checkboxBorderIndeterminateColor = semanticColors.inputBackgroundChecked;\n const checkboxBorderColorChecked = semanticColors.inputBackgroundChecked;\n const checkboxBorderColorDisabled = semanticColors.disabledBodySubtext;\n const checkboxBorderHoveredColor = semanticColors.inputBorderHovered;\n const checkboxBorderIndeterminateHoveredColor = semanticColors.inputBackgroundCheckedHovered;\n const checkboxBackgroundChecked = semanticColors.inputBackgroundChecked;\n // TODO: after updating the semanticColors slots mapping the following 2 tokens need to be\n // semanticColors.inputBackgroundCheckedHovered\n const checkboxBackgroundCheckedHovered = semanticColors.inputBackgroundCheckedHovered;\n const checkboxBorderColorCheckedHovered = semanticColors.inputBackgroundCheckedHovered;\n const checkboxHoveredTextColor = semanticColors.inputTextHovered;\n const checkboxBackgroundDisabledChecked = semanticColors.disabledBodySubtext;\n const checkboxTextColor = semanticColors.bodyText;\n const checkboxTextColorDisabled = semanticColors.disabledText;\n\n const indeterminateDotStyles: IStyle = [\n {\n content: '\"\"',\n borderRadius: effects.roundedCorner2,\n position: 'absolute',\n width: 10,\n height: 10,\n top: 4,\n left: 4,\n boxSizing: 'border-box',\n borderWidth: 5,\n borderStyle: 'solid',\n borderColor: disabled ? checkboxBorderColorDisabled : checkboxBorderIndeterminateColor,\n transitionProperty: 'border-width, border, border-color',\n transitionDuration: MS_CHECKBOX_TRANSITION_DURATION,\n transitionTimingFunction: MS_CHECKBOX_TRANSITION_TIMING,\n [HighContrastSelector]: {\n borderColor: 'WindowText',\n },\n },\n ];\n\n return {\n root: [\n classNames.root,\n {\n position: 'relative',\n display: 'flex',\n },\n reversed && 'reversed',\n checked && 'is-checked',\n !disabled && 'is-enabled',\n disabled && 'is-disabled',\n !disabled && [\n !checked && {\n [`:hover .${classNames.checkbox}`]: {\n borderColor: checkboxBorderHoveredColor,\n [HighContrastSelector]: {\n borderColor: 'Highlight',\n },\n },\n [`:focus .${classNames.checkbox}`]: { borderColor: checkboxBorderHoveredColor },\n [`:hover .${classNames.checkmark}`]: {\n color: checkmarkFontColorHovered,\n opacity: '1',\n [HighContrastSelector]: {\n color: 'Highlight',\n },\n },\n },\n checked &&\n !indeterminate && {\n [`:hover .${classNames.checkbox}`]: {\n background: checkboxBackgroundCheckedHovered,\n borderColor: checkboxBorderColorCheckedHovered,\n },\n [`:focus .${classNames.checkbox}`]: {\n background: checkboxBackgroundCheckedHovered,\n borderColor: checkboxBorderColorCheckedHovered,\n },\n [HighContrastSelector]: {\n [`:hover .${classNames.checkbox}`]: {\n background: 'Highlight',\n borderColor: 'Highlight',\n },\n [`:focus .${classNames.checkbox}`]: {\n background: 'Highlight',\n },\n [`:focus:hover .${classNames.checkbox}`]: {\n background: 'Highlight',\n },\n [`:focus:hover .${classNames.checkmark}`]: {\n color: 'Window',\n },\n [`:hover .${classNames.checkmark}`]: {\n color: 'Window',\n },\n },\n },\n indeterminate && {\n [`:hover .${classNames.checkbox}, :hover .${classNames.checkbox}:after`]: {\n borderColor: checkboxBorderIndeterminateHoveredColor,\n [HighContrastSelector]: {\n borderColor: 'WindowText',\n },\n },\n [`:focus .${classNames.checkbox}`]: {\n borderColor: checkboxBorderIndeterminateHoveredColor,\n },\n [`:hover .${classNames.checkmark}`]: {\n opacity: '0',\n },\n },\n {\n [`:hover .${classNames.text}, :focus .${classNames.text}`]: {\n color: checkboxHoveredTextColor,\n [HighContrastSelector]: {\n color: disabled ? 'GrayText' : 'WindowText',\n },\n },\n },\n ],\n className,\n ],\n input: {\n position: 'absolute',\n background: 'none',\n\n opacity: 0,\n [`.${IsFocusVisibleClassName} &:focus + label::before`]: {\n outline: '1px solid ' + theme.palette.neutralSecondary,\n outlineOffset: '2px',\n [HighContrastSelector]: {\n outline: '1px solid WindowText',\n },\n },\n },\n label: [\n classNames.label,\n theme.fonts.medium,\n {\n display: 'flex',\n alignItems: isUsingCustomLabelRender ? 'center' : 'flex-start',\n cursor: disabled ? 'default' : 'pointer',\n position: 'relative',\n userSelect: 'none',\n },\n reversed && {\n flexDirection: 'row-reverse',\n justifyContent: 'flex-end',\n },\n {\n '&::before': {\n position: 'absolute',\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n content: '\"\"',\n pointerEvents: 'none',\n },\n },\n ],\n checkbox: [\n classNames.checkbox,\n {\n position: 'relative',\n display: 'flex',\n flexShrink: 0,\n alignItems: 'center',\n justifyContent: 'center',\n height: MS_CHECKBOX_LABEL_SIZE,\n width: MS_CHECKBOX_LABEL_SIZE,\n border: `1px solid ${checkboxBorderColor}`,\n borderRadius: effects.roundedCorner2,\n boxSizing: 'border-box',\n transitionProperty: 'background, border, border-color',\n transitionDuration: MS_CHECKBOX_TRANSITION_DURATION,\n transitionTimingFunction: MS_CHECKBOX_TRANSITION_TIMING,\n\n /* in case the icon is bigger than the box */\n overflow: 'hidden',\n ':after': indeterminate ? indeterminateDotStyles : null,\n [HighContrastSelector]: {\n borderColor: 'WindowText',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n indeterminate && {\n borderColor: checkboxBorderIndeterminateColor,\n },\n !reversed\n ? // This margin on the checkbox is for backwards compat. Notably it has the effect where a customRender\n // is used, there will be only a 4px margin from checkbox to label. The label by default would have\n // another 4px margin for a total of 8px margin between checkbox and label. We don't combine the two\n // (and move it into the text) to not incur a breaking change for everyone using custom render atm.\n {\n marginRight: 4,\n }\n : {\n marginLeft: 4,\n },\n !disabled &&\n !indeterminate &&\n checked && {\n background: checkboxBackgroundChecked,\n borderColor: checkboxBorderColorChecked,\n [HighContrastSelector]: {\n background: 'Highlight',\n borderColor: 'Highlight',\n },\n },\n disabled && {\n borderColor: checkboxBorderColorDisabled,\n [HighContrastSelector]: {\n borderColor: 'GrayText',\n },\n },\n checked &&\n disabled && {\n background: checkboxBackgroundDisabledChecked,\n borderColor: checkboxBorderColorDisabled,\n [HighContrastSelector]: {\n background: 'Window',\n },\n },\n ],\n checkmark: [\n classNames.checkmark,\n {\n opacity: checked && !indeterminate ? '1' : '0',\n color: checkmarkFontColor,\n [HighContrastSelector]: {\n color: disabled ? 'GrayText' : 'Window',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n ],\n text: [\n classNames.text,\n {\n color: disabled ? checkboxTextColorDisabled : checkboxTextColor,\n fontSize: fonts.medium.fontSize,\n lineHeight: '20px',\n [HighContrastSelector]: {\n color: disabled ? 'GrayText' : 'WindowText',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n !reversed\n ? {\n marginLeft: 4,\n }\n : {\n marginRight: 4,\n },\n ],\n };\n};\n","import * as React from 'react';\nimport { styled } from '@fluentui/utilities';\nimport { CheckboxBase } from './Checkbox.base';\nimport { getStyles } from './Checkbox.styles';\nimport type { ICheckboxProps, ICheckboxStyleProps, ICheckboxStyles } from './Checkbox.types';\n\nexport const Checkbox: React.FunctionComponent<ICheckboxProps> = styled<\n ICheckboxProps,\n ICheckboxStyleProps,\n ICheckboxStyles\n>(CheckboxBase, getStyles, undefined, { scope: 'Checkbox' });\n","import { DropdownMenuItemType } from '../Dropdown.types';\nimport type { IDropdownOption } from '../Dropdown.types';\n\n/**\n * A utility class to cache size and position in cache.\n *\n * Dropdown options has non-selectable display types. It is therefore not cheap to determine\n * the total number of actual selectable options as well as the position an option is in the\n * list of options - O(n) cost for each lookup.\n *\n * Given that we potentially have to make this determination on every single render pass, this\n * cache should provide a little bit of relief.\n */\nexport class DropdownSizePosCache {\n private _cachedOptions: IDropdownOption[];\n private _displayOnlyOptionsCache: number[];\n private _notSelectableOptionsCache: number[];\n private _size = 0;\n\n /**\n * Invalidates the cache and recalculate the size of selectable options.\n */\n public updateOptions(options: IDropdownOption[]) {\n const displayOnlyOptionsCache = [];\n const notSelectableOptionsCache = [];\n let size = 0;\n for (let i = 0; i < options.length; i++) {\n const { itemType, hidden } = options[i];\n\n if (itemType === DropdownMenuItemType.Divider || itemType === DropdownMenuItemType.Header) {\n displayOnlyOptionsCache.push(i);\n notSelectableOptionsCache.push(i);\n } else if (hidden) {\n notSelectableOptionsCache.push(i);\n } else {\n size++;\n }\n }\n\n this._size = size;\n this._displayOnlyOptionsCache = displayOnlyOptionsCache;\n this._notSelectableOptionsCache = notSelectableOptionsCache;\n this._cachedOptions = [...options];\n }\n\n /**\n * The size of all the selectable options.\n */\n public get optionSetSize(): number {\n return this._size;\n }\n\n /**\n * The chached options array.\n */\n public get cachedOptions(): IDropdownOption[] {\n return this._cachedOptions;\n }\n\n /**\n * Returns the position of this option element relative to the full set of selectable option elements.\n * Note: the first selectable element is position 1 in the set.\n * @param index The raw index of the option element.\n */\n public positionInSet(index: number | undefined): number | undefined {\n if (index === undefined) {\n return undefined;\n }\n\n // we could possibly memoize this too but this should be good enough, most of the time (the expectation is that\n // when you have a lot of options, the selectable options will heavily dominate over the non-selectable options.\n let offset = 0;\n while (index > this._notSelectableOptionsCache[offset]) {\n offset++;\n }\n\n if (this._displayOnlyOptionsCache[offset] === index) {\n throw new Error(`Unexpected: Option at index ${index} is not a selectable element.`);\n }\n\n if (this._notSelectableOptionsCache[offset] === index) {\n return undefined;\n }\n\n return index - offset + 1;\n }\n}\n","import * as React from 'react';\nimport {\n css,\n KeyCodes,\n classNamesFunction,\n divProperties,\n findIndex,\n getDocument,\n getFirstFocusable,\n getId,\n getLastFocusable,\n getNativeProps,\n initializeComponentRef,\n isIOS,\n isMac,\n mergeAriaAttributeValues,\n safeRequestAnimationFrame,\n warn,\n warnDeprecations,\n warnMutuallyExclusive,\n} from '../../Utilities';\nimport { Callout, DirectionalHint } from '../../Callout';\nimport { CommandButton } from '../../Button';\nimport { DropdownMenuItemType } from './Dropdown.types';\nimport { DropdownSizePosCache } from './utilities/DropdownSizePosCache';\nimport { FocusZone, FocusZoneDirection } from '../../FocusZone';\nimport { RectangleEdge } from '../../Positioning';\nimport { Icon } from '../../Icon';\nimport { Label } from '../../Label';\nimport { Panel } from '../../Panel';\nimport { ResponsiveMode, useResponsiveMode } from '../../ResponsiveMode';\nimport { SelectableOptionMenuItemType, getAllSelectedOptions } from '../../SelectableOption';\n// import and use V7 Checkbox to ensure no breaking changes.\nimport { Checkbox } from '../../Checkbox';\nimport { getNextElement, getPreviousElement, getPropsWithDefaults } from '@fluentui/utilities';\nimport { useMergedRefs, usePrevious } from '@fluentui/react-hooks';\nimport type { IStyleFunctionOrObject } from '../../Utilities';\nimport type {\n IDropdownOption,\n IDropdownProps,\n IDropdownStyleProps,\n IDropdownStyles,\n IDropdown,\n} from './Dropdown.types';\nimport type { ICalloutPositionedInfo } from '../../Positioning';\nimport type { ILabelStyleProps, ILabelStyles } from '../../Label';\nimport type { IProcessedStyleSet } from '../../Styling';\nimport type { IPanelStyleProps, IPanelStyles } from '../../Panel';\nimport type { IWithResponsiveModeState } from '../../ResponsiveMode';\nimport type { ISelectableDroppableTextProps } from '../../SelectableOption';\nimport type { ICheckboxStyleProps, ICheckboxStyles } from '../../Checkbox';\nimport { IFocusTrapZoneProps } from '../FocusTrapZone/FocusTrapZone.types';\n\nconst COMPONENT_NAME = 'Dropdown';\nconst getClassNames = classNamesFunction<IDropdownStyleProps, IDropdownStyles>();\n\n/** Internal only props interface to support mixing in responsive mode */\n// eslint-disable-next-line deprecation/deprecation\ninterface IDropdownInternalProps extends Omit<IDropdownProps, 'ref'>, IWithResponsiveModeState {\n hoisted: {\n rootRef: React.RefObject<HTMLDivElement>;\n selectedIndices: number[];\n setSelectedIndices: React.Dispatch<React.SetStateAction<number[]>>;\n };\n}\n\ninterface IDropdownState {\n isOpen: boolean;\n /** Used to track whether focus is already within the Dropdown, for openOnFocus handling. */\n hasFocus: boolean;\n calloutRenderEdge?: RectangleEdge;\n}\n\nconst DEFAULT_PROPS: Partial<IDropdownProps> = {\n options: [],\n};\n\nfunction useSelectedItemsState({\n defaultSelectedKeys,\n selectedKeys,\n defaultSelectedKey,\n selectedKey,\n options,\n multiSelect,\n}: IDropdownProps) {\n const oldOptions = usePrevious(options);\n const [selectedIndices, setSelectedIndices] = React.useState<number[]>([]);\n\n // In controlled component usage where selectedKey is provided, update the selectedIndex\n // state if the key or options change.\n let selectedKeyPropToUse: string | number | string[] | number[] | null | undefined;\n\n // this does a shallow compare (assumes options are pure), for the purposes of determining whether\n // defaultSelectedKey/defaultSelectedKeys are respected.\n const didOptionsChange = options !== oldOptions;\n\n if (multiSelect) {\n if (didOptionsChange && defaultSelectedKeys !== undefined) {\n selectedKeyPropToUse = defaultSelectedKeys;\n } else {\n selectedKeyPropToUse = selectedKeys;\n }\n } else {\n if (didOptionsChange && defaultSelectedKey !== undefined) {\n selectedKeyPropToUse = defaultSelectedKey;\n } else {\n selectedKeyPropToUse = selectedKey;\n }\n }\n\n const oldSelectedKeyProp = usePrevious(selectedKeyPropToUse);\n\n React.useEffect(() => {\n /** Get all selected indexes for multi-select mode */\n const getSelectedIndexes = (): number[] => {\n if (selectedKeyPropToUse === undefined) {\n if (multiSelect) {\n return getAllSelectedIndices();\n }\n const selectedIndex = getSelectedIndex(null);\n return selectedIndex !== -1 ? [selectedIndex] : [];\n } else if (!Array.isArray(selectedKeyPropToUse)) {\n const selectedIndex = getSelectedIndex(selectedKeyPropToUse);\n return selectedIndex !== -1 ? [selectedIndex] : [];\n }\n\n const returnValue: number[] = [];\n for (const key of selectedKeyPropToUse) {\n const selectedIndex = getSelectedIndex(key);\n selectedIndex !== -1 && returnValue.push(selectedIndex);\n }\n return returnValue;\n };\n\n const getAllSelectedIndices = (): number[] => {\n return options\n .map((option: IDropdownOption, index: number) => (option.selected ? index : -1))\n .filter(index => index !== -1);\n };\n\n const getSelectedIndex = (searchKey: string | number | null | undefined): number => {\n return findIndex(options, option => {\n // eslint-disable-next-line eqeqeq\n if (searchKey != null) {\n return option.key === searchKey;\n } else {\n // eslint-disable-next-line deprecation/deprecation\n return !!option.selected || !!option.isSelected;\n }\n });\n };\n\n if (\n (selectedKeyPropToUse !== undefined || !oldOptions) &&\n (selectedKeyPropToUse !== oldSelectedKeyProp || didOptionsChange)\n ) {\n setSelectedIndices(getSelectedIndexes());\n }\n }, [didOptionsChange, multiSelect, oldOptions, oldSelectedKeyProp, options, selectedKeyPropToUse]);\n\n return [selectedIndices, setSelectedIndices] as const;\n}\n\nexport const DropdownBase: React.FunctionComponent<IDropdownProps> = React.forwardRef<HTMLDivElement, IDropdownProps>(\n (propsWithoutDefaults, forwardedRef) => {\n const props = getPropsWithDefaults(DEFAULT_PROPS, propsWithoutDefaults);\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const mergedRootRef = useMergedRefs(forwardedRef, rootRef);\n\n const responsiveMode = useResponsiveMode(rootRef, props.responsiveMode);\n const [selectedIndices, setSelectedIndices] = useSelectedItemsState(props);\n\n return (\n <DropdownInternal\n {...(props as Omit<IDropdownProps, 'ref'>)}\n responsiveMode={responsiveMode}\n hoisted={{ rootRef: mergedRootRef, selectedIndices, setSelectedIndices }}\n />\n );\n },\n);\nDropdownBase.displayName = 'DropdownBase';\n\nclass DropdownInternal extends React.Component<IDropdownInternalProps, IDropdownState> implements IDropdown {\n public static defaultProps = {\n options: [] as IDropdownOption[],\n };\n\n private _host = React.createRef<HTMLDivElement>();\n private _focusZone = React.createRef<FocusZone>();\n private _dropDown = React.createRef<HTMLDivElement>();\n private _id: string;\n private _labelId: string;\n private _listId: string;\n private _optionId: string;\n private _isScrollIdle: boolean;\n /** Flag for tracking if the Callout has previously been positioned.\n * This is necessary to properly control focus state when the width\n * of the Dropdown is dynamic (e.g, \"fit-content\").\n */\n private _hasBeenPositioned: boolean;\n private readonly _scrollIdleDelay: number = 250 /* ms */;\n private _scrollIdleTimeoutId: number | undefined;\n /** True if the most recent keydown event was for alt (option) or meta (command). */\n private _lastKeyDownWasAltOrMeta: boolean | undefined;\n private _sizePosCache: DropdownSizePosCache = new DropdownSizePosCache();\n private _classNames: IProcessedStyleSet<IDropdownStyles>;\n private _requestAnimationFrame = safeRequestAnimationFrame(this);\n /** Flag for when we get the first mouseMove */\n private _gotMouseMove: boolean;\n /** Flag for tracking whether focus is triggered by click (alternatively triggered by keyboard nav) */\n private _isFocusedByClick: boolean;\n\n constructor(props: IDropdownInternalProps) {\n super(props);\n\n initializeComponentRef(this);\n\n const { multiSelect, selectedKey, selectedKeys, defaultSelectedKey, defaultSelectedKeys, options } = props;\n\n if (process.env.NODE_ENV !== 'production') {\n warnDeprecations(COMPONENT_NAME, props, {\n isDisabled: 'disabled',\n onChanged: 'onChange',\n placeHolder: 'placeholder',\n onRenderPlaceHolder: 'onRenderPlaceholder',\n });\n\n warnMutuallyExclusive(COMPONENT_NAME, props, {\n defaultSelectedKey: 'selectedKey',\n defaultSelectedKeys: 'selectedKeys',\n selectedKeys: 'selectedKey',\n });\n\n if (multiSelect) {\n const warnMultiSelect = (prop: keyof IDropdownProps) =>\n warn(`Dropdown property '${prop}' cannot be used when 'multiSelect' is true. Use '${prop}s' instead.`);\n if (selectedKey !== undefined) {\n warnMultiSelect('selectedKey');\n }\n if (defaultSelectedKey !== undefined) {\n warnMultiSelect('defaultSelectedKey');\n }\n } else {\n const warnNotMultiSelect = (prop: keyof IDropdownProps) =>\n warn(`Dropdown property '${prop}s' cannot be used when 'multiSelect' is false/unset. Use '${prop}' instead.`);\n if (selectedKeys !== undefined) {\n warnNotMultiSelect('selectedKey');\n }\n if (defaultSelectedKeys !== undefined) {\n warnNotMultiSelect('defaultSelectedKey');\n }\n }\n }\n\n this._id = props.id || getId('Dropdown');\n this._labelId = this._id + '-label';\n this._listId = this._id + '-list';\n this._optionId = this._id + '-option';\n this._isScrollIdle = true;\n this._hasBeenPositioned = false;\n\n this._sizePosCache.updateOptions(options);\n\n this.state = {\n isOpen: false,\n hasFocus: false,\n calloutRenderEdge: undefined,\n };\n }\n\n /**\n * All selected options\n */\n public get selectedOptions(): IDropdownOption[] {\n const {\n options,\n hoisted: { selectedIndices },\n } = this.props;\n\n return getAllSelectedOptions(options, selectedIndices);\n }\n\n public componentWillUnmount() {\n clearTimeout(this._scrollIdleTimeoutId);\n }\n\n public componentDidUpdate(prevProps: IDropdownProps, prevState: IDropdownState) {\n if (prevState.isOpen === true && this.state.isOpen === false) {\n this._gotMouseMove = false;\n this._hasBeenPositioned = false;\n\n if (this.props.onDismiss) {\n this.props.onDismiss();\n }\n }\n }\n\n public render(): JSX.Element {\n const id = this._id;\n\n const props = this.props;\n const {\n className,\n label,\n options,\n ariaLabel,\n required,\n errorMessage,\n styles: propStyles,\n theme,\n panelProps,\n calloutProps,\n onRenderTitle = this._getTitle,\n onRenderContainer = this._onRenderContainer,\n onRenderCaretDown = this._onRenderCaretDown,\n onRenderLabel = this._onRenderLabel,\n onRenderItem = this._onRenderItem,\n hoisted: { selectedIndices },\n } = props;\n const { isOpen, calloutRenderEdge, hasFocus } = this.state;\n // eslint-disable-next-line deprecation/deprecation\n const onRenderPlaceholder = props.onRenderPlaceholder || props.onRenderPlaceHolder || this._getPlaceholder;\n\n // If our cached options are out of date update our cache\n if (options !== this._sizePosCache.cachedOptions) {\n this._sizePosCache.updateOptions(options);\n }\n\n const selectedOptions = getAllSelectedOptions(options, selectedIndices);\n const divProps = getNativeProps(props, divProperties);\n\n const disabled = this._isDisabled();\n\n const errorMessageId = id + '-errorMessage';\n\n this._classNames = getClassNames(propStyles, {\n theme,\n className,\n hasError: !!(errorMessage && errorMessage.length > 0),\n hasLabel: !!label,\n isOpen,\n required,\n disabled,\n isRenderingPlaceholder: !selectedOptions.length,\n panelClassName: panelProps ? panelProps.className : undefined,\n calloutClassName: calloutProps ? calloutProps.className : undefined,\n calloutRenderEdge,\n });\n\n const hasErrorMessage: boolean = !!errorMessage && errorMessage.length > 0;\n\n return (\n <div\n className={this._classNames.root}\n ref={this.props.hoisted.rootRef}\n aria-owns={isOpen ? this._listId : undefined}\n >\n {onRenderLabel(this.props, this._onRenderLabel)}\n <div\n data-is-focusable={!disabled}\n data-ktp-target={true}\n ref={this._dropDown}\n id={id}\n tabIndex={disabled ? -1 : 0}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen ? 'true' : 'false'}\n aria-label={ariaLabel}\n aria-labelledby={label && !ariaLabel ? mergeAriaAttributeValues(this._labelId, this._optionId) : undefined}\n aria-describedby={hasErrorMessage ? this._id + '-errorMessage' : undefined}\n aria-required={required}\n aria-disabled={disabled}\n aria-controls={isOpen ? this._listId : undefined}\n {...divProps}\n className={this._classNames.dropdown}\n onBlur={this._onDropdownBlur}\n onKeyDown={this._onDropdownKeyDown}\n onKeyUp={this._onDropdownKeyUp}\n onClick={this._onDropdownClick}\n onMouseDown={this._onDropdownMouseDown}\n onFocus={this._onFocus}\n >\n <span\n id={this._optionId}\n className={this._classNames.title}\n aria-live={hasFocus ? 'polite' : undefined}\n aria-atomic={hasFocus ? true : undefined}\n aria-invalid={hasErrorMessage}\n >\n {\n // If option is selected render title, otherwise render the placeholder text\n selectedOptions.length\n ? onRenderTitle(selectedOptions, this._onRenderTitle)\n : onRenderPlaceholder(props, this._onRenderPlaceholder)\n }\n </span>\n <span className={this._classNames.caretDownWrapper}>{onRenderCaretDown(props, this._onRenderCaretDown)}</span>\n </div>\n {isOpen &&\n onRenderContainer(\n {\n ...props,\n onDismiss: this._onDismiss,\n onRenderItem,\n },\n this._onRenderContainer,\n )}\n {hasErrorMessage && (\n <div role=\"alert\" id={errorMessageId} className={this._classNames.errorMessage}>\n {errorMessage}\n </div>\n )}\n </div>\n );\n }\n\n /**\n * Close menu callout if it is open\n */\n public dismissMenu = (): void => {\n const { isOpen } = this.state;\n isOpen && this.setState({ isOpen: false });\n };\n\n public focus(shouldOpenOnFocus?: boolean): void {\n if (this._dropDown.current) {\n this._dropDown.current.focus();\n\n if (shouldOpenOnFocus) {\n this.setState({\n isOpen: true,\n });\n }\n }\n }\n\n public setSelectedIndex(event: React.FormEvent<HTMLDivElement>, index: number): void {\n const {\n options,\n selectedKey,\n selectedKeys,\n multiSelect,\n notifyOnReselect,\n hoisted: { selectedIndices = [] },\n } = this.props;\n const checked: boolean = selectedIndices ? selectedIndices.indexOf(index) > -1 : false;\n let newIndexes: number[] = [];\n\n index = Math.max(0, Math.min(options.length - 1, index));\n\n // If this is a controlled component then no state change should take place.\n if (selectedKey !== undefined || selectedKeys !== undefined) {\n this._onChange(event, options, index, checked, multiSelect);\n return;\n }\n\n if (!multiSelect && !notifyOnReselect && index === selectedIndices[0]) {\n return;\n } else if (multiSelect) {\n newIndexes = selectedIndices ? this._copyArray(selectedIndices) : [];\n if (checked) {\n const position = newIndexes.indexOf(index);\n if (position > -1) {\n // unchecked the current one\n newIndexes.splice(position, 1);\n }\n } else {\n // add the new selected index into the existing one\n newIndexes.push(index);\n }\n } else {\n // Set the selected option if this is an uncontrolled component\n newIndexes = [index];\n }\n\n event.persist();\n // Call onChange after state is updated\n this.props.hoisted.setSelectedIndices(newIndexes);\n this._onChange(event, options, index, checked, multiSelect);\n }\n\n private _onChange = (\n event: React.FormEvent<HTMLDivElement>,\n options: IDropdownOption[],\n index: number,\n checked?: boolean,\n multiSelect?: boolean,\n ) => {\n // eslint-disable-next-line deprecation/deprecation\n const { onChange, onChanged } = this.props;\n if (onChange || onChanged) {\n // for single-select, option passed in will always be selected.\n // for multi-select, flip the checked value\n const changedOpt = multiSelect ? { ...options[index], selected: !checked } : options[index];\n\n onChange && onChange({ ...event, target: this._dropDown.current as EventTarget }, changedOpt, index);\n onChanged && onChanged(changedOpt, index);\n }\n };\n\n /** Get either props.placeholder (new name) or props.placeHolder (old name) */\n private _getPlaceholder = (): string | undefined => {\n // eslint-disable-next-line deprecation/deprecation\n return this.props.placeholder || this.props.placeHolder;\n };\n\n private _copyArray(array: any[]): any[] {\n const newArray = [];\n for (const element of array) {\n newArray.push(element);\n }\n return newArray;\n }\n\n /**\n * Finds the next valid Dropdown option and sets the selected index to it.\n * @param stepValue - Value of how many items the function should traverse. Should be -1 or 1.\n * @param index - Index of where the search should start\n * @param selectedIndex - The selectedIndex Dropdown's state\n * @returns The next valid dropdown option's index\n */\n private _moveIndex(\n event: React.FormEvent<HTMLDivElement>,\n stepValue: number,\n index: number,\n selectedIndex: number,\n ): number {\n const { options } = this.props;\n // Return selectedIndex if nothing has changed or options is empty\n if (selectedIndex === index || options.length === 0) {\n return selectedIndex;\n }\n\n // If the user is pressing the up or down key we want to make\n // sure that the dropdown cycles through the options without\n // causing the screen to scroll. In _onDropdownKeyDown\n // at the very end is a check to see if newIndex !== selectedIndex.\n // If the index is less than 0 and we set it back to 0, then\n // newIndex will equal selectedIndex and not stop the action\n // of the key press happening and vice versa for indexes greater\n // than or equal to the options length.\n if (index >= options.length) {\n index = 0;\n } else if (index < 0) {\n index = options.length - 1;\n }\n\n let stepCounter = 0;\n // If current index is a header or divider, or disabled, increment by step\n while (\n options[index].itemType === DropdownMenuItemType.Header ||\n options[index].itemType === DropdownMenuItemType.Divider ||\n options[index].disabled\n ) {\n // If stepCounter exceeds length of options, then return selectedIndex (-1)\n if (stepCounter >= options.length) {\n return selectedIndex;\n }\n // If index + stepValue is out of bounds, wrap around\n if (index + stepValue < 0) {\n index = options.length;\n } else if (index + stepValue >= options.length) {\n index = -1;\n }\n\n index = index + stepValue;\n stepCounter++;\n }\n\n this.setSelectedIndex(event, index);\n return index;\n }\n\n /** Get text in dropdown input as a string */\n private _getTitle = (items: IDropdownOption[], _unused?: unknown): string => {\n const { multiSelectDelimiter = ', ' } = this.props;\n return items.map(i => i.text).join(multiSelectDelimiter);\n };\n\n /** Render text in dropdown input */\n private _onRenderTitle = (items: IDropdownOption[]): JSX.Element => {\n return <>{this._getTitle(items)}</>;\n };\n\n /** Render placeholder text in dropdown input */\n private _onRenderPlaceholder = (props: IDropdownProps): JSX.Element | null => {\n if (!this._getPlaceholder()) {\n return null;\n }\n return <>{this._getPlaceholder()}</>;\n };\n\n /** Render Callout or Panel container and pass in list */\n private _onRenderContainer = (props: ISelectableDroppableTextProps<IDropdown, HTMLDivElement>): JSX.Element => {\n const { calloutProps, panelProps } = props;\n const { responsiveMode, dropdownWidth } = this.props;\n\n const isSmall = responsiveMode! <= ResponsiveMode.medium;\n\n const focusTrapZoneProps: IFocusTrapZoneProps = { firstFocusableTarget: `#${this._listId}1` };\n const panelStyles = this._classNames.subComponentStyles\n ? (this._classNames.subComponentStyles.panel as IStyleFunctionOrObject<IPanelStyleProps, IPanelStyles>)\n : undefined;\n\n let calloutWidth = undefined;\n let calloutMinWidth = undefined;\n if (dropdownWidth === 'auto') {\n calloutMinWidth = this._dropDown.current ? this._dropDown.current.clientWidth : 0;\n } else {\n calloutWidth = dropdownWidth || (this._dropDown.current ? this._dropDown.current.clientWidth : 0);\n }\n\n return isSmall ? (\n <Panel\n closeButtonAriaLabel=\"Close\"\n focusTrapZoneProps={focusTrapZoneProps}\n hasCloseButton\n isOpen={true}\n isLightDismiss={true}\n onDismiss={this._onDismiss}\n styles={panelStyles}\n {...panelProps}\n >\n {this._renderFocusableList(props)}\n </Panel>\n ) : (\n <Callout\n isBeakVisible={false}\n gapSpace={0}\n doNotLayer={false}\n directionalHintFixed={false}\n directionalHint={DirectionalHint.bottomLeftEdge}\n calloutWidth={calloutWidth}\n calloutMinWidth={calloutMinWidth}\n {...calloutProps}\n className={this._classNames.callout}\n target={this._dropDown.current}\n onDismiss={this._onDismiss}\n onScroll={this._onScroll}\n onPositioned={this._onPositioned}\n >\n {this._renderFocusableList(props)}\n </Callout>\n );\n };\n\n /** Render Caret Down Icon */\n private _onRenderCaretDown = (props: IDropdownProps): JSX.Element => {\n return <Icon className={this._classNames.caretDown} iconName=\"ChevronDown\" aria-hidden={true} />;\n };\n\n /** Wrap item list in a FocusZone */\n private _renderFocusableList(props: ISelectableDroppableTextProps<IDropdown, HTMLDivElement>): JSX.Element {\n const { onRenderList = this._onRenderList, label, ariaLabel, multiSelect } = props;\n\n return (\n <div\n className={this._classNames.dropdownItemsWrapper}\n onKeyDown={this._onZoneKeyDown}\n onKeyUp={this._onZoneKeyUp}\n ref={this._host}\n tabIndex={0}\n >\n <FocusZone\n ref={this._focusZone}\n direction={FocusZoneDirection.vertical}\n id={this._listId}\n className={this._classNames.dropdownItems}\n role=\"listbox\"\n aria-label={ariaLabel}\n aria-labelledby={label && !ariaLabel ? this._labelId : undefined}\n aria-multiselectable={multiSelect}\n >\n {onRenderList(props, this._onRenderList)}\n </FocusZone>\n </div>\n );\n }\n\n /** Render List of items */\n private _onRenderList = (props: ISelectableDroppableTextProps<IDropdown, HTMLDivElement>): JSX.Element => {\n const { onRenderItem = this._onRenderItem } = props;\n\n let queue: { id?: string; items: JSX.Element[] } = { items: [] };\n let renderedList: JSX.Element[] = [];\n\n const emptyQueue = (): void => {\n const newGroup = queue.id\n ? [\n <div role=\"group\" key={queue.id} aria-labelledby={queue.id}>\n {queue.items}\n </div>,\n ]\n : queue.items;\n\n renderedList = [...renderedList, ...newGroup];\n // Flush items and id\n queue = { items: [] };\n };\n\n const placeRenderedOptionIntoQueue = (item: IDropdownOption, index: number) => {\n /*\n Case Header\n empty queue if it's not already empty\n ensure unique ID for header and set queue ID\n push header into queue\n Case Divider\n push divider into queue if not first item\n empty queue if not already empty\n Default\n push item into queue\n */\n switch (item.itemType) {\n case SelectableOptionMenuItemType.Header:\n queue.items.length > 0 && emptyQueue();\n\n const id = this._id + item.key;\n queue.items.push(onRenderItem({ id, ...item, index }, this._onRenderItem)!);\n queue.id = id;\n break;\n case SelectableOptionMenuItemType.Divider:\n index > 0 && queue.items.push(onRenderItem({ ...item, index }, this._onRenderItem)!);\n\n queue.items.length > 0 && emptyQueue();\n break;\n default:\n queue.items.push(onRenderItem({ ...item, index }, this._onRenderItem)!);\n }\n };\n\n // Place options into the queue. Queue will be emptied anytime a Header or Divider is encountered\n props.options.forEach((item: IDropdownOption, index: number) => {\n placeRenderedOptionIntoQueue(item, index);\n });\n\n // Push remaining items into all renderedList\n queue.items.length > 0 && emptyQueue();\n\n return <>{renderedList}</>;\n };\n\n private _onRenderItem = (item: IDropdownOption): JSX.Element | null => {\n switch (item.itemType) {\n case SelectableOptionMenuItemType.Divider:\n return this._renderSeparator(item);\n case SelectableOptionMenuItemType.Header:\n return this._renderHeader(item);\n default:\n return this._renderOption(item);\n }\n };\n\n private _renderSeparator(item: IDropdownOption): JSX.Element | null {\n const { index, key } = item;\n const separatorClassName = item.hidden ? this._classNames.dropdownDividerHidden : this._classNames.dropdownDivider;\n if (index! > 0) {\n return <div role=\"separator\" key={key} className={separatorClassName} />;\n }\n return null;\n }\n\n private _renderHeader(item: IDropdownOption): JSX.Element {\n const { onRenderOption = this._onRenderOption } = this.props;\n const { key, id } = item;\n const headerClassName = item.hidden\n ? this._classNames.dropdownItemHeaderHidden\n : this._classNames.dropdownItemHeader;\n\n return (\n <div id={id} key={key} className={headerClassName}>\n {onRenderOption(item, this._onRenderOption)}\n </div>\n );\n }\n\n private _renderOption = (item: IDropdownOption): JSX.Element => {\n const {\n onRenderOption = this._onRenderOption,\n hoisted: { selectedIndices = [] },\n } = this.props;\n const isItemSelected =\n item.index !== undefined && selectedIndices ? selectedIndices.indexOf(item.index) > -1 : false;\n\n // select the right className based on the combination of selected/disabled\n const itemClassName = item.hidden // predicate: item hidden\n ? this._classNames.dropdownItemHidden\n : isItemSelected && item.disabled === true // predicate: both selected and disabled\n ? this._classNames.dropdownItemSelectedAndDisabled\n : isItemSelected // predicate: selected only\n ? this._classNames.dropdownItemSelected\n : item.disabled === true // predicate: disabled only\n ? this._classNames.dropdownItemDisabled\n : this._classNames.dropdownItem;\n\n const { title } = item;\n\n // define the id and label id (for multiselect checkboxes)\n const id = this._listId + item.index;\n const labelId = item.id ?? id + '-label';\n\n const multiSelectItemStyles = this._classNames.subComponentStyles\n ? (this._classNames.subComponentStyles.multiSelectItem as IStyleFunctionOrObject<\n ICheckboxStyleProps,\n ICheckboxStyles\n >)\n : undefined;\n\n return !this.props.multiSelect ? (\n <CommandButton\n id={id}\n key={item.key}\n data-index={item.index}\n data-is-focusable={!item.disabled}\n disabled={item.disabled}\n className={itemClassName}\n onClick={this._onItemClick(item)}\n // eslint-disable-next-line react/jsx-no-bind\n onMouseEnter={this._onItemMouseEnter.bind(this, item)}\n // eslint-disable-next-line react/jsx-no-bind\n onMouseLeave={this._onMouseItemLeave.bind(this, item)}\n // eslint-disable-next-line react/jsx-no-bind\n onMouseMove={this._onItemMouseMove.bind(this, item)}\n role=\"option\"\n aria-selected={isItemSelected ? 'true' : 'false'}\n ariaLabel={item.ariaLabel}\n title={title}\n aria-posinset={this._sizePosCache.positionInSet(item.index)}\n aria-setsize={this._sizePosCache.optionSetSize}\n >\n {onRenderOption(item, this._onRenderOption)}\n </CommandButton>\n ) : (\n <Checkbox\n id={id}\n key={item.key}\n disabled={item.disabled}\n onChange={this._onItemClick(item)}\n inputProps={{\n 'aria-selected': isItemSelected,\n onMouseEnter: this._onItemMouseEnter.bind(this, item),\n onMouseLeave: this._onMouseItemLeave.bind(this, item),\n onMouseMove: this._onItemMouseMove.bind(this, item),\n role: 'option',\n ...({\n 'data-index': item.index,\n 'data-is-focusable': !(item.disabled || item.hidden),\n } as any),\n }}\n label={item.text}\n title={title}\n // eslint-disable-next-line react/jsx-no-bind\n onRenderLabel={this._onRenderItemLabel.bind(this, { ...item, id: labelId })}\n className={css(itemClassName, 'is-multi-select')}\n checked={isItemSelected}\n styles={multiSelectItemStyles}\n ariaPositionInSet={!item.hidden ? this._sizePosCache.positionInSet(item.index) : undefined}\n ariaSetSize={!item.hidden ? this._sizePosCache.optionSetSize : undefined}\n ariaLabel={item.ariaLabel}\n ariaLabelledBy={item.ariaLabel ? undefined : labelId}\n />\n );\n };\n\n /** Render content of item (i.e. text/icon inside of button) */\n private _onRenderOption = (item: IDropdownOption): JSX.Element => {\n return <span className={this._classNames.dropdownOptionText}>{item.text}</span>;\n };\n\n /*\n * Render content of a multiselect item label.\n * Text within the label is aria-hidden, to prevent duplicate input/label exposure\n */\n private _onRenderMultiselectOption = (item: IDropdownOption): JSX.Element => {\n return (\n <span id={item.id} aria-hidden=\"true\" className={this._classNames.dropdownOptionText}>\n {item.text}\n </span>\n );\n };\n\n /** Render custom label for multiselect checkbox items */\n private _onRenderItemLabel = (item: IDropdownOption): JSX.Element | null => {\n const { onRenderOption = this._onRenderMultiselectOption } = this.props;\n return onRenderOption(item, this._onRenderMultiselectOption);\n };\n\n private _onPositioned = (positions?: ICalloutPositionedInfo): void => {\n if (this._focusZone.current) {\n // Focusing an element can trigger a reflow. Making this wait until there is an animation\n // frame can improve perf significantly.\n this._requestAnimationFrame(() => {\n const selectedIndices = this.props.hoisted.selectedIndices;\n if (this._focusZone.current) {\n if (\n !this._hasBeenPositioned &&\n selectedIndices &&\n selectedIndices[0] &&\n !this.props.options[selectedIndices[0]].disabled\n ) {\n const element: HTMLElement | null = getDocument()!.getElementById(`${this._id}-list${selectedIndices[0]}`);\n if (element) {\n this._focusZone.current.focusElement(element);\n }\n this._hasBeenPositioned = true;\n } else {\n this._focusZone.current.focus();\n }\n }\n });\n }\n\n if (!this.state.calloutRenderEdge || this.state.calloutRenderEdge !== positions!.targetEdge) {\n this.setState({\n calloutRenderEdge: positions!.targetEdge,\n });\n }\n };\n\n private _onItemClick = (item: IDropdownOption): ((event: React.MouseEvent<HTMLDivElement>) => void) => {\n return (event: React.MouseEvent<HTMLDivElement>): void => {\n if (!item.disabled) {\n this.setSelectedIndex(event, item.index!);\n if (!this.props.multiSelect) {\n // only close the callout when it's in single-select mode\n this.setState({\n isOpen: false,\n });\n }\n }\n };\n };\n\n /**\n * Scroll handler for the callout to make sure the mouse events\n * for updating focus are not interacting during scroll\n */\n private _onScroll = (): void => {\n if (!this._isScrollIdle && this._scrollIdleTimeoutId !== undefined) {\n clearTimeout(this._scrollIdleTimeoutId);\n this._scrollIdleTimeoutId = undefined;\n } else {\n this._isScrollIdle = false;\n }\n\n this._scrollIdleTimeoutId = window.setTimeout(() => {\n this._isScrollIdle = true;\n }, this._scrollIdleDelay);\n };\n\n private _onItemMouseEnter(item: any, ev: React.MouseEvent<HTMLElement>): void {\n if (this._shouldIgnoreMouseEvent()) {\n return;\n }\n\n const targetElement = ev.currentTarget as HTMLElement;\n targetElement.focus();\n }\n\n private _onItemMouseMove(item: any, ev: React.MouseEvent<HTMLElement>): void {\n const targetElement = ev.currentTarget as HTMLElement;\n this._gotMouseMove = true;\n\n if (!this._isScrollIdle || document.activeElement === targetElement) {\n return;\n }\n\n targetElement.focus();\n }\n\n private _onMouseItemLeave = (item: any, ev: React.MouseEvent<HTMLElement>): void => {\n if (this._shouldIgnoreMouseEvent()) {\n return;\n }\n\n /**\n * IE11 focus() method forces parents to scroll to top of element.\n * Edge and IE expose a setActive() function for focusable divs that\n * sets the page focus but does not scroll the parent element.\n */\n if (this._host.current) {\n if ((this._host.current as any).setActive) {\n try {\n (this._host.current as any).setActive();\n } catch (e) {\n /* no-op */\n }\n } else {\n this._host.current.focus();\n }\n }\n };\n\n private _shouldIgnoreMouseEvent(): boolean {\n return !this._isScrollIdle || !this._gotMouseMove;\n }\n\n private _onDismiss = (): void => {\n this.setState({ isOpen: false });\n };\n\n private _onDropdownBlur = (ev: React.FocusEvent<HTMLDivElement>): void => {\n // If Dropdown disabled do not proceed with this logic.\n const disabled = this._isDisabled();\n if (disabled) {\n return;\n }\n\n if (this.state.isOpen) {\n // Do not call onBlur or update focus state when the callout is opened\n return;\n }\n\n this.setState({ hasFocus: false });\n\n if (this.props.onBlur) {\n this.props.onBlur(ev);\n }\n };\n\n private _onDropdownKeyDown = (ev: React.KeyboardEvent<HTMLDivElement>): void => {\n // If Dropdown disabled do not process any keyboard events.\n const disabled = this._isDisabled();\n if (disabled) {\n return;\n }\n\n // Take note if we are processing an alt (option) or meta (command) keydown.\n // See comment in _shouldHandleKeyUp for reasoning.\n this._lastKeyDownWasAltOrMeta = this._isAltOrMeta(ev);\n\n if (this.props.onKeyDown) {\n this.props.onKeyDown(ev);\n if (ev.defaultPrevented) {\n return;\n }\n }\n\n let newIndex: number | undefined;\n const selectedIndex = this.props.hoisted.selectedIndices.length ? this.props.hoisted.selectedIndices[0] : -1;\n const containsExpandCollapseModifier = ev.altKey || ev.metaKey;\n const isOpen = this.state.isOpen;\n\n // eslint-disable-next-line deprecation/deprecation\n switch (ev.which) {\n case KeyCodes.enter:\n this.setState({\n isOpen: !isOpen,\n });\n break;\n\n case KeyCodes.escape:\n if (!isOpen) {\n return;\n }\n\n this.setState({\n isOpen: false,\n });\n break;\n\n case KeyCodes.up:\n if (containsExpandCollapseModifier) {\n if (isOpen) {\n this.setState({ isOpen: false });\n break;\n }\n\n return;\n }\n if (this.props.multiSelect) {\n this.setState({ isOpen: true });\n } else if (!this._isDisabled()) {\n newIndex = this._moveIndex(ev, -1, selectedIndex - 1, selectedIndex);\n }\n break;\n\n case KeyCodes.down:\n if (containsExpandCollapseModifier) {\n ev.stopPropagation();\n ev.preventDefault();\n }\n if ((containsExpandCollapseModifier && !isOpen) || this.props.multiSelect) {\n this.setState({ isOpen: true });\n } else if (!this._isDisabled()) {\n newIndex = this._moveIndex(ev, 1, selectedIndex + 1, selectedIndex);\n }\n break;\n\n case KeyCodes.home:\n if (!this.props.multiSelect) {\n newIndex = this._moveIndex(ev, 1, 0, selectedIndex);\n }\n break;\n\n case KeyCodes.end:\n if (!this.props.multiSelect) {\n newIndex = this._moveIndex(ev, -1, this.props.options.length - 1, selectedIndex);\n }\n break;\n\n case KeyCodes.space:\n // event handled in _onDropdownKeyUp\n break;\n\n default:\n return;\n }\n\n if (newIndex !== selectedIndex) {\n ev.stopPropagation();\n ev.preventDefault();\n }\n };\n\n private _onDropdownKeyUp = (ev: React.KeyboardEvent<HTMLDivElement>): void => {\n // If Dropdown disabled do not process any keyboard events.\n const disabled = this._isDisabled();\n if (disabled) {\n return;\n }\n\n const shouldHandleKey = this._shouldHandleKeyUp(ev);\n const isOpen = this.state.isOpen;\n\n if (this.props.onKeyUp) {\n this.props.onKeyUp(ev);\n if (ev.defaultPrevented) {\n return;\n }\n }\n // eslint-disable-next-line deprecation/deprecation\n switch (ev.which) {\n case KeyCodes.space:\n this.setState({\n isOpen: !isOpen,\n });\n break;\n\n default:\n if (shouldHandleKey && isOpen) {\n this.setState({ isOpen: false });\n }\n return;\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n };\n\n /**\n * Returns true if the key for the event is alt (Mac option) or meta (Mac command).\n */\n private _isAltOrMeta(ev: React.KeyboardEvent<HTMLElement>): boolean {\n // eslint-disable-next-line deprecation/deprecation\n return ev.which === KeyCodes.alt || ev.key === 'Meta';\n }\n\n /**\n * We close the menu on key up only if ALL of the following are true:\n * - Most recent key down was alt or meta (command)\n * - The alt/meta key down was NOT followed by some other key (such as down/up arrow to\n * expand/collapse the menu)\n * - We're not on a Mac (or iOS)\n *\n * This is because on Windows, pressing alt moves focus to the application menu bar or similar,\n * closing any open context menus. There is not a similar behavior on Macs.\n */\n private _shouldHandleKeyUp(ev: React.KeyboardEvent<HTMLElement>): boolean {\n const keyPressIsAltOrMetaAlone = this._lastKeyDownWasAltOrMeta && this._isAltOrMeta(ev);\n this._lastKeyDownWasAltOrMeta = false;\n return !!keyPressIsAltOrMetaAlone && !(isMac() || isIOS());\n }\n\n private _onZoneKeyDown = (ev: React.KeyboardEvent<HTMLElement>): void => {\n let elementToFocus;\n\n // Take note if we are processing an alt (option) or meta (command) keydown.\n // See comment in _shouldHandleKeyUp for reasoning.\n this._lastKeyDownWasAltOrMeta = this._isAltOrMeta(ev);\n const containsExpandCollapseModifier = ev.altKey || ev.metaKey;\n\n // eslint-disable-next-line deprecation/deprecation\n switch (ev.which) {\n case KeyCodes.up:\n if (containsExpandCollapseModifier) {\n this.setState({ isOpen: false });\n } else {\n if (this._host.current) {\n elementToFocus = getLastFocusable(this._host.current, this._host.current.lastChild as HTMLElement, true);\n }\n }\n break;\n\n // All directional keystrokes should be canceled when the zone is rendered.\n // This avoids the body scroll from reacting and thus dismissing the dropdown.\n case KeyCodes.home:\n case KeyCodes.end:\n case KeyCodes.pageUp:\n case KeyCodes.pageDown:\n break;\n\n case KeyCodes.down:\n if (!containsExpandCollapseModifier && this._host.current) {\n elementToFocus = getFirstFocusable(this._host.current, this._host.current.firstChild as HTMLElement, true);\n }\n break;\n\n case KeyCodes.escape:\n this.setState({ isOpen: false });\n break;\n\n case KeyCodes.tab:\n this.setState({ isOpen: false });\n\n const document = getDocument();\n\n if (document) {\n if (ev.shiftKey) {\n getPreviousElement(document.body, this._dropDown.current, false, false, true, true)?.focus();\n } else {\n getNextElement(document.body, this._dropDown.current, false, false, true, true)?.focus();\n }\n }\n break;\n\n default:\n return;\n }\n\n if (elementToFocus) {\n elementToFocus.focus();\n }\n\n ev.stopPropagation();\n ev.preventDefault();\n };\n\n private _onZoneKeyUp = (ev: React.KeyboardEvent<HTMLElement>): void => {\n const shouldHandleKey = this._shouldHandleKeyUp(ev);\n\n if (shouldHandleKey && this.state.isOpen) {\n this.setState({ isOpen: false });\n ev.preventDefault();\n }\n };\n\n private _onDropdownClick = (ev: React.MouseEvent<HTMLDivElement>): void => {\n if (this.props.onClick) {\n this.props.onClick(ev);\n if (ev.defaultPrevented) {\n return;\n }\n }\n\n const { isOpen } = this.state;\n const disabled = this._isDisabled();\n\n if (!disabled && !this._shouldOpenOnFocus()) {\n this.setState({\n isOpen: !isOpen,\n });\n }\n\n this._isFocusedByClick = false; // reset\n };\n\n private _onDropdownMouseDown = (): void => {\n this._isFocusedByClick = true;\n };\n\n private _onFocus = (ev: React.FocusEvent<HTMLDivElement>): void => {\n const disabled = this._isDisabled();\n\n if (!disabled) {\n if (this.props.onFocus) {\n this.props.onFocus(ev);\n }\n const state: Pick<IDropdownState, 'hasFocus'> | Pick<IDropdownState, 'hasFocus' | 'isOpen'> = { hasFocus: true };\n if (this._shouldOpenOnFocus()) {\n (state as Pick<IDropdownState, 'hasFocus' | 'isOpen'>).isOpen = true;\n }\n\n this.setState(state);\n }\n };\n\n /**\n * Because the isDisabled prop is deprecated, we have had to repeat this logic all over the place.\n * This helper method avoids all the repetition.\n */\n private _isDisabled: () => boolean | undefined = () => {\n let { disabled } = this.props;\n // eslint-disable-next-line deprecation/deprecation\n const { isDisabled } = this.props;\n\n // Remove this deprecation workaround at 1.0.0\n if (disabled === undefined) {\n disabled = isDisabled;\n }\n\n return disabled;\n };\n\n private _onRenderLabel = (props: IDropdownProps): JSX.Element | null => {\n const { label, required, disabled } = props;\n\n const labelStyles = this._classNames.subComponentStyles\n ? (this._classNames.subComponentStyles.label as IStyleFunctionOrObject<ILabelStyleProps, ILabelStyles>)\n : undefined;\n\n return label ? (\n <Label\n className={this._classNames.label}\n id={this._labelId}\n required={required}\n styles={labelStyles}\n disabled={disabled}\n >\n {label}\n </Label>\n ) : null;\n };\n\n /**\n * Returns true if dropdown should set to open on focus.\n * Otherwise, isOpen state should be toggled on click\n */\n private _shouldOpenOnFocus(): boolean {\n const { hasFocus } = this.state;\n const { openOnKeyboardFocus } = this.props;\n return !this._isFocusedByClick && openOnKeyboardFocus === true && !hasFocus;\n }\n}\n","import * as React from 'react';\nimport { extendComponent } from './extendComponent';\n\n/**\n * Generates a function to be attached to a React component, which can be called\n * as a replacement to RAF. In-flight async calls will be auto canceled if the component\n * is unmounting before the async code is executed, preventing bugs where code\n * accesses things within the component after being unmounted.\n */\nexport const safeRequestAnimationFrame = (component: React.Component): ((cb: Function) => void) => {\n let activeTimeouts: Set<number>;\n\n return (cb: Function) => {\n if (!activeTimeouts) {\n activeTimeouts = new Set<number>();\n\n extendComponent(component, {\n componentWillUnmount: () => {\n activeTimeouts.forEach((id: number) => cancelAnimationFrame(id));\n },\n });\n }\n\n const timeoutId = requestAnimationFrame(() => {\n activeTimeouts.delete(timeoutId);\n cb();\n });\n\n activeTimeouts.add(timeoutId);\n };\n};\n","import { IsFocusVisibleClassName } from '../../Utilities';\nimport { RectangleEdge } from '../../Positioning';\nimport {\n FontWeights,\n HighContrastSelector,\n getGlobalClassNames,\n normalize,\n HighContrastSelectorWhite,\n getScreenSelector,\n ScreenWidthMinMedium,\n getHighContrastNoAdjustStyle,\n} from '../../Styling';\nimport type { IDropdownStyles, IDropdownStyleProps } from './Dropdown.types';\nimport type { IStyleFunction } from '../../Utilities';\nimport type { IRawStyle, IStyle } from '../../Styling';\n\nconst GlobalClassNames = {\n root: 'ms-Dropdown-container',\n label: 'ms-Dropdown-label',\n dropdown: 'ms-Dropdown',\n title: 'ms-Dropdown-title',\n caretDownWrapper: 'ms-Dropdown-caretDownWrapper',\n caretDown: 'ms-Dropdown-caretDown',\n callout: 'ms-Dropdown-callout',\n panel: 'ms-Dropdown-panel',\n dropdownItems: 'ms-Dropdown-items',\n dropdownItem: 'ms-Dropdown-item',\n dropdownDivider: 'ms-Dropdown-divider',\n dropdownOptionText: 'ms-Dropdown-optionText',\n dropdownItemHeader: 'ms-Dropdown-header',\n titleIsPlaceHolder: 'ms-Dropdown-titleIsPlaceHolder',\n titleHasError: 'ms-Dropdown-title--hasError',\n};\n\nconst DROPDOWN_HEIGHT = 32;\nconst DROPDOWN_ITEM_HEIGHT = 36;\n\nconst highContrastAdjustMixin = {\n [`${HighContrastSelector}, ${HighContrastSelectorWhite.replace('@media ', '')}`]: {\n ...getHighContrastNoAdjustStyle(),\n },\n};\n\nconst highContrastItemAndTitleStateMixin: IRawStyle = {\n selectors: {\n [HighContrastSelector]: {\n backgroundColor: 'Highlight',\n borderColor: 'Highlight',\n color: 'HighlightText',\n },\n ...highContrastAdjustMixin,\n },\n};\n\nconst highContrastBorderState: IRawStyle = {\n selectors: {\n [HighContrastSelector]: {\n borderColor: 'Highlight',\n },\n },\n};\n\nconst MinimumScreenSelector = getScreenSelector(0, ScreenWidthMinMedium);\n\nexport const getStyles: IStyleFunction<IDropdownStyleProps, IDropdownStyles> = props => {\n const {\n theme,\n hasError,\n hasLabel,\n className,\n isOpen,\n disabled,\n required,\n isRenderingPlaceholder,\n panelClassName,\n calloutClassName,\n calloutRenderEdge,\n } = props;\n\n if (!theme) {\n throw new Error('theme is undefined or null in base Dropdown getStyles function.');\n }\n\n const globalClassnames = getGlobalClassNames(GlobalClassNames, theme);\n const { palette, semanticColors, effects, fonts } = theme;\n\n const rootHoverFocusActiveSelectorNeutralDarkMixin: IStyle = {\n color: semanticColors.menuItemTextHovered,\n };\n\n const rootHoverFocusActiveSelectorNeutralPrimaryMixin: IStyle = {\n color: semanticColors.menuItemText,\n };\n\n const borderColorError: IStyle = {\n borderColor: semanticColors.errorText,\n };\n\n const dropdownItemStyle: IStyle = [\n globalClassnames.dropdownItem,\n {\n backgroundColor: 'transparent',\n boxSizing: 'border-box',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n padding: '0 8px',\n width: '100%',\n minHeight: DROPDOWN_ITEM_HEIGHT,\n lineHeight: 20,\n height: 0,\n position: 'relative',\n border: '1px solid transparent',\n borderRadius: 0,\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n textAlign: 'left',\n\n '.ms-Button-flexContainer': {\n width: '100%',\n },\n },\n ];\n\n const dropdownHeaderStyle: IStyle = [\n globalClassnames.dropdownItemHeader,\n {\n ...fonts.medium,\n fontWeight: FontWeights.semibold,\n color: semanticColors.menuHeader,\n background: 'none',\n backgroundColor: 'transparent',\n border: 'none',\n height: DROPDOWN_ITEM_HEIGHT,\n lineHeight: DROPDOWN_ITEM_HEIGHT,\n cursor: 'default',\n padding: '0 8px',\n userSelect: 'none',\n textAlign: 'left',\n selectors: {\n [HighContrastSelector]: {\n color: 'GrayText',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n },\n ];\n\n const selectedItemBackgroundColor = semanticColors.menuItemBackgroundPressed;\n\n const itemSelectors = (isSelected: boolean = false) => {\n return {\n selectors: {\n '&:hover': [\n {\n color: semanticColors.menuItemTextHovered,\n backgroundColor: !isSelected ? semanticColors.menuItemBackgroundHovered : selectedItemBackgroundColor,\n },\n highContrastItemAndTitleStateMixin,\n ],\n '&.is-multi-select:hover': [{ backgroundColor: !isSelected ? 'transparent' : selectedItemBackgroundColor }],\n '&:active:hover': [\n {\n color: semanticColors.menuItemTextHovered,\n backgroundColor: !isSelected\n ? semanticColors.menuItemBackgroundPressed\n : semanticColors.menuItemBackgroundHovered,\n },\n highContrastItemAndTitleStateMixin,\n ],\n [`.${IsFocusVisibleClassName} &:focus:after`]: {\n left: 0,\n top: 0,\n bottom: 0,\n right: 0,\n [HighContrastSelector]: {\n inset: '2px',\n },\n },\n [HighContrastSelector]: {\n border: 'none',\n },\n },\n };\n };\n\n const dropdownItemSelected: IStyle = [\n ...dropdownItemStyle,\n {\n backgroundColor: selectedItemBackgroundColor,\n color: semanticColors.menuItemTextHovered,\n },\n itemSelectors(true),\n highContrastItemAndTitleStateMixin,\n ];\n\n const dropdownItemDisabled: IStyle = [\n ...dropdownItemStyle,\n {\n color: semanticColors.disabledText,\n cursor: 'default',\n selectors: {\n [HighContrastSelector]: {\n color: 'GrayText',\n border: 'none',\n },\n },\n },\n ];\n\n const titleOpenBorderRadius =\n calloutRenderEdge === RectangleEdge.bottom\n ? `${effects.roundedCorner2} ${effects.roundedCorner2} 0 0`\n : `0 0 ${effects.roundedCorner2} ${effects.roundedCorner2}`;\n\n const calloutOpenBorderRadius =\n calloutRenderEdge === RectangleEdge.bottom\n ? `0 0 ${effects.roundedCorner2} ${effects.roundedCorner2}`\n : `${effects.roundedCorner2} ${effects.roundedCorner2} 0 0`;\n\n return {\n root: [globalClassnames.root, className],\n label: globalClassnames.label,\n dropdown: [\n globalClassnames.dropdown,\n normalize,\n fonts.medium,\n {\n color: semanticColors.menuItemText,\n borderColor: semanticColors.focusBorder,\n position: 'relative',\n outline: 0,\n userSelect: 'none',\n selectors: {\n ['&:hover .' + globalClassnames.title]: [\n !disabled && rootHoverFocusActiveSelectorNeutralDarkMixin,\n { borderColor: isOpen ? palette.neutralSecondary : palette.neutralPrimary },\n highContrastBorderState,\n ],\n ['&:focus .' + globalClassnames.title]: [\n !disabled && rootHoverFocusActiveSelectorNeutralDarkMixin,\n { selectors: { [HighContrastSelector]: { color: 'Highlight' } } },\n ],\n\n ['&:focus:after']: [\n {\n pointerEvents: 'none',\n content: \"''\",\n position: 'absolute',\n boxSizing: 'border-box',\n top: '0px',\n left: '0px',\n width: '100%',\n height: '100%',\n // see https://github.com/microsoft/fluentui/pull/9182 for semantic color disc\n border: !disabled ? `2px solid ${palette.themePrimary}` : 'none',\n borderRadius: '2px',\n\n selectors: {\n [HighContrastSelector]: {\n color: 'Highlight',\n },\n },\n },\n ],\n ['&:active .' + globalClassnames.title]: [\n !disabled && rootHoverFocusActiveSelectorNeutralDarkMixin,\n { borderColor: palette.themePrimary },\n highContrastBorderState,\n ],\n\n ['&:hover .' + globalClassnames.caretDown]: !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,\n ['&:focus .' + globalClassnames.caretDown]: [\n !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,\n { selectors: { [HighContrastSelector]: { color: 'Highlight' } } },\n ],\n ['&:active .' + globalClassnames.caretDown]: !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,\n\n ['&:hover .' + globalClassnames.titleIsPlaceHolder]:\n !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,\n ['&:focus .' + globalClassnames.titleIsPlaceHolder]:\n !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,\n ['&:active .' + globalClassnames.titleIsPlaceHolder]:\n !disabled && rootHoverFocusActiveSelectorNeutralPrimaryMixin,\n\n ['&:hover .' + globalClassnames.titleHasError]: borderColorError,\n ['&:active .' + globalClassnames.titleHasError]: borderColorError,\n },\n },\n isOpen && 'is-open',\n disabled && 'is-disabled',\n required && 'is-required',\n required &&\n !hasLabel && {\n selectors: {\n ':before': {\n content: `'*'`,\n color: semanticColors.errorText,\n position: 'absolute',\n top: -5,\n right: -10,\n },\n [HighContrastSelector]: {\n selectors: {\n ':after': {\n right: -14, // moving the * 4 pixel to right to alleviate border clipping in HC mode.\n },\n },\n },\n },\n },\n ],\n title: [\n globalClassnames.title,\n normalize,\n {\n backgroundColor: semanticColors.inputBackground,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: semanticColors.inputBorder,\n borderRadius: isOpen ? titleOpenBorderRadius : effects.roundedCorner2,\n cursor: 'pointer',\n display: 'block',\n height: DROPDOWN_HEIGHT,\n lineHeight: DROPDOWN_HEIGHT - 2,\n padding: `0 28px 0 8px`,\n position: 'relative',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n },\n isRenderingPlaceholder && [globalClassnames.titleIsPlaceHolder, { color: semanticColors.inputPlaceholderText }],\n hasError && [globalClassnames.titleHasError, borderColorError],\n disabled && {\n backgroundColor: semanticColors.disabledBackground,\n border: 'none',\n color: semanticColors.disabledText,\n cursor: 'default',\n selectors: {\n [HighContrastSelector]: {\n border: '1px solid GrayText',\n color: 'GrayText',\n backgroundColor: 'Window',\n ...getHighContrastNoAdjustStyle(),\n },\n },\n },\n ],\n caretDownWrapper: [\n globalClassnames.caretDownWrapper,\n {\n height: DROPDOWN_HEIGHT,\n lineHeight: DROPDOWN_HEIGHT - 2, // height minus the border\n paddingTop: 1,\n position: 'absolute',\n right: 8,\n top: 0,\n },\n !disabled && {\n cursor: 'pointer',\n },\n ],\n caretDown: [\n globalClassnames.caretDown,\n { color: palette.neutralSecondary, fontSize: fonts.small.fontSize, pointerEvents: 'none' },\n disabled && {\n color: semanticColors.disabledText,\n selectors: {\n [HighContrastSelector]: { color: 'GrayText', ...getHighContrastNoAdjustStyle() },\n },\n },\n ],\n errorMessage: { color: semanticColors.errorText, ...theme.fonts.small, paddingTop: 5 },\n callout: [\n globalClassnames.callout,\n {\n boxShadow: effects.elevation8,\n borderRadius: calloutOpenBorderRadius,\n selectors: {\n ['.ms-Callout-main']: { borderRadius: calloutOpenBorderRadius },\n },\n },\n calloutClassName,\n ],\n dropdownItemsWrapper: { selectors: { '&:focus': { outline: 0 } } },\n dropdownItems: [globalClassnames.dropdownItems, { display: 'block' }],\n dropdownItem: [...dropdownItemStyle, itemSelectors()],\n dropdownItemSelected,\n dropdownItemDisabled,\n dropdownItemSelectedAndDisabled: [dropdownItemSelected, dropdownItemDisabled, { backgroundColor: 'transparent' }],\n dropdownItemHidden: [...dropdownItemStyle, { display: 'none' }],\n dropdownDivider: [globalClassnames.dropdownDivider, { height: 1, backgroundColor: semanticColors.bodyDivider }],\n dropdownDividerHidden: [globalClassnames.dropdownDivider, { display: 'none' }],\n dropdownOptionText: [\n globalClassnames.dropdownOptionText,\n {\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n minWidth: 0,\n maxWidth: '100%',\n wordWrap: 'break-word',\n overflowWrap: 'break-word',\n margin: '1px',\n },\n ],\n dropdownItemHeader: dropdownHeaderStyle,\n dropdownItemHeaderHidden: [...dropdownHeaderStyle, { display: 'none' }],\n subComponentStyles: {\n label: { root: { display: 'inline-block' } },\n multiSelectItem: {\n root: {\n padding: 0,\n },\n label: {\n alignSelf: 'stretch',\n padding: '0 8px',\n width: '100%',\n },\n input: {\n selectors: {\n [`.${IsFocusVisibleClassName} &:focus + label::before`]: {\n outlineOffset: '0px',\n },\n },\n },\n },\n panel: {\n root: [panelClassName],\n main: {\n selectors: {\n // In case of extra small screen sizes\n [MinimumScreenSelector]: {\n // panelWidth xs\n width: 272,\n },\n },\n },\n contentInner: { padding: '0 0 20px' },\n },\n },\n };\n};\n","import * as React from 'react';\nimport { styled } from '../../Utilities';\nimport { DropdownBase } from './Dropdown.base';\nimport { getStyles } from './Dropdown.styles';\nimport type { IDropdownProps, IDropdownStyleProps, IDropdownStyles } from './Dropdown.types';\n\nexport const Dropdown: React.FunctionComponent<IDropdownProps> = styled<\n IDropdownProps,\n IDropdownStyleProps,\n IDropdownStyles\n>(DropdownBase, getStyles, undefined, {\n scope: 'Dropdown',\n});\nDropdown.displayName = 'Dropdown';\n"],"sourceRoot":""}