Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluentui/react-utilities

Package Overview
Dependencies
Maintainers
12
Versions
867
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-beta.1 to 9.0.0-nightly.25435def33.0

29

CHANGELOG.json

@@ -5,3 +5,30 @@ {

{
"date": "Wed, 06 Oct 2021 10:36:00 GMT",
"date": "Thu, 21 Oct 2021 09:18:06 GMT",
"tag": "@fluentui/react-utilities_v9.0.0-nightly.25435def33.0",
"version": "9.0.0-nightly.25435def33.0",
"comments": {
"prerelease": [
{
"author": "email not defined",
"package": "@fluentui/react-utilities",
"comment": "Release nightly v9",
"commit": "fb58116bf4cb0469b316999385bdbc960b02d2a3"
},
{
"author": "olfedias@microsoft.com",
"package": "@fluentui/react-utilities",
"comment": "remove compat utilities and types",
"commit": "fb58116bf4cb0469b316999385bdbc960b02d2a3"
},
{
"author": "beachball",
"package": "@fluentui/react-utilities",
"comment": "Bump @fluentui/keyboard-keys to v9.0.0-nightly.25435def33.0",
"commit": "fb58116bf4cb0469b316999385bdbc960b02d2a3"
}
]
}
},
{
"date": "Wed, 06 Oct 2021 10:37:22 GMT",
"tag": "@fluentui/react-utilities_v9.0.0-beta.1",

@@ -8,0 +35,0 @@ "version": "9.0.0-beta.1",

# Change Log - @fluentui/react-utilities
This log was last generated on Wed, 06 Oct 2021 10:36:00 GMT and should not be manually modified.
This log was last generated on Thu, 21 Oct 2021 09:18:06 GMT and should not be manually modified.
<!-- Start content -->
## [9.0.0-nightly.25435def33.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-nightly.25435def33.0)
Thu, 21 Oct 2021 09:18:06 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-beta.1..@fluentui/react-utilities_v9.0.0-nightly.25435def33.0)
### Changes
- Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/fb58116bf4cb0469b316999385bdbc960b02d2a3) by email not defined)
- remove compat utilities and types ([commit](https://github.com/microsoft/fluentui/commit/fb58116bf4cb0469b316999385bdbc960b02d2a3) by olfedias@microsoft.com)
- Bump @fluentui/keyboard-keys to v9.0.0-nightly.25435def33.0 ([commit](https://github.com/microsoft/fluentui/commit/fb58116bf4cb0469b316999385bdbc960b02d2a3) by beachball)
## [9.0.0-beta.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-beta.1)
Wed, 06 Oct 2021 10:36:00 GMT
Wed, 06 Oct 2021 10:37:22 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.56..@fluentui/react-utilities_v9.0.0-beta.1)

@@ -11,0 +22,0 @@

107

dist/react-utilities.d.ts

@@ -49,6 +49,2 @@ import { DispatchWithoutAction } from 'react';

export declare type BaseSlotsCompat = {
root: React_2.ElementType;
};
/**

@@ -85,8 +81,2 @@ * An array of BUTTON tag properties and events.

export declare type ComponentPropsCompat = {
as?: React_2.ElementType;
className?: string;
children?: React_2.ReactNode;
};
export declare type ComponentState<Shorthands extends ObjectShorthandPropsRecord> = {

@@ -99,13 +89,2 @@ components?: {

/**
* Converts a components Props type to a State type:
* * Ensures the specified ShorthandProps are of type ObjectShorthandProps<T>
* * Marks the given defaulted props as required (-?)
*
* @template Props - The component's Props type
* @template ShorthandPropNames - The keys of Props that correspond to ShorthandProps
* @template DefaultedPropNames - The keys of Props that will always have a default value provided
*/
export declare type ComponentStateCompat<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandPropsCompat<Props, ShorthandPropNames> = never> = RequiredPropsCompat<ResolvedShorthandPropsCompat<Props, ShorthandPropNames>, DefaultedPropNames>;
/**
* Matches any shorthand props type.

@@ -152,6 +131,2 @@ *

declare type GenericDictionary = Record<string, any>;
declare type GenericDictionary_2 = Record<string, any>;
/**

@@ -209,23 +184,2 @@ * Given an element tagname and user props, filters the props to only allowed props for the given

/**
* Given the state and an array of slot names, will break out `slots` and `slotProps`
* collections.
*
* The root is always derived from the `as` prop.
*
* Slots will render as null if they are rendered as primitives with undefined children.
*
* The slotProps will always omit the `as` prop within them, and for slots that are string
* primitives, the props will be filtered according the the slot type. For example, if the
* slot is rendered `as: 'a'`, the props will be filtered for acceptable anchor props.
*
* @param state - State including slot definitions
* @param slotNames - Name of which props are slots
* @returns An object containing the `slots` map and `slotProps` map.
*/
export declare const getSlotsCompat: (state: GenericDictionary, slotNames?: readonly string[] | undefined) => {
slots: Record<string, any>;
slotProps: Record<string, any>;
};
/**
* An array of HTML element properties and events.

@@ -311,26 +265,2 @@ *

/**
* Helper which deep clones props, but respectively assigns JSX, object refs, and class names
* appropriately.
*
* @param target - the target object to merge onto.
* @param propSets - one or more prop sets to deep merge onto the target.
*/
export declare const makeMergeProps: <TState>(options?: MergePropsOptions<TState>) => (target: TState, ...propSets: (Partial<TState> | undefined)[]) => TState;
/**
* Backwards-compatible version of makeMergeProps that has less restrictive type checking
*
* @deprecated Use makeMergeProps instead
*/
export declare const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: GenericDictionary_2, ...propSets: (GenericDictionary_2 | undefined)[]) => TState;
export declare type MergePropsOptions<TState> = {
/**
* A list of props to deep merge. By default, `style` will
* always be deep merged so it's not required to be provided.
*/
deepMerge?: readonly (keyof TState)[];
};
/**
* Simple constant function for returning null, used to render empty templates in JSX.

@@ -351,6 +281,2 @@ */

export declare type ObjectShorthandPropsCompat<TProps extends ComponentPropsCompat = {}> = TProps & Omit<ComponentPropsCompat, 'children'> & {
children?: TProps['children'] | ShorthandRenderFunctionCompat<TProps>;
};
export declare type ObjectShorthandPropsRecord = Record<string, DefaultObjectShorthandProps | undefined>;

@@ -417,10 +343,2 @@

/**
* Helper type to mark the given props as required.
* Similar to Required<T> except it only requires a subset of the props.
*/
export declare type RequiredPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]-?: T[P];
};
/**
* Resets generated IDs, should be used only in tests.

@@ -433,9 +351,2 @@ *

/**
* Helper type to convert the given props of type ShorthandProps into ObjectShorthandProps
*/
export declare type ResolvedShorthandPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]: T[P] extends ShorthandPropsCompat<infer U> ? ObjectShorthandPropsCompat<U> : T[P];
};
/**
* Resolves ShorthandProps into ObjectShorthandProps, to ensure normalization of the signature

@@ -454,10 +365,2 @@ * being passed down to getSlots method

/**
* Ensures that the given slots are represented using object syntax. This ensures that
* the object can be merged along with other objects.
* @param props - The incoming props
* @param shorthandPropNames - An array of prop names to apply simplification to
*/
export declare const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandPropsCompat<TProps, TShorthandPropNames>;
/**
* An array of SELECT tag properties and events.

@@ -471,8 +374,4 @@ *

export declare type ShorthandPropsCompat<TProps extends ComponentPropsCompat = {}> = React_2.ReactChild | React_2.ReactNodeArray | React_2.ReactPortal | number | null | undefined | ObjectShorthandPropsCompat<TProps>;
export declare type ShorthandRenderFunction<Props> = (Component: React_2.ElementType<Props>, props: Omit<Props, 'children' | 'as'>) => React_2.ReactNode;
export declare type ShorthandRenderFunctionCompat<TProps> = (Component: React_2.ElementType<TProps>, props: TProps) => React_2.ReactNode;
/**

@@ -489,8 +388,2 @@ * Checks if the keyboard event should preventDefault() for Enter and Spacebar keys

export declare type SlotPropsCompat<TSlots extends BaseSlotsCompat, TProps, TRootProps extends React_2.HTMLAttributes<HTMLElement>> = {
[key in keyof Omit<TSlots, 'root'>]: key extends keyof TProps ? TProps[key] : any;
} & {
root: TRootProps;
};
export declare type Slots<S extends ObjectShorthandPropsRecord> = {

@@ -497,0 +390,0 @@ [K in keyof S]-?: NonNullable<S[K]> extends AsIntrinsicElement<infer As> ? As : S[K] extends ObjectShorthandProps<infer P> ? React_2.ElementType<NonNullable<P>> : React_2.ElementType<NonNullable<S[K]>>;

export * from './getSlots';
export * from './getSlotsCompat';
export * from './makeMergeProps';
export * from './makeMergePropsCompat';
export * from './nullRender';
export * from './resolveShorthand';
export * from './resolveShorthandProps';
export * from './types';

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

tslib_1.__exportStar(require("./getSlotsCompat"), exports);
tslib_1.__exportStar(require("./makeMergeProps"), exports);
tslib_1.__exportStar(require("./makeMergePropsCompat"), exports);
tslib_1.__exportStar(require("./nullRender"), exports);

@@ -22,5 +16,3 @@

tslib_1.__exportStar(require("./resolveShorthandProps"), exports);
tslib_1.__exportStar(require("./types"), exports);
//# sourceMappingURL=index.js.map

@@ -104,43 +104,2 @@ import * as React from 'react';

export declare type ForwardRefComponent<Props> = ObscureEventName extends keyof Props ? Required<Props>[ObscureEventName] extends React.PointerEventHandler<infer Element> ? React.ForwardRefExoticComponent<Props & React.RefAttributes<Element>> : never : never;
export declare type ComponentPropsCompat = {
as?: React.ElementType;
className?: string;
children?: React.ReactNode;
};
export declare type ShorthandRenderFunctionCompat<TProps> = (Component: React.ElementType<TProps>, props: TProps) => React.ReactNode;
export declare type ShorthandPropsCompat<TProps extends ComponentPropsCompat = {}> = React.ReactChild | React.ReactNodeArray | React.ReactPortal | number | null | undefined | ObjectShorthandPropsCompat<TProps>;
export declare type ObjectShorthandPropsCompat<TProps extends ComponentPropsCompat = {}> = TProps & Omit<ComponentPropsCompat, 'children'> & {
children?: TProps['children'] | ShorthandRenderFunctionCompat<TProps>;
};
export declare type BaseSlotsCompat = {
root: React.ElementType;
};
export declare type SlotPropsCompat<TSlots extends BaseSlotsCompat, TProps, TRootProps extends React.HTMLAttributes<HTMLElement>> = {
[key in keyof Omit<TSlots, 'root'>]: key extends keyof TProps ? TProps[key] : any;
} & {
root: TRootProps;
};
/**
* Helper type to convert the given props of type ShorthandProps into ObjectShorthandProps
*/
export declare type ResolvedShorthandPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]: T[P] extends ShorthandPropsCompat<infer U> ? ObjectShorthandPropsCompat<U> : T[P];
};
/**
* Helper type to mark the given props as required.
* Similar to Required<T> except it only requires a subset of the props.
*/
export declare type RequiredPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]-?: T[P];
};
/**
* Converts a components Props type to a State type:
* * Ensures the specified ShorthandProps are of type ObjectShorthandProps<T>
* * Marks the given defaulted props as required (-?)
*
* @template Props - The component's Props type
* @template ShorthandPropNames - The keys of Props that correspond to ShorthandProps
* @template DefaultedPropNames - The keys of Props that will always have a default value provided
*/
export declare type ComponentStateCompat<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandPropsCompat<Props, ShorthandPropNames> = never> = RequiredPropsCompat<ResolvedShorthandPropsCompat<Props, ShorthandPropNames>, DefaultedPropNames>;
export {};

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

