Socket
Socket
Sign inDemoInstall

@fluentui/react-utilities

Package Overview
Dependencies
Maintainers
12
Versions
827
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-utilities - npm Package Compare versions

Comparing version 9.0.0-alpha.19 to 9.0.0-alpha.20

lib-amd/ssr/canUseDOM.d.ts

43

CHANGELOG.json

@@ -5,3 +5,44 @@ {

{
"date": "Fri, 23 Apr 2021 07:30:56 GMT",
"date": "Fri, 30 Apr 2021 07:35:40 GMT",
"tag": "@fluentui/react-utilities_v9.0.0-alpha.20",
"version": "9.0.0-alpha.20",
"comments": {
"prerelease": [
{
"comment": "Upgrade to ts 4.0",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/react-utilities"
},
{
"comment": "update useId() to be safe for SSR",
"author": "olfedias@microsoft.com",
"commit": "2a95add2ed379f3e061339d86ae03199ef0d5080",
"package": "@fluentui/react-utilities"
}
],
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.2.0",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/react-utilities"
},
{
"comment": "Bump @fluentui/keyboard-key to v0.3.0",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/react-utilities"
},
{
"comment": "Bump @fluentui/scripts to v1.0.0",
"author": "joschect@microsoft.com",
"commit": "2b62c457bb860f6675fae4acae86ee6c0b06c279",
"package": "@fluentui/react-utilities"
}
]
}
},
{
"date": "Fri, 23 Apr 2021 07:37:10 GMT",
"tag": "@fluentui/react-utilities_v9.0.0-alpha.19",

@@ -8,0 +49,0 @@ "version": "9.0.0-alpha.19",

# Change Log - @fluentui/react-utilities
This log was last generated on Fri, 23 Apr 2021 07:30:56 GMT and should not be manually modified.
This log was last generated on Fri, 30 Apr 2021 07:35:40 GMT and should not be manually modified.
<!-- Start content -->
## [9.0.0-alpha.20](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.20)
Fri, 30 Apr 2021 07:35:40 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.19..@fluentui/react-utilities_v9.0.0-alpha.20)
### Patches
- Bump @fluentui/eslint-plugin to v1.2.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
- Bump @fluentui/keyboard-key to v0.3.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
- Bump @fluentui/scripts to v1.0.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
### Changes
- Upgrade to ts 4.0 ([PR #17932](https://github.com/microsoft/fluentui/pull/17932) by joschect@microsoft.com)
- update useId() to be safe for SSR ([PR #17924](https://github.com/microsoft/fluentui/pull/17924) by olfedias@microsoft.com)
## [9.0.0-alpha.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.19)
Fri, 23 Apr 2021 07:30:56 GMT
Fri, 23 Apr 2021 07:37:10 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.18..@fluentui/react-utilities_v9.0.0-alpha.19)

@@ -11,0 +27,0 @@

115

dist/react-utilities.d.ts

@@ -1,2 +0,2 @@

import * as React from 'react';
import * as React_2 from 'react';

@@ -32,3 +32,3 @@ /**

export declare interface BaseSlots {
root: React.ElementType;
root: React_2.ElementType;
}

@@ -43,4 +43,9 @@

export declare type ChangeCallback<TElement extends HTMLElement, TValue, TEvent extends React.SyntheticEvent<TElement> | undefined> = (ev: TEvent, newValue: TValue | undefined) => void;
/**
* Verifies if an application can use DOM.
*/
export declare function canUseDOM(): boolean;
export declare type ChangeCallback<TElement extends HTMLElement, TValue, TEvent extends React_2.SyntheticEvent<TElement> | undefined> = (ev: TEvent, newValue: TValue | undefined) => void;
/**

@@ -56,5 +61,5 @@ * Class dictionary.

export declare interface ComponentProps {
as?: React.ElementType;
as?: React_2.ElementType;
className?: string;
children?: React.ReactNode;
children?: React_2.ReactNode;
}

@@ -74,11 +79,18 @@

export declare type ComponentState<RefType, Props, ShorthandProps extends keyof Props = never, DefaultedProps extends keyof ResolvedShorthandProps<Props, ShorthandProps> = never> = RequiredProps<ResolvedShorthandProps<Props, ShorthandProps>, DefaultedProps> & {
as?: React.ElementType;
as?: React_2.ElementType;
ref: RefType;
};
export declare function createDescendantContext<DescendantType extends Descendant>(name: string, initialValue?: {}): React.Context<DescendantContextValue<DescendantType>>;
export declare function createDescendantContext<DescendantType extends Descendant>(name: string, initialValue?: {}): React_2.Context<DescendantContextValue<DescendantType>>;
export declare function createNamedContext<ContextValueType>(name: string, defaultValue: ContextValueType): React.Context<ContextValueType>;
export declare function createNamedContext<ContextValueType>(name: string, defaultValue: ContextValueType): React_2.Context<ContextValueType>;
/**
* Default context value to use in case there is no SSRProvider. This is fine for client-only apps.
*
* @internal
*/
export declare const defaultSSRContextValue: SSRContextValue;
/**
* Default value can be a value or an initializer

@@ -100,6 +112,6 @@ */

export declare const DescendantProvider: <DescendantType extends Descendant<HTMLElement>>({ context: Ctx, children, items, set, }: {
context: React.Context<DescendantContextValue<DescendantType>>;
children: React.ReactNode;
context: React_2.Context<DescendantContextValue<DescendantType>>;
children: React_2.ReactNode;
items: DescendantType[];
set: React.Dispatch<React.SetStateAction<DescendantType[]>>;
set: React_2.Dispatch<React_2.SetStateAction<DescendantType[]>>;
}) => JSX.Element;

@@ -133,3 +145,3 @@

*/
export declare function getNativeElementProps<TAttributes extends React.HTMLAttributes<any>>(tagName: string, props: {}, excludedPropNames?: string[]): TAttributes;
export declare function getNativeElementProps<TAttributes extends React_2.HTMLAttributes<any>>(tagName: string, props: {}, excludedPropNames?: string[]): TAttributes;

@@ -168,3 +180,3 @@ /**

*/
export declare const getSlots: (state: Record<string, any>, slotNames?: readonly string[] | undefined) => {
export declare const getSlots: (state: GenericDictionary, slotNames?: readonly string[] | undefined) => {
slots: Record<string, any>;

@@ -208,7 +220,2 @@ slotProps: Record<string, any>;

/**
* Verifies if application is running in server side rendering or in the browser
*/
export declare function isSSR(): boolean;
/**
* An array of LABEL tag properties and events.

@@ -241,3 +248,3 @@ *

*/
export declare const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: Record<string, any>, ...propSets: (Record<string, any> | undefined)[]) => TState;
export declare const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: GenericDictionary, ...propSets: (GenericDictionary | undefined)[]) => TState;

@@ -289,3 +296,3 @@ export declare type MergePropsOptions<TState> = {

*/
export declare type RefObjectFunction<T> = React.RefObject<T> & ((value: T) => void);
export declare type RefObjectFunction<T> = React_2.RefObject<T> & ((value: T) => void);

@@ -301,2 +308,9 @@ /**

/**
* Resets generated IDs, should be used only in tests.
*
* @private
*/
export declare function resetIdsForTests(): void;
/**
* Helper type to convert the given props of type ShorthandProps into ObjectShorthandProps

@@ -323,5 +337,5 @@ */

export declare type ShorthandProps<TProps extends ComponentProps = {}> = React.ReactChild | React.ReactNodeArray | React.ReactPortal | boolean | number | null | undefined | ObjectShorthandProps<TProps>;
export declare type ShorthandProps<TProps extends ComponentProps = {}> = React_2.ReactChild | React_2.ReactNodeArray | React_2.ReactPortal | boolean | number | null | undefined | ObjectShorthandProps<TProps>;
export declare type ShorthandRenderFunction<TProps> = (Component: React.ElementType<TProps>, props: TProps) => React.ReactNode;
export declare type ShorthandRenderFunction<TProps> = (Component: React_2.ElementType<TProps>, props: TProps) => React_2.ReactNode;

@@ -333,5 +347,5 @@ /**

*/
export declare function shouldPreventDefaultOnKeyDown(e: KeyboardEvent | React.KeyboardEvent): boolean;
export declare function shouldPreventDefaultOnKeyDown(e: KeyboardEvent | React_2.KeyboardEvent): boolean;
export declare type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React.HTMLAttributes<HTMLElement>> = {
export declare type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React_2.HTMLAttributes<HTMLElement>> = {
[key in keyof Omit<TSlots, 'root'>]: key extends keyof TProps ? TProps[key] : any;

@@ -344,3 +358,23 @@ } & {

export declare const SSRContext: React_2.Context<SSRContextValue>;
/**
* To support SSR, the auto incrementing id counter is stored in a context. This allows it to be reset on every request
* to ensure the client and server are consistent.
*
* @internal
*/
export declare interface SSRContextValue {
current: number;
}
/**
* When using SSR with Fluent UI, applications must be wrapped in an SSRProvider. This ensures that auto generated ids
* are consistent between the client and server.
*
* @public
*/
export declare const SSRProvider: React_2.FC;
/**
* An array of TABLE tag properties and events.

@@ -423,5 +457,5 @@ *

*/
export declare function useControllableValue<TValue, TElement extends HTMLElement>(controlledValue: TValue, defaultUncontrolledValue: DefaultValue<TValue>): Readonly<[TValue, (update: React.SetStateAction<TValue>) => void]>;
export declare function useControllableValue<TValue, TElement extends HTMLElement>(controlledValue: TValue, defaultUncontrolledValue: DefaultValue<TValue>): Readonly<[TValue, (update: React_2.SetStateAction<TValue>) => void]>;
export declare function useControllableValue<TValue, TElement extends HTMLElement, TEvent extends React.SyntheticEvent<TElement> | undefined>(controlledValue: TValue, defaultUncontrolledValue: DefaultValue<TValue>, onChange: ChangeCallback<TElement, TValue, TEvent>): Readonly<[TValue, (update: React.SetStateAction<TValue>, ev?: React.FormEvent<TElement>) => void]>;
export declare function useControllableValue<TValue, TElement extends HTMLElement, TEvent extends React_2.SyntheticEvent<TElement> | undefined>(controlledValue: TValue, defaultUncontrolledValue: DefaultValue<TValue>, onChange: ChangeCallback<TElement, TValue, TEvent>): Readonly<[TValue, (update: React_2.SetStateAction<TValue>, ev?: React_2.FormEvent<TElement>) => void]>;

@@ -451,3 +485,3 @@ /**

*/
export declare function useDescendant<DescendantType extends Descendant>(descendant: Omit<DescendantType, 'index'>, context: React.Context<DescendantContextValue<DescendantType>>, indexProp?: number): number;
export declare function useDescendant<DescendantType extends Descendant>(descendant: Omit<DescendantType, 'index'>, context: React_2.Context<DescendantContextValue<DescendantType>>, indexProp?: number): number;

@@ -465,3 +499,3 @@ /**

*/
export declare function useDescendantKeyDown<DescendantType extends Descendant, K extends keyof DescendantType = keyof DescendantType>(context: React.Context<DescendantContextValue<DescendantType>>, options: {
export declare function useDescendantKeyDown<DescendantType extends Descendant, K extends keyof DescendantType = keyof DescendantType>(context: React_2.Context<DescendantContextValue<DescendantType>>, options: {
currentIndex: number | null | undefined;

@@ -474,7 +508,7 @@ key?: K | 'option';

callback(nextOption: DescendantType | DescendantType[K]): void;
}): (event: React.KeyboardEvent<Element>) => void;
}): (event: React_2.KeyboardEvent) => void;
export declare function useDescendants<DescendantType extends Descendant>(ctx: React.Context<DescendantContextValue<DescendantType>>): DescendantType[];
export declare function useDescendants<DescendantType extends Descendant>(ctx: React_2.Context<DescendantContextValue<DescendantType>>): DescendantType[];
export declare function useDescendantsInit<DescendantType extends Descendant>(): [DescendantType[], React.Dispatch<React.SetStateAction<DescendantType[]>>];
export declare function useDescendantsInit<DescendantType extends Descendant>(): [DescendantType[], React_2.Dispatch<React_2.SetStateAction<DescendantType[]>>];

@@ -513,3 +547,3 @@ /**

/**
* Hook to generate a unique ID in the global scope (spanning across duplicate copies of the same library).
* Hook to generate a unique ID.
*

@@ -532,5 +566,11 @@ * @param prefix - Optional prefix for the ID

*/
export declare const useIsomorphicLayoutEffect: typeof React.useEffect;
export declare const useIsomorphicLayoutEffect: typeof React_2.useEffect;
/**
* Returns whether the component is currently being server side rendered or hydrated on the client. Can be used to delay
* browser-specific rendering until after hydration. May cause re-renders on a client when is used within SSRProvider.
*/
export declare function useIsSSR(): boolean;
/**
* React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that

@@ -541,3 +581,3 @@ * updates all provided refs

*/
export declare function useMergedRefs<T>(...refs: (React.Ref<T> | undefined)[]): RefObjectFunction<T>;
export declare function useMergedRefs<T>(...refs: (React_2.Ref<T> | undefined)[]): RefObjectFunction<T>;

@@ -557,3 +597,3 @@ /**

*/
refs: React.MutableRefObject<HTMLElement | undefined | null>[];
refs: React_2.MutableRefObject<HTMLElement | undefined | null>[];
/**

@@ -568,2 +608,7 @@ * Called if the click is outside the element refs

/**
* @internal
*/
export declare function useSSRContext(): SSRContextValue;
/**
* An array of VIDEO tag properties and events.

@@ -570,0 +615,0 @@ *

@@ -7,3 +7,3 @@ ## API Report File for "@fluentui/react-utilities"

import * as React from 'react';
import * as React_2 from 'react';

@@ -25,3 +25,3 @@ // @public

// (undocumented)
root: React.ElementType;
root: React_2.ElementType;
}

@@ -32,4 +32,7 @@

// @public
export function canUseDOM(): boolean;
// @public (undocumented)
export type ChangeCallback<TElement extends HTMLElement, TValue, TEvent extends React.SyntheticEvent<TElement> | undefined> = (ev: TEvent, newValue: TValue | undefined) => void;
export type ChangeCallback<TElement extends HTMLElement, TValue, TEvent extends React_2.SyntheticEvent<TElement> | undefined> = (ev: TEvent, newValue: TValue | undefined) => void;

@@ -48,5 +51,5 @@ // @public

// (undocumented)
as?: React.ElementType;
as?: React_2.ElementType;
// (undocumented)
children?: React.ReactNode;
children?: React_2.ReactNode;
// (undocumented)

@@ -58,3 +61,3 @@ className?: string;

export type ComponentState<RefType, Props, ShorthandProps extends keyof Props = never, DefaultedProps extends keyof ResolvedShorthandProps<Props, ShorthandProps> = never> = RequiredProps<ResolvedShorthandProps<Props, ShorthandProps>, DefaultedProps> & {
as?: React.ElementType;
as?: React_2.ElementType;
ref: RefType;

@@ -64,7 +67,12 @@ };

// @public (undocumented)
export function createDescendantContext<DescendantType extends Descendant>(name: string, initialValue?: {}): React.Context<DescendantContextValue<DescendantType>>;
export function createDescendantContext<DescendantType extends Descendant>(name: string, initialValue?: {}): React_2.Context<DescendantContextValue<DescendantType>>;
// @public (undocumented)
export function createNamedContext<ContextValueType>(name: string, defaultValue: ContextValueType): React.Context<ContextValueType>;
export function createNamedContext<ContextValueType>(name: string, defaultValue: ContextValueType): React_2.Context<ContextValueType>;
// Warning: (ae-internal-missing-underscore) The name "defaultSSRContextValue" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export const defaultSSRContextValue: SSRContextValue;
// @public (undocumented)

@@ -88,6 +96,6 @@ export type Descendant<ElementType = HTMLElement> = {

export const DescendantProvider: <DescendantType extends Descendant<HTMLElement>>({ context: Ctx, children, items, set, }: {
context: React.Context<DescendantContextValue<DescendantType>>;
children: React.ReactNode;
context: React_2.Context<DescendantContextValue<DescendantType>>;
children: React_2.ReactNode;
items: DescendantType[];
set: React.Dispatch<React.SetStateAction<DescendantType[]>>;
set: React_2.Dispatch<React_2.SetStateAction<DescendantType[]>>;
}) => JSX.Element;

@@ -105,3 +113,3 @@

// @public
export function getNativeElementProps<TAttributes extends React.HTMLAttributes<any>>(tagName: string, props: {}, excludedPropNames?: string[]): TAttributes;
export function getNativeElementProps<TAttributes extends React_2.HTMLAttributes<any>>(tagName: string, props: {}, excludedPropNames?: string[]): TAttributes;

@@ -112,3 +120,3 @@ // @public

// @public
export const getSlots: (state: Record<string, any>, slotNames?: readonly string[] | undefined) => {
export const getSlots: (state: GenericDictionary, slotNames?: readonly string[] | undefined) => {
slots: Record<string, any>;

@@ -134,5 +142,2 @@ slotProps: Record<string, any>;

// @public
export function isSSR(): boolean;
// @public
export const labelProperties: Record<string, number>;

@@ -147,3 +152,3 @@

// @public @deprecated
export const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: Record<string, any>, ...propSets: (Record<string, any> | undefined)[]) => TState;
export const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: GenericDictionary, ...propSets: (GenericDictionary | undefined)[]) => TState;

@@ -173,3 +178,3 @@ // @public (undocumented)

// @public
export type RefObjectFunction<T> = React.RefObject<T> & ((value: T) => void);
export type RefObjectFunction<T> = React_2.RefObject<T> & ((value: T) => void);

@@ -182,2 +187,5 @@ // @public

// @public
export function resetIdsForTests(): void;
// @public
export type ResolvedShorthandProps<T, K extends keyof T> = Omit<T, K> & {

@@ -194,12 +202,12 @@ [P in K]: T[P] extends ShorthandProps<infer U> ? ObjectShorthandProps<U> : T[P];

// @public (undocumented)
export type ShorthandProps<TProps extends ComponentProps = {}> = React.ReactChild | React.ReactNodeArray | React.ReactPortal | boolean | number | null | undefined | ObjectShorthandProps<TProps>;
export type ShorthandProps<TProps extends ComponentProps = {}> = React_2.ReactChild | React_2.ReactNodeArray | React_2.ReactPortal | boolean | number | null | undefined | ObjectShorthandProps<TProps>;
// @public (undocumented)
export type ShorthandRenderFunction<TProps> = (Component: React.ElementType<TProps>, props: TProps) => React.ReactNode;
export type ShorthandRenderFunction<TProps> = (Component: React_2.ElementType<TProps>, props: TProps) => React_2.ReactNode;
// @public
export function shouldPreventDefaultOnKeyDown(e: KeyboardEvent | React.KeyboardEvent): boolean;
export function shouldPreventDefaultOnKeyDown(e: KeyboardEvent | React_2.KeyboardEvent): boolean;
// @public (undocumented)
export type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React.HTMLAttributes<HTMLElement>> = {
export type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React_2.HTMLAttributes<HTMLElement>> = {
[key in keyof Omit<TSlots, 'root'>]: key extends keyof TProps ? TProps[key] : any;

@@ -210,3 +218,19 @@ } & {

// Warning: (ae-incompatible-release-tags) The symbol "SSRContext" is marked as @public, but its signature references "SSRContextValue" which is marked as @internal
//
// @public (undocumented)
export const SSRContext: React_2.Context<SSRContextValue>;
// Warning: (ae-internal-missing-underscore) The name "SSRContextValue" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export interface SSRContextValue {
// (undocumented)
current: number;
}
// @public
export const SSRProvider: React_2.FC;
// @public
export const tableProperties: Record<string, number>;

@@ -242,12 +266,12 @@

// @public
export function useControllableValue<TValue, TElement extends HTMLElement>(controlledValue: TValue, defaultUncontrolledValue: DefaultValue<TValue>): Readonly<[TValue, (update: React.SetStateAction<TValue>) => void]>;
export function useControllableValue<TValue, TElement extends HTMLElement>(controlledValue: TValue, defaultUncontrolledValue: DefaultValue<TValue>): Readonly<[TValue, (update: React_2.SetStateAction<TValue>) => void]>;
// @public (undocumented)
export function useControllableValue<TValue, TElement extends HTMLElement, TEvent extends React.SyntheticEvent<TElement> | undefined>(controlledValue: TValue, defaultUncontrolledValue: DefaultValue<TValue>, onChange: ChangeCallback<TElement, TValue, TEvent>): Readonly<[TValue, (update: React.SetStateAction<TValue>, ev?: React.FormEvent<TElement>) => void]>;
export function useControllableValue<TValue, TElement extends HTMLElement, TEvent extends React_2.SyntheticEvent<TElement> | undefined>(controlledValue: TValue, defaultUncontrolledValue: DefaultValue<TValue>, onChange: ChangeCallback<TElement, TValue, TEvent>): Readonly<[TValue, (update: React_2.SetStateAction<TValue>, ev?: React_2.FormEvent<TElement>) => void]>;
// @public
export function useDescendant<DescendantType extends Descendant>(descendant: Omit<DescendantType, 'index'>, context: React.Context<DescendantContextValue<DescendantType>>, indexProp?: number): number;
export function useDescendant<DescendantType extends Descendant>(descendant: Omit<DescendantType, 'index'>, context: React_2.Context<DescendantContextValue<DescendantType>>, indexProp?: number): number;
// @public
export function useDescendantKeyDown<DescendantType extends Descendant, K extends keyof DescendantType = keyof DescendantType>(context: React.Context<DescendantContextValue<DescendantType>>, options: {
export function useDescendantKeyDown<DescendantType extends Descendant, K extends keyof DescendantType = keyof DescendantType>(context: React_2.Context<DescendantContextValue<DescendantType>>, options: {
currentIndex: number | null | undefined;

@@ -260,9 +284,9 @@ key?: K | 'option';

callback(nextOption: DescendantType | DescendantType[K]): void;
}): (event: React.KeyboardEvent<Element>) => void;
}): (event: React_2.KeyboardEvent) => void;
// @public (undocumented)
export function useDescendants<DescendantType extends Descendant>(ctx: React.Context<DescendantContextValue<DescendantType>>): DescendantType[];
export function useDescendants<DescendantType extends Descendant>(ctx: React_2.Context<DescendantContextValue<DescendantType>>): DescendantType[];
// @public (undocumented)
export function useDescendantsInit<DescendantType extends Descendant>(): [DescendantType[], React.Dispatch<React.SetStateAction<DescendantType[]>>];
export function useDescendantsInit<DescendantType extends Descendant>(): [DescendantType[], React_2.Dispatch<React_2.SetStateAction<DescendantType[]>>];

@@ -282,8 +306,11 @@ // @public

// @public
export const useIsomorphicLayoutEffect: typeof React.useEffect;
export const useIsomorphicLayoutEffect: typeof React_2.useEffect;
// @public
export function useMergedRefs<T>(...refs: (React.Ref<T> | undefined)[]): RefObjectFunction<T>;
export function useIsSSR(): boolean;
// @public
export function useMergedRefs<T>(...refs: (React_2.Ref<T> | undefined)[]): RefObjectFunction<T>;
// @public
export const useOnClickOutside: (options: UseOnClickOutsideOptions) => void;

@@ -294,3 +321,3 @@

element: Document | undefined;
refs: React.MutableRefObject<HTMLElement | undefined | null>[];
refs: React_2.MutableRefObject<HTMLElement | undefined | null>[];
callback: (ev: MouseEvent | TouchEvent) => void;

@@ -302,2 +329,7 @@ };

// Warning: (ae-internal-missing-underscore) The name "useSSRContext" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export function useSSRContext(): SSRContextValue;
// @public

@@ -304,0 +336,0 @@ export const videoProperties: Record<string, number>;

@@ -0,1 +1,2 @@

import { GenericDictionary } from './types';
/**

@@ -17,5 +18,5 @@ * Given the state and an array of slot names, will break out `slots` and `slotProps`

*/
export declare const getSlots: (state: Record<string, any>, slotNames?: readonly string[] | undefined) => {
export declare const getSlots: (state: GenericDictionary, slotNames?: readonly string[] | undefined) => {
slots: Record<string, any>;
slotProps: Record<string, any>;
};
define(["require", "exports", "react", "../utils/index", "./nullRender"], function (require, exports, React, index_1, nullRender_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSlots = void 0;
/**

@@ -20,3 +21,3 @@ * Given the state and an array of slot names, will break out `slots` and `slotProps`

*/
exports.getSlots = function (state, slotNames) {
var getSlots = function (state, slotNames) {
var slots = {

@@ -51,3 +52,4 @@ root: state.as || 'div',

};
exports.getSlots = getSlots;
});
//# sourceMappingURL=getSlots.js.map

@@ -1,2 +0,2 @@

define(["require", "exports", "tslib", "./getSlots", "./makeMergeProps", "./makeMergePropsCompat", "./nullRender", "./resolveShorthandProps"], function (require, exports, tslib_1, getSlots_1, makeMergeProps_1, makeMergePropsCompat_1, nullRender_1, resolveShorthandProps_1) {
define(["require", "exports", "tslib", "./getSlots", "./makeMergeProps", "./makeMergePropsCompat", "./nullRender", "./resolveShorthandProps", "./types"], function (require, exports, tslib_1, getSlots_1, makeMergeProps_1, makeMergePropsCompat_1, nullRender_1, resolveShorthandProps_1, types_1) {
"use strict";

@@ -9,3 +9,4 @@ Object.defineProperty(exports, "__esModule", { value: true });

tslib_1.__exportStar(resolveShorthandProps_1, exports);
tslib_1.__exportStar(types_1, exports);
});
//# sourceMappingURL=index.js.map
define(["require", "exports", "tslib", "react"], function (require, exports, tslib_1, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeMergeProps = void 0;
/**

@@ -44,3 +45,3 @@ * Concatination helper, which can merge class names together. Skips over falsey values.

*/
exports.makeMergeProps = function (options) {
var makeMergeProps = function (options) {
if (options === void 0) { options = {}; }

@@ -98,3 +99,4 @@ var deepMerge = tslib_1.__spreadArrays((options.deepMerge || []), ['style']);

};
exports.makeMergeProps = makeMergeProps;
});
//# sourceMappingURL=makeMergeProps.js.map
import { MergePropsOptions } from './makeMergeProps';
import { GenericDictionary } from './types';
/**

@@ -7,2 +8,2 @@ * Backwards-compatible version of makeMergeProps that has less restrictive type checking

*/
export declare const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: Record<string, any>, ...propSets: (Record<string, any> | undefined)[]) => TState;
export declare const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: GenericDictionary, ...propSets: (GenericDictionary | undefined)[]) => TState;
define(["require", "exports", "./makeMergeProps"], function (require, exports, makeMergeProps_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeMergePropsCompat = void 0;
/**

@@ -5,0 +6,0 @@ * Backwards-compatible version of makeMergeProps that has less restrictive type checking

define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.nullRender = void 0;
/**
* Simple constant function for returning null, used to render empty templates in JSX.
*/
exports.nullRender = function () { return null; };
var nullRender = function () { return null; };
exports.nullRender = nullRender;
});
//# sourceMappingURL=nullRender.js.map
define(["require", "exports", "tslib", "react"], function (require, exports, tslib_1, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveShorthandProps = void 0;
/**

@@ -10,3 +11,3 @@ * Ensures that the given slots are represented using object syntax. This ensures that

*/
exports.resolveShorthandProps = function (props, shorthandPropNames) {
var resolveShorthandProps = function (props, shorthandPropNames) {
var newProps = props;

@@ -25,3 +26,4 @@ for (var _i = 0, shorthandPropNames_1 = shorthandPropNames; _i < shorthandPropNames_1.length; _i++) {

};
exports.resolveShorthandProps = resolveShorthandProps;
});
//# sourceMappingURL=resolveShorthandProps.js.map

@@ -61,3 +61,3 @@ /**

callback(nextOption: DescendantType | DescendantType[K]): void;
}): (event: React.KeyboardEvent<Element>) => void;
}): (event: React.KeyboardEvent) => void;
declare type SomeElement<T> = T extends Element ? T : HTMLElement;

@@ -64,0 +64,0 @@ export declare type Descendant<ElementType = HTMLElement> = {

@@ -11,2 +11,3 @@ /**

Object.defineProperty(exports, "__esModule", { value: true });
exports.createNamedContext = exports.useForceUpdate = exports.useDescendantKeyDown = exports.DescendantProvider = exports.useDescendants = exports.useDescendantsInit = exports.useDescendant = exports.createDescendantContext = void 0;
function createDescendantContext(name, initialValue) {

@@ -53,3 +54,3 @@ if (initialValue === void 0) { initialValue = {}; }

// collection.
var index = (indexProp !== null && indexProp !== void 0 ? indexProp : polyfills_1.arrayFindIndex(descendants, function (item) { return item.element === descendant.element; }));
var index = indexProp !== null && indexProp !== void 0 ? indexProp : polyfills_1.arrayFindIndex(descendants, function (item) { return item.element === descendant.element; });
var previousDescendants = index_1.usePrevious(descendants);

@@ -61,4 +62,4 @@ // We also need to re-register descendants any time ANY of the other

var someDescendantsHaveChanged = descendants.some(function (nextDescendant, i) {
var _a, _b;
return nextDescendant.element !== ((_b = (_a = previousDescendants) === null || _a === void 0 ? void 0 : _a[i]) === null || _b === void 0 ? void 0 : _b.element);
var _a;
return nextDescendant.element !== ((_a = previousDescendants === null || previousDescendants === void 0 ? void 0 : previousDescendants[i]) === null || _a === void 0 ? void 0 : _a.element);
});

@@ -193,3 +194,3 @@ // Prevent any flashing

var callback = options.callback, currentIndex = options.currentIndex, filter = options.filter, _a = options.key, key = _a === void 0 ? 'index' : _a, _b = options.orientation, orientation = _b === void 0 ? 'vertical' : _b, _c = options.rotate, rotate = _c === void 0 ? true : _c, _d = options.rtl, rtl = _d === void 0 ? false : _d;
var index = (currentIndex !== null && currentIndex !== void 0 ? currentIndex : -1);
var index = currentIndex !== null && currentIndex !== void 0 ? currentIndex : -1;
return function handleKeyDown(event) {

@@ -196,0 +197,0 @@ if (!polyfills_1.arrayIncludes(['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'PageUp', 'PageDown', 'Home', 'End'], event.key)) {

@@ -10,2 +10,3 @@ /**

Object.defineProperty(exports, "__esModule", { value: true });
exports.objectValues = exports.arrayIncludes = exports.arrayFindIndex = exports.arrayFind = void 0;
function arrayFind(array, predicate) {

@@ -12,0 +13,0 @@ // eslint-disable-next-line eqeqeq

@@ -6,3 +6,3 @@ export * from './useBoolean';

export * from './useFirstMount';
export { useId } from './useId';
export * from './useId';
export * from './useIsomorphicLayoutEffect';

@@ -9,0 +9,0 @@ export * from './useMergedRefs';

@@ -9,3 +9,3 @@ define(["require", "exports", "tslib", "./useBoolean", "./useConst", "./useControllableValue", "./useEventCallback", "./useFirstMount", "./useId", "./useIsomorphicLayoutEffect", "./useMergedRefs", "./useOnClickOutside", "./usePrevious"], function (require, exports, tslib_1, useBoolean_1, useConst_1, useControllableValue_1, useEventCallback_1, useFirstMount_1, useId_1, useIsomorphicLayoutEffect_1, useMergedRefs_1, useOnClickOutside_1, usePrevious_1) {

tslib_1.__exportStar(useFirstMount_1, exports);
exports.useId = useId_1.useId;
tslib_1.__exportStar(useId_1, exports);
tslib_1.__exportStar(useIsomorphicLayoutEffect_1, exports);

@@ -12,0 +12,0 @@ tslib_1.__exportStar(useMergedRefs_1, exports);

define(["require", "exports", "react", "./useConst"], function (require, exports, React, useConst_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useBoolean = void 0;
/**

@@ -5,0 +6,0 @@ * Hook to store a value and generate callbacks for setting the value to true or false.

define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useConst = void 0;
/**

@@ -5,0 +6,0 @@ * Hook to initialize and return a constant value. Unlike `React.useMemo`, this is guaranteed to

define(["require", "exports", "react", "./useConst"], function (require, exports, React, useConst_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useControllableValue = void 0;
function useControllableValue(controlledValue, defaultUncontrolledValue, onChange) {

@@ -5,0 +6,0 @@ var _a = React.useState(defaultUncontrolledValue), value = _a[0], setValue = _a[1];

define(["require", "exports", "react", "./useIsomorphicLayoutEffect"], function (require, exports, React, useIsomorphicLayoutEffect_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useEventCallback = void 0;
/**

@@ -16,3 +17,3 @@ * https://reactjs.org/docs/hooks-faq.html#how-to-read-an-often-changing-value-from-usecallback

*/
exports.useEventCallback = function (fn) {
var useEventCallback = function (fn) {
var callbackRef = React.useRef(function () {

@@ -33,3 +34,4 @@ throw new Error('Cannot call an event handler while rendering');

};
exports.useEventCallback = useEventCallback;
});
//# sourceMappingURL=useEventCallback.js.map
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useFirstMount = void 0;
/**

@@ -5,0 +6,0 @@ * Checks if components was mounted the first time.

@@ -1,6 +0,10 @@

export declare function getId(prefix?: string): string;
export declare function resetIds(): void;
/**
* Hook to generate a unique ID in the global scope (spanning across duplicate copies of the same library).
* Resets generated IDs, should be used only in tests.
*
* @private
*/
export declare function resetIdsForTests(): void;
/**
* Hook to generate a unique ID.
*
* @param prefix - Optional prefix for the ID

@@ -7,0 +11,0 @@ * @param providedId - Optional id provided by a parent component. Defaults to the provided value if present,

@@ -1,18 +0,16 @@

define(["require", "exports", "react"], function (require, exports, React) {
define(["require", "exports", "react", "../ssr/index"], function (require, exports, React, index_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// TODO
// getId() is a temporary approach, useId() should be reimplemented to properly support SSR & scenarios with
// different globals (document, window)
var id = 0;
function getId(prefix) {
return (prefix || '') + id++;
exports.useId = exports.resetIdsForTests = void 0;
/**
* Resets generated IDs, should be used only in tests.
*
* @private
*/
function resetIdsForTests() {
index_1.defaultSSRContextValue.current = 0;
}
exports.getId = getId;
function resetIds() {
id = 0;
}
exports.resetIds = resetIds;
exports.resetIdsForTests = resetIdsForTests;
/**
* Hook to generate a unique ID in the global scope (spanning across duplicate copies of the same library).
* Hook to generate a unique ID.
*

@@ -25,9 +23,4 @@ * @param prefix - Optional prefix for the ID

function useId(prefix, providedId) {
// getId should only be called once since it updates the global constant for the next ID value.
// (While an extra update isn't likely to cause problems in practice, it's better to avoid it.)
var ref = React.useRef(providedId);
if (!ref.current) {
ref.current = getId(prefix);
}
return ref.current;
var contextValue = index_1.useSSRContext();
return React.useMemo(function () { return providedId || "" + prefix + ++contextValue.current; }, [prefix, providedId, contextValue]);
}

@@ -34,0 +27,0 @@ exports.useId = useId;

@@ -1,4 +0,5 @@

define(["require", "exports", "react", "../utils/index"], function (require, exports, React, index_1) {
define(["require", "exports", "react", "../ssr/index"], function (require, exports, React, index_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useIsomorphicLayoutEffect = void 0;
/**

@@ -14,4 +15,4 @@ * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally

// eslint-disable-next-line no-restricted-properties
exports.useIsomorphicLayoutEffect = index_1.isSSR() ? React.useEffect : React.useLayoutEffect;
exports.useIsomorphicLayoutEffect = index_1.canUseDOM() ? React.useLayoutEffect : React.useEffect;
});
//# sourceMappingURL=useIsomorphicLayoutEffect.js.map
define(["require", "exports", "tslib", "react"], function (require, exports, tslib_1, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useMergedRefs = void 0;
/**

@@ -5,0 +6,0 @@ * React hook to merge multiple React refs (either MutableRefObjects or ref callbacks) into a single ref callback that

define(["require", "exports", "react", "./useEventCallback"], function (require, exports, React, useEventCallback_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useOnClickOutside = void 0;
/**
* Utility to perform checks where a click/touch event was made outside a compoent
*/
exports.useOnClickOutside = function (options) {
var useOnClickOutside = function (options) {
var refs = options.refs, callback = options.callback, element = options.element;

@@ -16,13 +17,12 @@ var listener = useEventCallback_1.useEventCallback(function (ev) {

React.useEffect(function () {
var _a, _b;
(_a = element) === null || _a === void 0 ? void 0 : _a.addEventListener('click', listener);
(_b = element) === null || _b === void 0 ? void 0 : _b.addEventListener('touchstart', listener);
element === null || element === void 0 ? void 0 : element.addEventListener('click', listener);
element === null || element === void 0 ? void 0 : element.addEventListener('touchstart', listener);
return function () {
var _a, _b;
(_a = element) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', listener);
(_b = element) === null || _b === void 0 ? void 0 : _b.removeEventListener('touchstart', listener);
element === null || element === void 0 ? void 0 : element.removeEventListener('click', listener);
element === null || element === void 0 ? void 0 : element.removeEventListener('touchstart', listener);
};
}, [listener, element]);
};
exports.useOnClickOutside = useOnClickOutside;
});
//# sourceMappingURL=useOnClickOutside.js.map
define(["require", "exports", "react"], function (require, exports, React) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.usePrevious = function (value) {
exports.usePrevious = void 0;
var usePrevious = function (value) {
var ref = React.useRef(null);

@@ -11,3 +12,4 @@ React.useEffect(function () {

};
exports.usePrevious = usePrevious;
});
//# sourceMappingURL=usePrevious.js.map
export * from './compose/index';
export * from './descendants/index';
export * from './hooks/index';
export * from './ssr/index';
export * from './utils/index';

@@ -1,2 +0,2 @@

define(["require", "exports", "tslib", "./compose/index", "./descendants/index", "./hooks/index", "./utils/index"], function (require, exports, tslib_1, index_1, index_2, index_3, index_4) {
define(["require", "exports", "tslib", "./compose/index", "./descendants/index", "./hooks/index", "./ssr/index", "./utils/index"], function (require, exports, tslib_1, index_1, index_2, index_3, index_4, index_5) {
"use strict";

@@ -8,3 +8,4 @@ Object.defineProperty(exports, "__esModule", { value: true });

tslib_1.__exportStar(index_4, exports);
tslib_1.__exportStar(index_5, exports);
});
//# sourceMappingURL=index.js.map
define(["require", "exports", "./properties"], function (require, exports, properties_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNativeElementProps = void 0;
var nativeElementMap = {

@@ -5,0 +6,0 @@ label: properties_1.labelProperties,

@@ -5,2 +5,1 @@ export * from './getNativeElementProps';

export * from './shouldPreventDefaultOnKeyDown';
export * from './isSSR';

@@ -1,2 +0,2 @@

define(["require", "exports", "tslib", "./getNativeElementProps", "./omit", "./properties", "./shouldPreventDefaultOnKeyDown", "./isSSR"], function (require, exports, tslib_1, getNativeElementProps_1, omit_1, properties_1, shouldPreventDefaultOnKeyDown_1, isSSR_1) {
define(["require", "exports", "tslib", "./getNativeElementProps", "./omit", "./properties", "./shouldPreventDefaultOnKeyDown"], function (require, exports, tslib_1, getNativeElementProps_1, omit_1, properties_1, shouldPreventDefaultOnKeyDown_1) {
"use strict";

@@ -8,4 +8,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

tslib_1.__exportStar(shouldPreventDefaultOnKeyDown_1, exports);
tslib_1.__exportStar(isSSR_1, exports);
});
//# sourceMappingURL=index.js.map
define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.omit = void 0;
/**

@@ -5,0 +6,0 @@ * Tiny helper to do the minimal amount of work in duplicating an object but omitting some

define(["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNativeProps = exports.divProperties = exports.imageProperties = exports.imgProperties = exports.iframeProperties = exports.formProperties = exports.colProperties = exports.colGroupProperties = exports.tdProperties = exports.thProperties = exports.trProperties = exports.tableProperties = exports.optionProperties = exports.selectProperties = exports.textAreaProperties = exports.inputProperties = exports.buttonProperties = exports.anchorProperties = exports.liProperties = exports.olProperties = exports.videoProperties = exports.audioProperties = exports.labelProperties = exports.htmlElementProperties = exports.baseElementProperties = exports.baseElementEvents = void 0;
var toObjectMap = function () {

@@ -396,3 +397,2 @@ var items = [];

// We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797
var _a;
var isArray = Array.isArray(allowedPropNames);

@@ -408,3 +408,3 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any

key.indexOf('aria-') === 0;
if (isNativeProp && (!excludedPropNames || ((_a = excludedPropNames) === null || _a === void 0 ? void 0 : _a.indexOf(key)) === -1)) {
if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any

@@ -411,0 +411,0 @@ result[key] = props[key];

define(["require", "exports", "@fluentui/keyboard-key"], function (require, exports, keyboard_key_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldPreventDefaultOnKeyDown = void 0;
/**

@@ -10,10 +11,9 @@ * Checks if the keyboard event should preventDefault() for Enter and Spacebar keys

function shouldPreventDefaultOnKeyDown(e) {
var _a, _b, _c, _d;
var code = keyboard_key_1.getCode(e);
var target = e.target;
var matchesByKey = code === keyboard_key_1.SpacebarKey || code === keyboard_key_1.EnterKey;
if (((_a = target) === null || _a === void 0 ? void 0 : _a.tagName) === 'A') {
if ((target === null || target === void 0 ? void 0 : target.tagName) === 'A') {
return code === keyboard_key_1.SpacebarKey;
}
var ignoredByTag = ((_b = target) === null || _b === void 0 ? void 0 : _b.tagName) === 'INPUT' || ((_c = target) === null || _c === void 0 ? void 0 : _c.tagName) === 'TEXTAREA' || ((_d = target) === null || _d === void 0 ? void 0 : _d.isContentEditable) === true;
var ignoredByTag = (target === null || target === void 0 ? void 0 : target.tagName) === 'INPUT' || (target === null || target === void 0 ? void 0 : target.tagName) === 'TEXTAREA' || (target === null || target === void 0 ? void 0 : target.isContentEditable) === true;
return matchesByKey && !ignoredByTag;

@@ -20,0 +20,0 @@ }

@@ -0,1 +1,2 @@

import { GenericDictionary } from './types';
/**

@@ -17,5 +18,5 @@ * Given the state and an array of slot names, will break out `slots` and `slotProps`

*/
export declare const getSlots: (state: Record<string, any>, slotNames?: readonly string[] | undefined) => {
export declare const getSlots: (state: GenericDictionary, slotNames?: readonly string[] | undefined) => {
slots: Record<string, any>;
slotProps: Record<string, any>;
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSlots = void 0;
var React = require("react");

@@ -22,3 +23,3 @@ var index_1 = require("../utils/index");

*/
exports.getSlots = function (state, slotNames) {
var getSlots = function (state, slotNames) {
var slots = {

@@ -53,2 +54,3 @@ root: state.as || 'div',

};
exports.getSlots = getSlots;
//# sourceMappingURL=getSlots.js.map

@@ -9,2 +9,3 @@ "use strict";

tslib_1.__exportStar(require("./resolveShorthandProps"), exports);
tslib_1.__exportStar(require("./types"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeMergeProps = void 0;
var tslib_1 = require("tslib");

@@ -45,3 +46,3 @@ var React = require("react");

*/
exports.makeMergeProps = function (options) {
var makeMergeProps = function (options) {
if (options === void 0) { options = {}; }

@@ -99,2 +100,3 @@ var deepMerge = tslib_1.__spreadArrays((options.deepMerge || []), ['style']);

};
exports.makeMergeProps = makeMergeProps;
//# sourceMappingURL=makeMergeProps.js.map
import { MergePropsOptions } from './makeMergeProps';
import { GenericDictionary } from './types';
/**

@@ -7,2 +8,2 @@ * Backwards-compatible version of makeMergeProps that has less restrictive type checking

*/
export declare const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: Record<string, any>, ...propSets: (Record<string, any> | undefined)[]) => TState;
export declare const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: GenericDictionary, ...propSets: (GenericDictionary | undefined)[]) => TState;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeMergePropsCompat = void 0;
var makeMergeProps_1 = require("./makeMergeProps");

@@ -4,0 +5,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.nullRender = void 0;
/**
* Simple constant function for returning null, used to render empty templates in JSX.
*/
exports.nullRender = function () { return null; };
var nullRender = function () { return null; };
exports.nullRender = nullRender;
//# sourceMappingURL=nullRender.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveShorthandProps = void 0;
var tslib_1 = require("tslib");

@@ -11,3 +12,3 @@ var React = require("react");

*/
exports.resolveShorthandProps = function (props, shorthandPropNames) {
var resolveShorthandProps = function (props, shorthandPropNames) {
var newProps = props;

@@ -26,2 +27,3 @@ for (var _i = 0, shorthandPropNames_1 = shorthandPropNames; _i < shorthandPropNames_1.length; _i++) {

};
exports.resolveShorthandProps = resolveShorthandProps;
//# sourceMappingURL=resolveShorthandProps.js.map

@@ -61,3 +61,3 @@ /**

callback(nextOption: DescendantType | DescendantType[K]): void;
}): (event: React.KeyboardEvent<Element>) => void;
}): (event: React.KeyboardEvent) => void;
declare type SomeElement<T> = T extends Element ? T : HTMLElement;

@@ -64,0 +64,0 @@ export declare type Descendant<ElementType = HTMLElement> = {

@@ -10,2 +10,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.createNamedContext = exports.useForceUpdate = exports.useDescendantKeyDown = exports.DescendantProvider = exports.useDescendants = exports.useDescendantsInit = exports.useDescendant = exports.createDescendantContext = void 0;
var tslib_1 = require("tslib");

@@ -56,3 +57,3 @@ var React = require("react");

// collection.
var index = (indexProp !== null && indexProp !== void 0 ? indexProp : polyfills_1.arrayFindIndex(descendants, function (item) { return item.element === descendant.element; }));
var index = indexProp !== null && indexProp !== void 0 ? indexProp : polyfills_1.arrayFindIndex(descendants, function (item) { return item.element === descendant.element; });
var previousDescendants = index_1.usePrevious(descendants);

@@ -64,4 +65,4 @@ // We also need to re-register descendants any time ANY of the other

var someDescendantsHaveChanged = descendants.some(function (nextDescendant, i) {
var _a, _b;
return nextDescendant.element !== ((_b = (_a = previousDescendants) === null || _a === void 0 ? void 0 : _a[i]) === null || _b === void 0 ? void 0 : _b.element);
var _a;
return nextDescendant.element !== ((_a = previousDescendants === null || previousDescendants === void 0 ? void 0 : previousDescendants[i]) === null || _a === void 0 ? void 0 : _a.element);
});

@@ -196,3 +197,3 @@ // Prevent any flashing

var callback = options.callback, currentIndex = options.currentIndex, filter = options.filter, _a = options.key, key = _a === void 0 ? 'index' : _a, _b = options.orientation, orientation = _b === void 0 ? 'vertical' : _b, _c = options.rotate, rotate = _c === void 0 ? true : _c, _d = options.rtl, rtl = _d === void 0 ? false : _d;
var index = (currentIndex !== null && currentIndex !== void 0 ? currentIndex : -1);
var index = currentIndex !== null && currentIndex !== void 0 ? currentIndex : -1;
return function handleKeyDown(event) {

@@ -199,0 +200,0 @@ if (!polyfills_1.arrayIncludes(['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'PageUp', 'PageDown', 'Home', 'End'], event.key)) {

@@ -9,2 +9,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.objectValues = exports.arrayIncludes = exports.arrayFindIndex = exports.arrayFind = void 0;
function arrayFind(array, predicate) {

@@ -11,0 +12,0 @@ // eslint-disable-next-line eqeqeq

@@ -6,3 +6,3 @@ export * from './useBoolean';

export * from './useFirstMount';
export { useId } from './useId';
export * from './useId';
export * from './useIsomorphicLayoutEffect';

@@ -9,0 +9,0 @@ export * from './useMergedRefs';

@@ -9,4 +9,3 @@ "use strict";

tslib_1.__exportStar(require("./useFirstMount"), exports);
var useId_1 = require("./useId");
exports.useId = useId_1.useId;
tslib_1.__exportStar(require("./useId"), exports);
tslib_1.__exportStar(require("./useIsomorphicLayoutEffect"), exports);

@@ -13,0 +12,0 @@ tslib_1.__exportStar(require("./useMergedRefs"), exports);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useBoolean = void 0;
var React = require("react");

@@ -4,0 +5,0 @@ var useConst_1 = require("./useConst");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useConst = void 0;
var React = require("react");

@@ -4,0 +5,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useControllableValue = void 0;
var React = require("react");

@@ -4,0 +5,0 @@ var useConst_1 = require("./useConst");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useEventCallback = void 0;
var React = require("react");

@@ -17,3 +18,3 @@ var useIsomorphicLayoutEffect_1 = require("./useIsomorphicLayoutEffect");

*/
exports.useEventCallback = function (fn) {
var useEventCallback = function (fn) {
var callbackRef = React.useRef(function () {

@@ -34,2 +35,3 @@ throw new Error('Cannot call an event handler while rendering');

};
exports.useEventCallback = useEventCallback;
//# sourceMappingURL=useEventCallback.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useFirstMount = void 0;
var React = require("react");

@@ -4,0 +5,0 @@ /**

@@ -1,6 +0,10 @@

export declare function getId(prefix?: string): string;
export declare function resetIds(): void;
/**
* Hook to generate a unique ID in the global scope (spanning across duplicate copies of the same library).
* Resets generated IDs, should be used only in tests.
*
* @private
*/
export declare function resetIdsForTests(): void;
/**
* Hook to generate a unique ID.
*
* @param prefix - Optional prefix for the ID

@@ -7,0 +11,0 @@ * @param providedId - Optional id provided by a parent component. Defaults to the provided value if present,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useId = exports.resetIdsForTests = void 0;
var React = require("react");
// TODO
// getId() is a temporary approach, useId() should be reimplemented to properly support SSR & scenarios with
// different globals (document, window)
var id = 0;
function getId(prefix) {
return (prefix || '') + id++;
var index_1 = require("../ssr/index");
/**
* Resets generated IDs, should be used only in tests.
*
* @private
*/
function resetIdsForTests() {
index_1.defaultSSRContextValue.current = 0;
}
exports.getId = getId;
function resetIds() {
id = 0;
}
exports.resetIds = resetIds;
exports.resetIdsForTests = resetIdsForTests;
/**
* Hook to generate a unique ID in the global scope (spanning across duplicate copies of the same library).
* Hook to generate a unique ID.
*

@@ -25,11 +24,6 @@ * @param prefix - Optional prefix for the ID

function useId(prefix, providedId) {
// getId should only be called once since it updates the global constant for the next ID value.
// (While an extra update isn't likely to cause problems in practice, it's better to avoid it.)
var ref = React.useRef(providedId);
if (!ref.current) {
ref.current = getId(prefix);
}
return ref.current;
var contextValue = index_1.useSSRContext();
return React.useMemo(function () { return providedId || "" + prefix + ++contextValue.current; }, [prefix, providedId, contextValue]);
}
exports.useId = useId;
//# sourceMappingURL=useId.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useIsomorphicLayoutEffect = void 0;
var React = require("react");
var index_1 = require("../utils/index");
var index_1 = require("../ssr/index");
/**

@@ -15,3 +16,3 @@ * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally

// eslint-disable-next-line no-restricted-properties
exports.useIsomorphicLayoutEffect = index_1.isSSR() ? React.useEffect : React.useLayoutEffect;
exports.useIsomorphicLayoutEffect = index_1.canUseDOM() ? React.useLayoutEffect : React.useEffect;
//# sourceMappingURL=useIsomorphicLayoutEffect.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useMergedRefs = void 0;
var tslib_1 = require("tslib");

@@ -4,0 +5,0 @@ var React = require("react");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useOnClickOutside = void 0;
var React = require("react");

@@ -8,3 +9,3 @@ var useEventCallback_1 = require("./useEventCallback");

*/
exports.useOnClickOutside = function (options) {
var useOnClickOutside = function (options) {
var refs = options.refs, callback = options.callback, element = options.element;

@@ -18,12 +19,11 @@ var listener = useEventCallback_1.useEventCallback(function (ev) {

React.useEffect(function () {
var _a, _b;
(_a = element) === null || _a === void 0 ? void 0 : _a.addEventListener('click', listener);
(_b = element) === null || _b === void 0 ? void 0 : _b.addEventListener('touchstart', listener);
element === null || element === void 0 ? void 0 : element.addEventListener('click', listener);
element === null || element === void 0 ? void 0 : element.addEventListener('touchstart', listener);
return function () {
var _a, _b;
(_a = element) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', listener);
(_b = element) === null || _b === void 0 ? void 0 : _b.removeEventListener('touchstart', listener);
element === null || element === void 0 ? void 0 : element.removeEventListener('click', listener);
element === null || element === void 0 ? void 0 : element.removeEventListener('touchstart', listener);
};
}, [listener, element]);
};
exports.useOnClickOutside = useOnClickOutside;
//# sourceMappingURL=useOnClickOutside.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.usePrevious = void 0;
var React = require("react");
exports.usePrevious = function (value) {
var usePrevious = function (value) {
var ref = React.useRef(null);

@@ -11,2 +12,3 @@ React.useEffect(function () {

};
exports.usePrevious = usePrevious;
//# sourceMappingURL=usePrevious.js.map
export * from './compose/index';
export * from './descendants/index';
export * from './hooks/index';
export * from './ssr/index';
export * from './utils/index';

@@ -7,3 +7,4 @@ "use strict";

tslib_1.__exportStar(require("./hooks/index"), exports);
tslib_1.__exportStar(require("./ssr/index"), exports);
tslib_1.__exportStar(require("./utils/index"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNativeElementProps = void 0;
var properties_1 = require("./properties");

@@ -4,0 +5,0 @@ var nativeElementMap = {

@@ -5,2 +5,1 @@ export * from './getNativeElementProps';

export * from './shouldPreventDefaultOnKeyDown';
export * from './isSSR';

@@ -8,3 +8,2 @@ "use strict";

tslib_1.__exportStar(require("./shouldPreventDefaultOnKeyDown"), exports);
tslib_1.__exportStar(require("./isSSR"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.omit = void 0;
/**

@@ -4,0 +5,0 @@ * Tiny helper to do the minimal amount of work in duplicating an object but omitting some

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNativeProps = exports.divProperties = exports.imageProperties = exports.imgProperties = exports.iframeProperties = exports.formProperties = exports.colProperties = exports.colGroupProperties = exports.tdProperties = exports.thProperties = exports.trProperties = exports.tableProperties = exports.optionProperties = exports.selectProperties = exports.textAreaProperties = exports.inputProperties = exports.buttonProperties = exports.anchorProperties = exports.liProperties = exports.olProperties = exports.videoProperties = exports.audioProperties = exports.labelProperties = exports.htmlElementProperties = exports.baseElementProperties = exports.baseElementEvents = void 0;
var toObjectMap = function () {

@@ -395,3 +396,2 @@ var items = [];

// We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797
var _a;
var isArray = Array.isArray(allowedPropNames);

@@ -407,3 +407,3 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any

key.indexOf('aria-') === 0;
if (isNativeProp && (!excludedPropNames || ((_a = excludedPropNames) === null || _a === void 0 ? void 0 : _a.indexOf(key)) === -1)) {
if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any

@@ -410,0 +410,0 @@ result[key] = props[key];

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.shouldPreventDefaultOnKeyDown = void 0;
var keyboard_key_1 = require("@fluentui/keyboard-key");

@@ -10,10 +11,9 @@ /**

function shouldPreventDefaultOnKeyDown(e) {
var _a, _b, _c, _d;
var code = keyboard_key_1.getCode(e);
var target = e.target;
var matchesByKey = code === keyboard_key_1.SpacebarKey || code === keyboard_key_1.EnterKey;
if (((_a = target) === null || _a === void 0 ? void 0 : _a.tagName) === 'A') {
if ((target === null || target === void 0 ? void 0 : target.tagName) === 'A') {
return code === keyboard_key_1.SpacebarKey;
}
var ignoredByTag = ((_b = target) === null || _b === void 0 ? void 0 : _b.tagName) === 'INPUT' || ((_c = target) === null || _c === void 0 ? void 0 : _c.tagName) === 'TEXTAREA' || ((_d = target) === null || _d === void 0 ? void 0 : _d.isContentEditable) === true;
var ignoredByTag = (target === null || target === void 0 ? void 0 : target.tagName) === 'INPUT' || (target === null || target === void 0 ? void 0 : target.tagName) === 'TEXTAREA' || (target === null || target === void 0 ? void 0 : target.isContentEditable) === true;
return matchesByKey && !ignoredByTag;

@@ -20,0 +20,0 @@ }

@@ -0,1 +1,2 @@

import { GenericDictionary } from './types';
/**

@@ -17,5 +18,5 @@ * Given the state and an array of slot names, will break out `slots` and `slotProps`

*/
export declare const getSlots: (state: Record<string, any>, slotNames?: readonly string[] | undefined) => {
export declare const getSlots: (state: GenericDictionary, slotNames?: readonly string[] | undefined) => {
slots: Record<string, any>;
slotProps: Record<string, any>;
};

@@ -6,2 +6,3 @@ export * from './getSlots';

export * from './resolveShorthandProps';
export * from './types';
//# sourceMappingURL=index.js.map
import { MergePropsOptions } from './makeMergeProps';
import { GenericDictionary } from './types';
/**

@@ -7,2 +8,2 @@ * Backwards-compatible version of makeMergeProps that has less restrictive type checking

*/
export declare const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: Record<string, any>, ...propSets: (Record<string, any> | undefined)[]) => TState;
export declare const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: GenericDictionary, ...propSets: (GenericDictionary | undefined)[]) => TState;

@@ -0,1 +1,2 @@

export {};
//# sourceMappingURL=types.js.map

@@ -61,3 +61,3 @@ /**

callback(nextOption: DescendantType | DescendantType[K]): void;
}): (event: React.KeyboardEvent<Element>) => void;
}): (event: React.KeyboardEvent) => void;
declare type SomeElement<T> = T extends Element ? T : HTMLElement;

@@ -64,0 +64,0 @@ export declare type Descendant<ElementType = HTMLElement> = {

@@ -52,3 +52,3 @@ /**

// collection.
var index = (indexProp !== null && indexProp !== void 0 ? indexProp : arrayFindIndex(descendants, function (item) { return item.element === descendant.element; }));
var index = indexProp !== null && indexProp !== void 0 ? indexProp : arrayFindIndex(descendants, function (item) { return item.element === descendant.element; });
var previousDescendants = usePrevious(descendants);

@@ -60,4 +60,4 @@ // We also need to re-register descendants any time ANY of the other

var someDescendantsHaveChanged = descendants.some(function (nextDescendant, i) {
var _a, _b;
return nextDescendant.element !== ((_b = (_a = previousDescendants) === null || _a === void 0 ? void 0 : _a[i]) === null || _b === void 0 ? void 0 : _b.element);
var _a;
return nextDescendant.element !== ((_a = previousDescendants === null || previousDescendants === void 0 ? void 0 : previousDescendants[i]) === null || _a === void 0 ? void 0 : _a.element);
});

@@ -189,3 +189,3 @@ // Prevent any flashing

var callback = options.callback, currentIndex = options.currentIndex, filter = options.filter, _a = options.key, key = _a === void 0 ? 'index' : _a, _b = options.orientation, orientation = _b === void 0 ? 'vertical' : _b, _c = options.rotate, rotate = _c === void 0 ? true : _c, _d = options.rtl, rtl = _d === void 0 ? false : _d;
var index = (currentIndex !== null && currentIndex !== void 0 ? currentIndex : -1);
var index = currentIndex !== null && currentIndex !== void 0 ? currentIndex : -1;
return function handleKeyDown(event) {

@@ -192,0 +192,0 @@ if (!arrayIncludes(['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'PageUp', 'PageDown', 'Home', 'End'], event.key)) {

@@ -6,3 +6,3 @@ export * from './useBoolean';

export * from './useFirstMount';
export { useId } from './useId';
export * from './useId';
export * from './useIsomorphicLayoutEffect';

@@ -9,0 +9,0 @@ export * from './useMergedRefs';

@@ -6,3 +6,3 @@ export * from './useBoolean';

export * from './useFirstMount';
export { useId } from './useId';
export * from './useId';
export * from './useIsomorphicLayoutEffect';

@@ -9,0 +9,0 @@ export * from './useMergedRefs';

@@ -1,6 +0,10 @@

export declare function getId(prefix?: string): string;
export declare function resetIds(): void;
/**
* Hook to generate a unique ID in the global scope (spanning across duplicate copies of the same library).
* Resets generated IDs, should be used only in tests.
*
* @private
*/
export declare function resetIdsForTests(): void;
/**
* Hook to generate a unique ID.
*
* @param prefix - Optional prefix for the ID

@@ -7,0 +11,0 @@ * @param providedId - Optional id provided by a parent component. Defaults to the provided value if present,

import * as React from 'react';
// TODO
// getId() is a temporary approach, useId() should be reimplemented to properly support SSR & scenarios with
// different globals (document, window)
var id = 0;
export function getId(prefix) {
return (prefix || '') + id++;
import { defaultSSRContextValue, useSSRContext } from '../ssr/index';
/**
* Resets generated IDs, should be used only in tests.
*
* @private
*/
export function resetIdsForTests() {
defaultSSRContextValue.current = 0;
}
export function resetIds() {
id = 0;
}
/**
* Hook to generate a unique ID in the global scope (spanning across duplicate copies of the same library).
* Hook to generate a unique ID.
*

@@ -21,10 +20,5 @@ * @param prefix - Optional prefix for the ID

export function useId(prefix, providedId) {
// getId should only be called once since it updates the global constant for the next ID value.
// (While an extra update isn't likely to cause problems in practice, it's better to avoid it.)
var ref = React.useRef(providedId);
if (!ref.current) {
ref.current = getId(prefix);
}
return ref.current;
var contextValue = useSSRContext();
return React.useMemo(function () { return providedId || "" + prefix + ++contextValue.current; }, [prefix, providedId, contextValue]);
}
//# sourceMappingURL=useId.js.map
import * as React from 'react';
import { isSSR } from '../utils/index';
import { canUseDOM } from '../ssr/index';
/**

@@ -13,3 +13,3 @@ * React currently throws a warning when using useLayoutEffect on the server. To get around it, we can conditionally

// eslint-disable-next-line no-restricted-properties
export var useIsomorphicLayoutEffect = isSSR() ? React.useEffect : React.useLayoutEffect;
export var useIsomorphicLayoutEffect = canUseDOM() ? React.useLayoutEffect : React.useEffect;
//# sourceMappingURL=useIsomorphicLayoutEffect.js.map

@@ -15,9 +15,7 @@ import * as React from 'react';

React.useEffect(function () {
var _a, _b;
(_a = element) === null || _a === void 0 ? void 0 : _a.addEventListener('click', listener);
(_b = element) === null || _b === void 0 ? void 0 : _b.addEventListener('touchstart', listener);
element === null || element === void 0 ? void 0 : element.addEventListener('click', listener);
element === null || element === void 0 ? void 0 : element.addEventListener('touchstart', listener);
return function () {
var _a, _b;
(_a = element) === null || _a === void 0 ? void 0 : _a.removeEventListener('click', listener);
(_b = element) === null || _b === void 0 ? void 0 : _b.removeEventListener('touchstart', listener);
element === null || element === void 0 ? void 0 : element.removeEventListener('click', listener);
element === null || element === void 0 ? void 0 : element.removeEventListener('touchstart', listener);
};

@@ -24,0 +22,0 @@ }, [listener, element]);

export * from './compose/index';
export * from './descendants/index';
export * from './hooks/index';
export * from './ssr/index';
export * from './utils/index';
export * from './compose/index';
export * from './descendants/index';
export * from './hooks/index';
export * from './ssr/index';
export * from './utils/index';
//# sourceMappingURL=index.js.map

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.7.1"
"packageVersion": "7.13.0"
}
]
}

@@ -5,2 +5,1 @@ export * from './getNativeElementProps';

export * from './shouldPreventDefaultOnKeyDown';
export * from './isSSR';

@@ -5,3 +5,2 @@ export * from './getNativeElementProps';

export * from './shouldPreventDefaultOnKeyDown';
export * from './isSSR';
//# sourceMappingURL=index.js.map

@@ -393,3 +393,2 @@ var toObjectMap = function () {

// We should be able to do this once this PR is merged: https://github.com/microsoft/TypeScript/pull/26797
var _a;
var isArray = Array.isArray(allowedPropNames);

@@ -405,3 +404,3 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any

key.indexOf('aria-') === 0;
if (isNativeProp && (!excludedPropNames || ((_a = excludedPropNames) === null || _a === void 0 ? void 0 : _a.indexOf(key)) === -1)) {
if (isNativeProp && (!excludedPropNames || (excludedPropNames === null || excludedPropNames === void 0 ? void 0 : excludedPropNames.indexOf(key)) === -1)) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any

@@ -408,0 +407,0 @@ result[key] = props[key];

@@ -8,12 +8,11 @@ import { getCode, SpacebarKey, EnterKey } from '@fluentui/keyboard-key';

export function shouldPreventDefaultOnKeyDown(e) {
var _a, _b, _c, _d;
var code = getCode(e);
var target = e.target;
var matchesByKey = code === SpacebarKey || code === EnterKey;
if (((_a = target) === null || _a === void 0 ? void 0 : _a.tagName) === 'A') {
if ((target === null || target === void 0 ? void 0 : target.tagName) === 'A') {
return code === SpacebarKey;
}
var ignoredByTag = ((_b = target) === null || _b === void 0 ? void 0 : _b.tagName) === 'INPUT' || ((_c = target) === null || _c === void 0 ? void 0 : _c.tagName) === 'TEXTAREA' || ((_d = target) === null || _d === void 0 ? void 0 : _d.isContentEditable) === true;
var ignoredByTag = (target === null || target === void 0 ? void 0 : target.tagName) === 'INPUT' || (target === null || target === void 0 ? void 0 : target.tagName) === 'TEXTAREA' || (target === null || target === void 0 ? void 0 : target.isContentEditable) === true;
return matchesByKey && !ignoredByTag;
}
//# sourceMappingURL=shouldPreventDefaultOnKeyDown.js.map
{
"name": "@fluentui/react-utilities",
"version": "9.0.0-alpha.19",
"version": "9.0.0-alpha.20",
"description": "A set of general React-specific utilities.",

@@ -25,3 +25,3 @@ "main": "lib-commonjs/index.js",

"devDependencies": {
"@fluentui/eslint-plugin": "^1.1.1",
"@fluentui/eslint-plugin": "^1.2.0",
"@fluentui/scripts": "^1.0.0",

@@ -38,4 +38,4 @@ "@types/enzyme": "3.10.3",

"dependencies": {
"@fluentui/keyboard-key": "^0.2.17",
"tslib": "^1.10.0"
"@fluentui/keyboard-key": "^0.3.0",
"tslib": "^2.1.0"
},

@@ -42,0 +42,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc