Socket
Socket
Sign inDemoInstall

@fluentui/react-utilities

Package Overview
Dependencies
Maintainers
12
Versions
839
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.29 to 9.0.0-alpha.30

.cache/jest/haste-map-acb1969f126520fb9c6f3b43301a7ee0-ae8b0aec33521aef8f2af59db186eeed-fd4779cd98207b1e9b54737b91eafae1

25

CHANGELOG.json

@@ -5,3 +5,26 @@ {

{
"date": "Tue, 15 Jun 2021 07:36:10 GMT",
"date": "Fri, 02 Jul 2021 07:35:03 GMT",
"tag": "@fluentui/react-utilities_v9.0.0-alpha.30",
"version": "9.0.0-alpha.30",
"comments": {
"none": [
{
"comment": "chore(react-utilities): Migrate DX",
"author": "lingfan.gao@microsoft.com",
"commit": "4279e187f29c2dfa4d9244c615e92fdd29159b3b",
"package": "@fluentui/react-utilities"
}
],
"prerelease": [
{
"comment": "Rename typings and getSlots to have the Compat Suffix",
"author": "bsunderhus@microsoft.com",
"commit": "c939e67b1840a9eb5f7706afcda8c14df8f18d33",
"package": "@fluentui/react-utilities"
}
]
}
},
{
"date": "Tue, 15 Jun 2021 07:40:20 GMT",
"tag": "@fluentui/react-utilities_v9.0.0-alpha.29",

@@ -8,0 +31,0 @@ "version": "9.0.0-alpha.29",

# Change Log - @fluentui/react-utilities
This log was last generated on Tue, 15 Jun 2021 07:36:10 GMT and should not be manually modified.
This log was last generated on Fri, 02 Jul 2021 07:35:03 GMT and should not be manually modified.
<!-- Start content -->
## [9.0.0-alpha.30](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.30)
Fri, 02 Jul 2021 07:35:03 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.29..@fluentui/react-utilities_v9.0.0-alpha.30)
### Changes
- Rename typings and getSlots to have the Compat Suffix ([PR #18796](https://github.com/microsoft/fluentui/pull/18796) by bsunderhus@microsoft.com)
## [9.0.0-alpha.29](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.29)
Tue, 15 Jun 2021 07:36:10 GMT
Tue, 15 Jun 2021 07:40:20 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.28..@fluentui/react-utilities_v9.0.0-alpha.29)

@@ -11,0 +20,0 @@

{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "@fluentui/scripts/api-extractor/api-extractor.common.json"
}

40

dist/react-utilities.d.ts

@@ -31,3 +31,3 @@ import * as React_2 from 'react';

export declare interface BaseSlots {
export declare interface BaseSlotsCompat {
root: React_2.ElementType;

@@ -50,7 +50,2 @@ }

/**
* Class dictionary.
*/
export declare type ClassDictionary = Record<string, string>;
export declare const colGroupProperties: Record<string, number>;

@@ -60,3 +55,3 @@

export declare interface ComponentProps {
export declare interface ComponentPropsCompat {
as?: React_2.ElementType;

@@ -76,3 +71,3 @@ className?: string;

*/
export declare type ComponentState<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandProps<Props, ShorthandPropNames> = never> = RequiredProps<ResolvedShorthandProps<Props, ShorthandPropNames>, DefaultedPropNames>;
export declare type ComponentStateCompat<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandPropsCompat<Props, ShorthandPropNames> = never> = RequiredPropsCompat<ResolvedShorthandPropsCompat<Props, ShorthandPropNames>, DefaultedPropNames>;

@@ -127,7 +122,6 @@ export declare function createDescendantContext<DescendantType extends Descendant>(name: string, initialValue?: {}): React_2.Context<DescendantContextValue<DescendantType>>;

/**
* Generic name to any dictionary.
*/
export declare type GenericDictionary = Record<string, any>;
declare type GenericDictionary = Record<string, any>;
declare type GenericDictionary_2 = Record<string, any>;
/**

@@ -174,3 +168,3 @@ * Given an element tagname and user props, filters the props to only allowed props for the given

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

@@ -241,3 +235,3 @@ slotProps: Record<string, any>;

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

@@ -257,4 +251,4 @@ export declare type MergePropsOptions<TState> = {

export declare type ObjectShorthandProps<TProps extends ComponentProps = {}> = TProps & Omit<ComponentProps, 'children'> & {
children?: TProps['children'] | ShorthandRenderFunction<TProps>;
export declare type ObjectShorthandPropsCompat<TProps extends ComponentPropsCompat = {}> = TProps & Omit<ComponentPropsCompat, 'children'> & {
children?: TProps['children'] | ShorthandRenderFunctionCompat<TProps>;
};

@@ -301,3 +295,3 @@

*/
export declare type RequiredProps<T, K extends keyof T> = Omit<T, K> & {
export declare type RequiredPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]-?: T[P];

@@ -316,4 +310,4 @@ };

*/
export declare type ResolvedShorthandProps<T, K extends keyof T> = Omit<T, K> & {
[P in K]: T[P] extends ShorthandProps<infer U> ? ObjectShorthandProps<U> : T[P];
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];
};

@@ -327,3 +321,3 @@

*/
export declare const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandProps<TProps, TShorthandPropNames>;
export declare const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandPropsCompat<TProps, TShorthandPropNames>;

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

export declare type ShorthandProps<TProps extends ComponentProps = {}> = React_2.ReactChild | React_2.ReactNodeArray | React_2.ReactPortal | number | null | undefined | ObjectShorthandProps<TProps>;
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<TProps> = (Component: React_2.ElementType<TProps>, props: TProps) => React_2.ReactNode;
export declare type ShorthandRenderFunctionCompat<TProps> = (Component: React_2.ElementType<TProps>, props: TProps) => React_2.ReactNode;

@@ -349,3 +343,3 @@ /**

export declare type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React_2.HTMLAttributes<HTMLElement>> = {
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;

@@ -352,0 +346,0 @@ } & {

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

// @public (undocumented)
export interface BaseSlots {
export interface BaseSlotsCompat {
// (undocumented)

@@ -37,5 +37,2 @@ root: React_2.ElementType;

// @public
export type ClassDictionary = Record<string, string>;
// @public (undocumented)

@@ -48,3 +45,3 @@ export const colGroupProperties: Record<string, number>;

// @public (undocumented)
export interface ComponentProps {
export interface ComponentPropsCompat {
// (undocumented)

@@ -59,3 +56,3 @@ as?: React_2.ElementType;

// @public
export type ComponentState<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandProps<Props, ShorthandPropNames> = never> = RequiredProps<ResolvedShorthandProps<Props, ShorthandPropNames>, DefaultedPropNames>;
export type ComponentStateCompat<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandPropsCompat<Props, ShorthandPropNames> = never> = RequiredPropsCompat<ResolvedShorthandPropsCompat<Props, ShorthandPropNames>, DefaultedPropNames>;

@@ -104,5 +101,2 @@ // @public (undocumented)

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

@@ -113,4 +107,6 @@

// Warning: (ae-forgotten-export) The symbol "GenericDictionary" needs to be exported by the entry point index.d.ts
//
// @public
export const getSlots: (state: GenericDictionary, slotNames?: readonly string[] | undefined) => {
export const getSlotsCompat: (state: GenericDictionary, slotNames?: readonly string[] | undefined) => {
slots: Record<string, any>;

@@ -144,4 +140,6 @@ slotProps: Record<string, any>;

// Warning: (ae-forgotten-export) The symbol "GenericDictionary" needs to be exported by the entry point index.d.ts
//
// @public @deprecated
export const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: GenericDictionary, ...propSets: (GenericDictionary | undefined)[]) => TState;
export const makeMergePropsCompat: <TState = Record<string, any>>(options?: MergePropsOptions<Record<string, any>> | undefined) => (target: GenericDictionary_2, ...propSets: (GenericDictionary_2 | undefined)[]) => TState;

@@ -157,4 +155,4 @@ // @public (undocumented)

// @public (undocumented)
export type ObjectShorthandProps<TProps extends ComponentProps = {}> = TProps & Omit<ComponentProps, 'children'> & {
children?: TProps['children'] | ShorthandRenderFunction<TProps>;
export type ObjectShorthandPropsCompat<TProps extends ComponentPropsCompat = {}> = TProps & Omit<ComponentPropsCompat, 'children'> & {
children?: TProps['children'] | ShorthandRenderFunctionCompat<TProps>;
};

@@ -178,3 +176,3 @@

// @public
export type RequiredProps<T, K extends keyof T> = Omit<T, K> & {
export type RequiredPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]-?: T[P];

@@ -187,8 +185,8 @@ };

// @public
export type ResolvedShorthandProps<T, K extends keyof T> = Omit<T, K> & {
[P in K]: T[P] extends ShorthandProps<infer U> ? ObjectShorthandProps<U> : T[P];
export type ResolvedShorthandPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]: T[P] extends ShorthandPropsCompat<infer U> ? ObjectShorthandPropsCompat<U> : T[P];
};
// @public
export const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandProps<TProps, TShorthandPropNames>;
export const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandPropsCompat<TProps, TShorthandPropNames>;

@@ -199,6 +197,6 @@ // @public

// @public (undocumented)
export type ShorthandProps<TProps extends ComponentProps = {}> = React_2.ReactChild | React_2.ReactNodeArray | React_2.ReactPortal | number | null | undefined | ObjectShorthandProps<TProps>;
export type ShorthandPropsCompat<TProps extends ComponentPropsCompat = {}> = React_2.ReactChild | React_2.ReactNodeArray | React_2.ReactPortal | number | null | undefined | ObjectShorthandPropsCompat<TProps>;
// @public (undocumented)
export type ShorthandRenderFunction<TProps> = (Component: React_2.ElementType<TProps>, props: TProps) => React_2.ReactNode;
export type ShorthandRenderFunctionCompat<TProps> = (Component: React_2.ElementType<TProps>, props: TProps) => React_2.ReactNode;

@@ -209,3 +207,3 @@ // @public

// @public (undocumented)
export type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React_2.HTMLAttributes<HTMLElement>> = {
export 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;

@@ -212,0 +210,0 @@ } & {

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

export * from './getSlots';
export * from './getSlotsCompat';
export * from './makeMergeProps';

@@ -3,0 +3,0 @@ export * from './makeMergePropsCompat';

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

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) {
define(["require", "exports", "tslib", "./getSlotsCompat", "./makeMergeProps", "./makeMergePropsCompat", "./nullRender", "./resolveShorthandProps", "./types"], function (require, exports, tslib_1, getSlotsCompat_1, makeMergeProps_1, makeMergePropsCompat_1, nullRender_1, resolveShorthandProps_1, types_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
tslib_1.__exportStar(getSlots_1, exports);
tslib_1.__exportStar(getSlotsCompat_1, exports);
tslib_1.__exportStar(makeMergeProps_1, exports);

@@ -6,0 +6,0 @@ tslib_1.__exportStar(makeMergePropsCompat_1, exports);

import { MergePropsOptions } from './makeMergeProps';
import { GenericDictionary } from './types';
declare type GenericDictionary = Record<string, any>;
/**

@@ -9,1 +9,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: GenericDictionary, ...propSets: (GenericDictionary | undefined)[]) => TState;
export {};

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

import { ResolvedShorthandProps } from './types';
import { ResolvedShorthandPropsCompat } from './types';
/**

@@ -8,2 +8,2 @@ * Ensures that the given slots are represented using object syntax. This ensures that

*/
export declare const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandProps<TProps, TShorthandPropNames>;
export declare const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandPropsCompat<TProps, TShorthandPropNames>;
import * as React from 'react';
/**
* Generic name to any dictionary.
*/
export declare type GenericDictionary = Record<string, any>;
/**
* Class dictionary.
*/
export declare type ClassDictionary = Record<string, string>;
export interface ComponentProps {
export interface ComponentPropsCompat {
as?: React.ElementType;

@@ -15,11 +7,11 @@ className?: string;

}
export declare type ShorthandRenderFunction<TProps> = (Component: React.ElementType<TProps>, props: TProps) => React.ReactNode;
export declare type ShorthandProps<TProps extends ComponentProps = {}> = React.ReactChild | React.ReactNodeArray | React.ReactPortal | number | null | undefined | ObjectShorthandProps<TProps>;
export declare type ObjectShorthandProps<TProps extends ComponentProps = {}> = TProps & Omit<ComponentProps, 'children'> & {
children?: TProps['children'] | ShorthandRenderFunction<TProps>;
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 interface BaseSlots {
export interface BaseSlotsCompat {
root: React.ElementType;
}
export declare type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React.HTMLAttributes<HTMLElement>> = {
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;

@@ -32,4 +24,4 @@ } & {

*/
export declare type ResolvedShorthandProps<T, K extends keyof T> = Omit<T, K> & {
[P in K]: T[P] extends ShorthandProps<infer U> ? ObjectShorthandProps<U> : T[P];
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];
};

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

*/
export declare type RequiredProps<T, K extends keyof T> = Omit<T, K> & {
export declare type RequiredPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]-?: T[P];

@@ -53,2 +45,2 @@ };

*/
export declare type ComponentState<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandProps<Props, ShorthandPropNames> = never> = RequiredProps<ResolvedShorthandProps<Props, ShorthandPropNames>, DefaultedPropNames>;
export declare type ComponentStateCompat<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandPropsCompat<Props, ShorthandPropNames> = never> = RequiredPropsCompat<ResolvedShorthandPropsCompat<Props, ShorthandPropNames>, DefaultedPropNames>;

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

export * from './getSlots';
export * from './getSlotsCompat';
export * from './makeMergeProps';

@@ -3,0 +3,0 @@ export * from './makeMergePropsCompat';

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

tslib_1.__exportStar(require("./getSlots"), exports);
tslib_1.__exportStar(require("./getSlotsCompat"), exports);

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

import { MergePropsOptions } from './makeMergeProps';
import { GenericDictionary } from './types';
declare type GenericDictionary = Record<string, any>;
/**

@@ -9,1 +9,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: GenericDictionary, ...propSets: (GenericDictionary | undefined)[]) => TState;
export {};

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

import { ResolvedShorthandProps } from './types';
import { ResolvedShorthandPropsCompat } from './types';
/**

@@ -8,2 +8,2 @@ * Ensures that the given slots are represented using object syntax. This ensures that

*/
export declare const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandProps<TProps, TShorthandPropNames>;
export declare const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandPropsCompat<TProps, TShorthandPropNames>;
import * as React from 'react';
/**
* Generic name to any dictionary.
*/
export declare type GenericDictionary = Record<string, any>;
/**
* Class dictionary.
*/
export declare type ClassDictionary = Record<string, string>;
export interface ComponentProps {
export interface ComponentPropsCompat {
as?: React.ElementType;

@@ -15,11 +7,11 @@ className?: string;

}
export declare type ShorthandRenderFunction<TProps> = (Component: React.ElementType<TProps>, props: TProps) => React.ReactNode;
export declare type ShorthandProps<TProps extends ComponentProps = {}> = React.ReactChild | React.ReactNodeArray | React.ReactPortal | number | null | undefined | ObjectShorthandProps<TProps>;
export declare type ObjectShorthandProps<TProps extends ComponentProps = {}> = TProps & Omit<ComponentProps, 'children'> & {
children?: TProps['children'] | ShorthandRenderFunction<TProps>;
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 interface BaseSlots {
export interface BaseSlotsCompat {
root: React.ElementType;
}
export declare type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React.HTMLAttributes<HTMLElement>> = {
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;

@@ -32,4 +24,4 @@ } & {

*/
export declare type ResolvedShorthandProps<T, K extends keyof T> = Omit<T, K> & {
[P in K]: T[P] extends ShorthandProps<infer U> ? ObjectShorthandProps<U> : T[P];
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];
};

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

*/
export declare type RequiredProps<T, K extends keyof T> = Omit<T, K> & {
export declare type RequiredPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]-?: T[P];

@@ -53,2 +45,2 @@ };

*/
export declare type ComponentState<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandProps<Props, ShorthandPropNames> = never> = RequiredProps<ResolvedShorthandProps<Props, ShorthandPropNames>, DefaultedPropNames>;
export declare type ComponentStateCompat<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandPropsCompat<Props, ShorthandPropNames> = never> = RequiredPropsCompat<ResolvedShorthandPropsCompat<Props, ShorthandPropNames>, DefaultedPropNames>;

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

export * from './getSlots';
export * from './getSlotsCompat';
export * from './makeMergeProps';

@@ -3,0 +3,0 @@ export * from './makeMergePropsCompat';

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

export * from './getSlots';
export * from './getSlotsCompat';
export * from './makeMergeProps';

@@ -3,0 +3,0 @@ export * from './makeMergePropsCompat';

import { MergePropsOptions } from './makeMergeProps';
import { GenericDictionary } from './types';
declare type GenericDictionary = Record<string, any>;
/**

@@ -9,1 +9,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: GenericDictionary, ...propSets: (GenericDictionary | undefined)[]) => TState;
export {};

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

import { ResolvedShorthandProps } from './types';
import { ResolvedShorthandPropsCompat } from './types';
/**

@@ -8,2 +8,2 @@ * Ensures that the given slots are represented using object syntax. This ensures that

*/
export declare const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandProps<TProps, TShorthandPropNames>;
export declare const resolveShorthandProps: <TProps, TShorthandPropNames extends keyof TProps>(props: TProps, shorthandPropNames: readonly TShorthandPropNames[]) => ResolvedShorthandPropsCompat<TProps, TShorthandPropNames>;
import * as React from 'react';
/**
* Generic name to any dictionary.
*/
export declare type GenericDictionary = Record<string, any>;
/**
* Class dictionary.
*/
export declare type ClassDictionary = Record<string, string>;
export interface ComponentProps {
export interface ComponentPropsCompat {
as?: React.ElementType;

@@ -15,11 +7,11 @@ className?: string;

}
export declare type ShorthandRenderFunction<TProps> = (Component: React.ElementType<TProps>, props: TProps) => React.ReactNode;
export declare type ShorthandProps<TProps extends ComponentProps = {}> = React.ReactChild | React.ReactNodeArray | React.ReactPortal | number | null | undefined | ObjectShorthandProps<TProps>;
export declare type ObjectShorthandProps<TProps extends ComponentProps = {}> = TProps & Omit<ComponentProps, 'children'> & {
children?: TProps['children'] | ShorthandRenderFunction<TProps>;
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 interface BaseSlots {
export interface BaseSlotsCompat {
root: React.ElementType;
}
export declare type SlotProps<TSlots extends BaseSlots, TProps, TRootProps extends React.HTMLAttributes<HTMLElement>> = {
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;

@@ -32,4 +24,4 @@ } & {

*/
export declare type ResolvedShorthandProps<T, K extends keyof T> = Omit<T, K> & {
[P in K]: T[P] extends ShorthandProps<infer U> ? ObjectShorthandProps<U> : T[P];
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];
};

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

*/
export declare type RequiredProps<T, K extends keyof T> = Omit<T, K> & {
export declare type RequiredPropsCompat<T, K extends keyof T> = Omit<T, K> & {
[P in K]-?: T[P];

@@ -53,2 +45,2 @@ };

*/
export declare type ComponentState<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandProps<Props, ShorthandPropNames> = never> = RequiredProps<ResolvedShorthandProps<Props, ShorthandPropNames>, DefaultedPropNames>;
export declare type ComponentStateCompat<Props, ShorthandPropNames extends keyof Props = never, DefaultedPropNames extends keyof ResolvedShorthandPropsCompat<Props, ShorthandPropNames> = never> = RequiredPropsCompat<ResolvedShorthandPropsCompat<Props, ShorthandPropNames>, DefaultedPropNames>;
{
"name": "@fluentui/react-utilities",
"version": "9.0.0-alpha.29",
"version": "9.0.0-alpha.30",
"description": "A set of general React-specific utilities.",

@@ -20,5 +20,7 @@ "main": "lib-commonjs/index.js",

"lint": "just-scripts lint",
"start-test": "just-scripts jest-watch",
"test": "just-scripts test",
"update-snapshots": "just-scripts jest -u"
"test": "jest",
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-utilities/src && yarn docs",
"storybook": "start-storybook",
"start": "yarn storybook"
},

@@ -25,0 +27,0 @@ "devDependencies": {

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