value: true
});
}); // A definition like this would also work, but typescript is more likely to unnecessarily expand
// the props type with this version (and it's likely much more expensive to evaluate)
// export type ForwardRefComponent<Props> = Props extends React.DOMAttributes<infer Element>
// ? React.ForwardRefExoticComponent<Props> & React.RefAttributes<Element>
// : never;
//# sourceMappingURL=types.js.map
export * from './getSlots';
export * from './getSlotsCompat';
export * from './makeMergeProps';
export * from './makeMergePropsCompat';
export * from './nullRender';
export * from './resolveShorthand';
export * from './resolveShorthandProps';
export * from './types';
export * from './getSlots';
export * from './getSlotsCompat';
export * from './makeMergeProps';
export * from './makeMergePropsCompat';
export * from './nullRender';
export * from './resolveShorthand';
export * from './resolveShorthandProps';
export * from './types';
//# sourceMappingURL=index.js.map

@@ -104,43 +104,2 @@ import * as React from 'react';

export declare type ForwardRefComponent<Props> = ObscureEventName extends keyof Props ? Required<Props>[ObscureEventName] extends React.PointerEventHandler<infer Element> ? React.ForwardRefExoticComponent<Props & React.RefAttributes<Element>> : never : never;
export declare type ComponentPropsCompat = {
as?: React.ElementType;
className?: string;
children?: React.ReactNode;
};
export declare type ShorthandRenderFunctionCompat<TProps> = (Component: React.ElementType<TProps>, props: TProps) => React.ReactNode;
export declare type ShorthandPropsCompat<TProps extends ComponentPropsCompat = {}> = React.ReactChild | React.ReactNodeArray | React.ReactPortal | number | null | undefined | ObjectShorthandPropsCompat<TProps>;
export declare type ObjectShorthandPropsCompat<TProps extends ComponentPropsCompat = {}> = TProps & Omit<ComponentPropsCompat, 'children'> & {
children?: TProps['children'] | ShorthandRenderFunctionCompat<TProps>;
};
export declare type BaseSlotsCompat = {
root: React.ElementType;
};
export declare type SlotPropsCompat<TSlots extends BaseSlotsCompat, TProps, TRootProps extends React.HTMLAttributes<HTMLElement>> = {
[key in keyof Omit<TSlots, 'root'>]: key extends keyof TProps ? TProps[key] : any;
} & {
root: TRootProps;
};
/**
* Helper type to convert the given props of type ShorthandProps into ObjectShorthandProps
*/
export declare type ResolvedShorthandPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]: T[P] extends ShorthandPropsCompat<infer U> ? ObjectShorthandPropsCompat<U> : T[P];
};
/**
* Helper type to mark the given props as required.
* Similar to Required<T> except it only requires a subset of the props.
*/
export declare type RequiredPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]-?: T[P];
};
/**
* Converts a components Props type to a State type:
* * Ensures the specified ShorthandProps are of type ObjectShorthandProps<T>
* * Marks the given defaulted props as required (-?)
*
* @template Props - The component's Props type
* @template ShorthandPropNames - The keys of Props that correspond to ShorthandProps
* @template DefaultedPropNames - The keys of Props that will always have a default value provided
*/
export declare type ComponentStateCompat<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandPropsCompat<Props, ShorthandPropNames> = never> = RequiredPropsCompat<ResolvedShorthandPropsCompat<Props, ShorthandPropNames>, DefaultedPropNames>;
export {};

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

export {};
export {}; // A definition like this would also work, but typescript is more likely to unnecessarily expand
// the props type with this version (and it's likely much more expensive to evaluate)
// export type ForwardRefComponent<Props> = Props extends React.DOMAttributes<infer Element>
// ? React.ForwardRefExoticComponent<Props> & React.RefAttributes<Element>
// : never;
//# sourceMappingURL=types.js.map
{
"name": "@fluentui/react-utilities",
"version": "9.0.0-beta.1",
"version": "9.0.0-nightly.25435def33.0",
"description": "A set of general React-specific utilities.",

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

"dependencies": {
"@fluentui/keyboard-keys": "9.0.0-beta.1",
"@fluentui/keyboard-keys": "9.0.0-nightly.25435def33.0",
"tslib": "^2.1.0"

@@ -43,0 +43,0 @@ },

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