feat: update typescript version and remove utility types dependencies for react packages (#3422)
* fix: update utility types dependencies for react packages * chore: update typescript versions * remove most utility types and update typings * update tooling package.json * adadress typing issues * update msft package of utility-types * fix issue with missing coverage * remove utility-types from all packages * adds onFinish getter required by api-extractor * update react tests * wrap timers in act to drop warning * fix intersection observer test type * update test coverage Co-authored-by: Jane Chu <7559015+janechu@users.noreply.github.com> Co-authored-by: nicholasrice <nicholas.rice119@gmail.com>
This commit is contained in:
Родитель
037608cf72
Коммит
09d07b580c
|
@ -109,7 +109,7 @@
|
|||
"ts-node": "^8.8.2",
|
||||
"typedoc": "^0.14.2",
|
||||
"typedoc-plugin-markdown": "^2.2.17",
|
||||
"typescript": "3.3.3",
|
||||
"typescript": "^3.9.0",
|
||||
"yargs": "^11.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
@ -32,6 +32,6 @@
|
|||
"@microsoft/eslint-config-fast-dna": "^1.1.4",
|
||||
"eslint-config-prettier": "^6.10.1",
|
||||
"prettier": "2.0.2",
|
||||
"typescript": "3.3.3"
|
||||
"typescript": "^3.9.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
"@microsoft/eslint-config-fast-dna": "^1.1.4",
|
||||
"eslint-config-prettier": "^6.10.1",
|
||||
"prettier": "2.0.2",
|
||||
"typescript": "3.3.3"
|
||||
"typescript": "^3.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@microsoft/fast-components-class-name-contracts-base": "^4.7.3"
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
"react-test-renderer": "^16.3.0",
|
||||
"ts-jest": "^25.4.0",
|
||||
"ts-loader": "^4.0.1",
|
||||
"typescript": "3.3.3"
|
||||
"typescript": "^3.9.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"lodash-es": "^4.0.0",
|
||||
|
|
|
@ -111,8 +111,7 @@
|
|||
"rimraf": "^2.6.2",
|
||||
"ts-jest": "^25.4.0",
|
||||
"ts-loader": "^4.0.1",
|
||||
"typescript": "3.3.3",
|
||||
"utility-types": "^2.1.0",
|
||||
"typescript": "^3.9.0",
|
||||
"yargs": "^11.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -128,7 +127,6 @@
|
|||
"@microsoft/fast-web-utilities": "^4.5.2",
|
||||
"exenv-es6": "^1.0.0",
|
||||
"raf-throttle": "^2.0.3",
|
||||
"tabbable": "^4.0.0",
|
||||
"utility-types": "^2.1.0"
|
||||
"tabbable": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ import {
|
|||
CheckboxClassNameContract,
|
||||
ManagedClasses,
|
||||
} from "@microsoft/fast-components-class-name-contracts-base";
|
||||
import { Omit } from "utility-types";
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
|
|
|
@ -3,7 +3,6 @@ import {
|
|||
ContextMenuItemClassNameContract,
|
||||
ManagedClasses,
|
||||
} from "@microsoft/fast-components-class-name-contracts-base";
|
||||
import { Omit } from "utility-types";
|
||||
import { ContextMenuItemRole } from "./context-menu-item";
|
||||
|
||||
export type ContextMenuItemManagedClasses = ManagedClasses<
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { storiesOf } from "@storybook/react";
|
||||
import React from "react";
|
||||
import { isEqual, omit } from "lodash-es";
|
||||
import { Omit } from "utility-types";
|
||||
import DataGrid, {
|
||||
DataGridCellRenderConfig,
|
||||
DataGridColumn,
|
||||
|
|
|
@ -3,7 +3,6 @@ import {
|
|||
DividerClassNameContract,
|
||||
ManagedClasses,
|
||||
} from "@microsoft/fast-components-class-name-contracts-base";
|
||||
import { Omit } from "utility-types";
|
||||
|
||||
/**
|
||||
* Divider HTML Roles
|
||||
|
|
|
@ -626,7 +626,7 @@ describe("horizontal overflow", (): void => {
|
|||
expect(resizeCallback.mock.calls[0][0]).not.toBe("resize");
|
||||
});
|
||||
test("should create a resize observer if it is available", (): void => {
|
||||
const ActualObserver: ConstructibleResizeObserver = (window as WindowWithResizeObserver)
|
||||
const ActualObserver: ConstructibleResizeObserver = ((window as unknown) as WindowWithResizeObserver)
|
||||
.ResizeObserver;
|
||||
const construct: jest.Mock<any, any> = jest.fn();
|
||||
// Mock the resize observer
|
||||
|
@ -638,7 +638,7 @@ describe("horizontal overflow", (): void => {
|
|||
construct();
|
||||
}
|
||||
}
|
||||
(window as WindowWithResizeObserver).ResizeObserver = MockObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = MockObserver;
|
||||
|
||||
// Render the component
|
||||
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
||||
|
@ -650,10 +650,10 @@ describe("horizontal overflow", (): void => {
|
|||
|
||||
expect(construct).toBeCalledTimes(1);
|
||||
// Replace the window to it's original state
|
||||
(window as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
});
|
||||
test("should disconnect the resize observer when unmounted", (): void => {
|
||||
const ActualObserver: ConstructibleResizeObserver = (window as WindowWithResizeObserver)
|
||||
const ActualObserver: ConstructibleResizeObserver = ((window as unknown) as WindowWithResizeObserver)
|
||||
.ResizeObserver;
|
||||
const disconnect: jest.Mock<any, any> = jest.fn();
|
||||
// Mock the resize observer
|
||||
|
@ -663,7 +663,7 @@ describe("horizontal overflow", (): void => {
|
|||
public unobserve: jest.Mock<any, any> = jest.fn();
|
||||
public disconnect: jest.Mock<any, any> = disconnect;
|
||||
}
|
||||
(window as WindowWithResizeObserver).ResizeObserver = MockObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = MockObserver;
|
||||
|
||||
const rendered: any = mount(
|
||||
<HorizontalOverflow managedClasses={managedClasses}>
|
||||
|
@ -675,7 +675,7 @@ describe("horizontal overflow", (): void => {
|
|||
|
||||
expect(disconnect).toBeCalledTimes(1);
|
||||
// Replace the window to it's original state
|
||||
(window as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
});
|
||||
test("should cancel any queued callbacks on unmount", (): void => {
|
||||
const actualRafThrottle: typeof rafThrottle = rafThrottle;
|
||||
|
|
|
@ -220,8 +220,8 @@ class HorizontalOverflow extends Foundation<
|
|||
// Revisit usage once Safari and Firefox adapt
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1272409
|
||||
// https://bugs.webkit.org/show_bug.cgi?id=157743
|
||||
if ((window as WindowWithResizeObserver).ResizeObserver) {
|
||||
this.resizeObserver = new (window as WindowWithResizeObserver).ResizeObserver(
|
||||
if (((window as unknown) as WindowWithResizeObserver).ResizeObserver) {
|
||||
this.resizeObserver = new ((window as unknown) as WindowWithResizeObserver).ResizeObserver(
|
||||
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
||||
(entries: ResizeObserverEntry[]): void => {
|
||||
if (this.overflow !== this.isOverflow()) {
|
||||
|
|
|
@ -3,7 +3,6 @@ import {
|
|||
ImageClassNameContract,
|
||||
ManagedClasses,
|
||||
} from "@microsoft/fast-components-class-name-contracts-base";
|
||||
import { Omit } from "utility-types";
|
||||
|
||||
export type ImageUnhandledProps = Omit<
|
||||
React.HTMLAttributes<HTMLImageElement | HTMLPictureElement>,
|
||||
|
|
|
@ -18,5 +18,5 @@ export const ListboxContext: React.Context<ListboxContextType> = React.createCon
|
|||
listboxItemInvoked: null,
|
||||
listboxItemFocused: null,
|
||||
listboxSelectedItems: [],
|
||||
listboxMultiselectable: false,
|
||||
listboxMultiselectable: false as boolean,
|
||||
});
|
||||
|
|
|
@ -3,7 +3,6 @@ import {
|
|||
ManagedClasses,
|
||||
NumberFieldClassNameContract,
|
||||
} from "@microsoft/fast-components-class-name-contracts-base";
|
||||
import { Omit } from "utility-types";
|
||||
|
||||
export type NumberFieldManagedClasses = ManagedClasses<NumberFieldClassNameContract>;
|
||||
export type NumberFieldUnhandledProps = Omit<
|
||||
|
|
|
@ -3,7 +3,6 @@ import {
|
|||
ManagedClasses,
|
||||
RadioClassNameContract,
|
||||
} from "@microsoft/fast-components-class-name-contracts-base";
|
||||
import { Omit } from "utility-types";
|
||||
|
||||
export interface RadioHandledProps extends RadioManagedClasses {
|
||||
/**
|
||||
|
|
|
@ -3,7 +3,6 @@ import {
|
|||
ManagedClasses,
|
||||
SelectClassNameContract,
|
||||
} from "@microsoft/fast-components-class-name-contracts-base";
|
||||
import { Omit } from "utility-types";
|
||||
import { ListboxItemProps } from "../listbox-item";
|
||||
import { ViewportPositionerProps } from "../viewport-positioner";
|
||||
import { SelectState } from "./select";
|
||||
|
|
|
@ -19,4 +19,4 @@ export const SliderContext: React.Context<SliderContextType> = React.createConte
|
|||
sliderState: null,
|
||||
sliderValueAsPercent: null,
|
||||
sliderDirection: Direction.ltr,
|
||||
});
|
||||
} as SliderContextType);
|
||||
|
|
|
@ -123,7 +123,7 @@ describe("stack panel", (): void => {
|
|||
});
|
||||
|
||||
test("should create a resize observer if it is available", (): void => {
|
||||
const ActualObserver: ConstructibleResizeObserver = (window as WindowWithResizeObserver)
|
||||
const ActualObserver: ConstructibleResizeObserver = ((window as unknown) as WindowWithResizeObserver)
|
||||
.ResizeObserver;
|
||||
const construct: jest.Mock<any, any> = jest.fn();
|
||||
// Mock the resize observer
|
||||
|
@ -135,18 +135,18 @@ describe("stack panel", (): void => {
|
|||
construct();
|
||||
}
|
||||
}
|
||||
(window as WindowWithResizeObserver).ResizeObserver = MockObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = MockObserver;
|
||||
|
||||
// Render the component
|
||||
mount(<StackPanel>{sampleStackPanelItems}</StackPanel>);
|
||||
|
||||
expect(construct).toBeCalledTimes(1);
|
||||
// Replace the window to it's original state
|
||||
(window as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
});
|
||||
|
||||
test("should disconnect the resize observer when unmounted", (): void => {
|
||||
const ActualObserver: ConstructibleResizeObserver = (window as WindowWithResizeObserver)
|
||||
const ActualObserver: ConstructibleResizeObserver = ((window as unknown) as WindowWithResizeObserver)
|
||||
.ResizeObserver;
|
||||
const disconnect: jest.Mock<any, any> = jest.fn();
|
||||
// Mock the resize observer
|
||||
|
@ -156,7 +156,7 @@ describe("stack panel", (): void => {
|
|||
public unobserve: jest.Mock<any, any> = jest.fn();
|
||||
public disconnect: jest.Mock<any, any> = disconnect;
|
||||
}
|
||||
(window as WindowWithResizeObserver).ResizeObserver = MockObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = MockObserver;
|
||||
|
||||
const rendered: any = mount(<StackPanel>{sampleStackPanelItems}</StackPanel>);
|
||||
// Unmount the component to trigger lifecycle methods
|
||||
|
@ -164,7 +164,7 @@ describe("stack panel", (): void => {
|
|||
|
||||
expect(disconnect).toBeCalledTimes(1);
|
||||
// Replace the window to it's original state
|
||||
(window as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
});
|
||||
|
||||
test("getDirection should return direction value when the ltr prop is passed", (): void => {
|
||||
|
|
|
@ -3,7 +3,6 @@ import {
|
|||
ManagedClasses,
|
||||
TextFieldClassNameContract,
|
||||
} from "@microsoft/fast-components-class-name-contracts-base";
|
||||
import { Omit } from "utility-types";
|
||||
|
||||
export enum TextFieldType {
|
||||
email = "email",
|
||||
|
|
|
@ -37,8 +37,8 @@ class DefaultIntersectionObserver {
|
|||
public takeRecords: any = null;
|
||||
}
|
||||
|
||||
(window as WindowWithResizeObserver).ResizeObserver = DefaultResizeObserver;
|
||||
(window as WindowWithIntersectionObserver).IntersectionObserver = DefaultIntersectionObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = DefaultResizeObserver;
|
||||
((window as unknown) as WindowWithIntersectionObserver).IntersectionObserver = DefaultIntersectionObserver;
|
||||
|
||||
const anchorElement: HTMLDivElement = document.createElement("div");
|
||||
|
||||
|
@ -1391,7 +1391,7 @@ describe("viewport positioner", (): void => {
|
|||
const container: HTMLDivElement = document.createElement("div");
|
||||
document.body.appendChild(container);
|
||||
|
||||
const ActualObserver: ConstructibleResizeObserver = (window as WindowWithResizeObserver)
|
||||
const ActualObserver: ConstructibleResizeObserver = ((window as unknown) as WindowWithResizeObserver)
|
||||
.ResizeObserver;
|
||||
const construct: jest.Mock<any, any> = jest.fn();
|
||||
// Mock the resize observer
|
||||
|
@ -1403,7 +1403,7 @@ describe("viewport positioner", (): void => {
|
|||
construct();
|
||||
}
|
||||
}
|
||||
(window as WindowWithResizeObserver).ResizeObserver = MockResizeObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = MockResizeObserver;
|
||||
|
||||
// Render the component
|
||||
/* eslint-disable-next-line @typescript-eslint/no-unused-vars */
|
||||
|
@ -1418,7 +1418,7 @@ describe("viewport positioner", (): void => {
|
|||
|
||||
expect(construct).toBeCalledTimes(1);
|
||||
// Replace the window to it's original state
|
||||
(window as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
|
||||
document.body.removeChild(container);
|
||||
});
|
||||
|
@ -1427,7 +1427,7 @@ describe("viewport positioner", (): void => {
|
|||
const container: HTMLDivElement = document.createElement("div");
|
||||
document.body.appendChild(container);
|
||||
|
||||
const ActualObserver: ConstructibleResizeObserver = (window as WindowWithResizeObserver)
|
||||
const ActualObserver: ConstructibleResizeObserver = ((window as unknown) as WindowWithResizeObserver)
|
||||
.ResizeObserver;
|
||||
const disconnect: jest.Mock<any, any> = jest.fn();
|
||||
// Mock the resize observer
|
||||
|
@ -1436,7 +1436,7 @@ describe("viewport positioner", (): void => {
|
|||
public unobserve: jest.Mock<any, any> = jest.fn();
|
||||
public disconnect: jest.Mock<any, any> = disconnect;
|
||||
}
|
||||
(window as WindowWithResizeObserver).ResizeObserver = MockResizeObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = MockResizeObserver;
|
||||
|
||||
// Render the component
|
||||
const rendered: any = mount(
|
||||
|
@ -1451,7 +1451,7 @@ describe("viewport positioner", (): void => {
|
|||
rendered.unmount();
|
||||
expect(disconnect).toBeCalledTimes(1);
|
||||
// Replace the window to it's original state
|
||||
(window as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
((window as unknown) as WindowWithResizeObserver).ResizeObserver = ActualObserver;
|
||||
|
||||
document.body.removeChild(container);
|
||||
});
|
||||
|
|
|
@ -384,8 +384,9 @@ class ViewportPositioner extends Foundation<
|
|||
}
|
||||
|
||||
if (
|
||||
!(window as WindowWithIntersectionObserver).IntersectionObserver ||
|
||||
!(window as WindowWithResizeObserver).ResizeObserver
|
||||
!((window as unknown) as WindowWithIntersectionObserver)
|
||||
.IntersectionObserver ||
|
||||
!((window as unknown) as WindowWithResizeObserver).ResizeObserver
|
||||
) {
|
||||
this.setNoObserverMode();
|
||||
return;
|
||||
|
@ -397,18 +398,18 @@ class ViewportPositioner extends Foundation<
|
|||
validRefChecksRemaining: 0,
|
||||
});
|
||||
|
||||
this.collisionDetector = new (window as WindowWithIntersectionObserver).IntersectionObserver(
|
||||
this.handleCollision,
|
||||
this.collisionDetector = new ((window as unknown) as WindowWithIntersectionObserver).IntersectionObserver(
|
||||
this.handleCollision as any,
|
||||
{
|
||||
root: viewportElement,
|
||||
rootMargin: "0px",
|
||||
threshold: [0, 1],
|
||||
}
|
||||
);
|
||||
) as IntersectionObserver;
|
||||
this.collisionDetector.observe(this.rootElement.current);
|
||||
this.collisionDetector.observe(anchorElement);
|
||||
|
||||
this.resizeDetector = new (window as WindowWithResizeObserver).ResizeObserver(
|
||||
this.resizeDetector = new ((window as unknown) as WindowWithResizeObserver).ResizeObserver(
|
||||
this.handleResize
|
||||
);
|
||||
this.resizeDetector.observe(anchorElement);
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
"global": {
|
||||
"statements": 95,
|
||||
"branches": 84,
|
||||
"functions": 95,
|
||||
"functions": 85,
|
||||
"lines": 95
|
||||
}
|
||||
},
|
||||
|
@ -113,7 +113,7 @@
|
|||
"react-dom": "^16.8.0",
|
||||
"rimraf": "^2.6.2",
|
||||
"ts-jest": "^25.4.0",
|
||||
"typescript": "3.3.3",
|
||||
"typescript": "^3.9.0",
|
||||
"yargs": "^11.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -131,7 +131,6 @@
|
|||
"@microsoft/fast-jss-utilities": "^4.7.18",
|
||||
"@microsoft/fast-tooling": "^0.6.1",
|
||||
"@microsoft/fast-web-utilities": "^4.5.2",
|
||||
"exenv-es6": "^1.0.0",
|
||||
"utility-types": "^2.1.0"
|
||||
"exenv-es6": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { ButtonBaseClassNameContract as AccentButtonClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { AccentButtonStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ButtonBaseUnhandledProps as AccentButtonUnhandledProps,
|
||||
ButtonBase,
|
||||
|
@ -21,9 +20,9 @@ import accentButtonSchema2 from "./accent-button.schema.2";
|
|||
const AccentButton = manageJss(AccentButtonStyles)(ButtonBase);
|
||||
type AccentButton = InstanceType<typeof AccentButton>;
|
||||
|
||||
type AccentButtonHandledProps = Subtract<
|
||||
type AccentButtonHandledProps = Omit<
|
||||
ButtonBaseHandledProps,
|
||||
ButtonBaseManagedClasses
|
||||
keyof ButtonBaseManagedClasses
|
||||
>;
|
||||
type AccentButtonProps = ManagedJSSProps<
|
||||
ButtonBaseProps,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Omit } from "utility-types";
|
||||
import {
|
||||
ActionToggleClassNameContract,
|
||||
ManagedClasses,
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { ActionToggleClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { ActionToggleStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTActionToggle, {
|
||||
ActionToggleAppearance,
|
||||
ActionToggleManagedClasses,
|
||||
|
@ -20,9 +19,9 @@ import actionToggleSchema2 from "./action-toggle.schema.2";
|
|||
const ActionToggle = manageJss(ActionToggleStyles)(MSFTActionToggle);
|
||||
type ActionToggle = InstanceType<typeof ActionToggle>;
|
||||
|
||||
type ActionToggleHandledProps = Subtract<
|
||||
type ActionToggleHandledProps = Omit<
|
||||
MSFTActionToggleHandledProps,
|
||||
ActionToggleManagedClasses
|
||||
keyof ActionToggleManagedClasses
|
||||
>;
|
||||
type ActionToggleProps = ManagedJSSProps<
|
||||
MSFTActionToggleProps,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Omit } from "utility-types";
|
||||
import {
|
||||
ActionTriggerClassNameContract,
|
||||
ManagedClasses,
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
ActionTriggerStyles,
|
||||
DesignSystem,
|
||||
} from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTActionTrigger, {
|
||||
ActionTriggerAppearance,
|
||||
ActionTriggerManagedClasses,
|
||||
|
@ -23,9 +22,9 @@ import actionTriggerSchema2 from "./action-trigger.schema.2";
|
|||
const ActionTrigger = manageJss(ActionTriggerStyles)(MSFTActionTrigger);
|
||||
type ActionTrigger = InstanceType<typeof ActionTrigger>;
|
||||
|
||||
type ActionTriggerHandledProps = Subtract<
|
||||
type ActionTriggerHandledProps = Omit<
|
||||
MSFTActionTriggerHandledProps,
|
||||
ActionTriggerManagedClasses
|
||||
keyof ActionTriggerManagedClasses
|
||||
>;
|
||||
type ActionTriggerProps = ManagedJSSProps<
|
||||
MSFTActionTriggerProps,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ListboxItemHandledProps as BaseListboxItemHandledProps,
|
||||
ListboxItemManagedClasses as BaseListboxItemManagedClasses,
|
||||
|
@ -15,7 +14,7 @@ export type AutoSuggestOptionManagedClasses = ManagedClasses<
|
|||
>;
|
||||
export interface AutoSuggestOptionHandledProps
|
||||
extends AutoSuggestOptionManagedClasses,
|
||||
Subtract<BaseListboxItemHandledProps, BaseListboxItemManagedClasses> {
|
||||
Omit<BaseListboxItemHandledProps, keyof BaseListboxItemManagedClasses> {
|
||||
/**
|
||||
* The function that formats the display based on current search string
|
||||
*/
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
AutoSuggestOptionStyles,
|
||||
DesignSystem,
|
||||
} from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import autoSuggestOptionSchema from "./auto-suggest-option.schema";
|
||||
import autoSuggestOptionSchema2 from "./auto-suggest-option.schema.2";
|
||||
import MSFTAutoSuggestOption, {
|
||||
|
@ -18,9 +17,9 @@ import MSFTAutoSuggestOption, {
|
|||
const AutoSuggestOption = manageJss(AutoSuggestOptionStyles)(MSFTAutoSuggestOption);
|
||||
type AutoSuggestOption = InstanceType<typeof AutoSuggestOption>;
|
||||
|
||||
type AutoSuggestOptionHandledProps = Subtract<
|
||||
type AutoSuggestOptionHandledProps = Omit<
|
||||
MSFTAutoSuggestOptionHandledProps,
|
||||
AutoSuggestOptionManagedClasses
|
||||
keyof AutoSuggestOptionManagedClasses
|
||||
>;
|
||||
type AutoSuggestOptionProps = ManagedJSSProps<
|
||||
MSFTAutoSuggestOptionProps,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
AutoSuggestHandledProps as BaseAutoSuggestHandledProps,
|
||||
AutoSuggestManagedClasses as BaseAutoSuggestManagedClasses,
|
||||
|
@ -13,7 +12,7 @@ import {
|
|||
export type AutoSuggestManagedClasses = ManagedClasses<AutoSuggestClassNameContract>;
|
||||
export interface AutoSuggestHandledProps
|
||||
extends AutoSuggestManagedClasses,
|
||||
Subtract<BaseAutoSuggestHandledProps, BaseAutoSuggestManagedClasses> {}
|
||||
Omit<BaseAutoSuggestHandledProps, keyof BaseAutoSuggestManagedClasses> {}
|
||||
|
||||
export type AutoSuggestUnhandledProps = BaseAutoSuggestUnhandledProps;
|
||||
export type AutoSuggestProps = AutoSuggestHandledProps & AutoSuggestUnhandledProps;
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { AutoSuggestClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { AutoSuggestStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTAutoSuggest, {
|
||||
AutoSuggestManagedClasses,
|
||||
AutoSuggestUnhandledProps,
|
||||
|
@ -19,9 +18,9 @@ import autoSuggestSchema2 from "./auto-suggest.schema.2";
|
|||
const AutoSuggest = manageJss(AutoSuggestStyles)(MSFTAutoSuggest);
|
||||
type AutoSuggest = InstanceType<typeof AutoSuggest>;
|
||||
|
||||
type AutoSuggestHandledProps = Subtract<
|
||||
type AutoSuggestHandledProps = Omit<
|
||||
MSFTAutoSuggestHandledProps,
|
||||
AutoSuggestManagedClasses
|
||||
keyof AutoSuggestManagedClasses
|
||||
>;
|
||||
type AutoSuggestProps = ManagedJSSProps<
|
||||
MSFTAutoSuggestProps,
|
||||
|
|
|
@ -11,7 +11,6 @@ import {
|
|||
} from "@microsoft/fast-jss-manager-react";
|
||||
import { get, has, memoize } from "lodash-es";
|
||||
import React from "react";
|
||||
import { Omit } from "utility-types";
|
||||
import { BackgroundHandledProps, BackgroundUnhandledProps } from "./background.props";
|
||||
|
||||
export default class Background extends Foundation<
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { BadgeClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { BadgeStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTBadge, {
|
||||
BadgeManagedClasses,
|
||||
BadgeSize,
|
||||
|
@ -20,7 +19,7 @@ import badgeSchema2 from "./badge.schema.2";
|
|||
const Badge = manageJss(BadgeStyles)(MSFTBadge);
|
||||
type Badge = InstanceType<typeof Badge>;
|
||||
|
||||
type BadgeHandledProps = Subtract<MSFTBadgeHandledProps, BadgeManagedClasses>;
|
||||
type BadgeHandledProps = Omit<MSFTBadgeHandledProps, keyof BadgeManagedClasses>;
|
||||
type BadgeProps = ManagedJSSProps<MSFTBadgeProps, BadgeClassNameContract, DesignSystem>;
|
||||
|
||||
export {
|
||||
|
|
|
@ -9,16 +9,15 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { BreadcrumbStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import breadcrumbSchema from "./breadcrumb.schema";
|
||||
import breadcrumbSchema2 from "./breadcrumb.schema.2";
|
||||
|
||||
const Breadcrumb = manageJss(BreadcrumbStyles)(BaseBreadcrumb);
|
||||
type Breadcrumb = InstanceType<typeof Breadcrumb>;
|
||||
|
||||
type BreadcrumbHandledProps = Subtract<
|
||||
type BreadcrumbHandledProps = Omit<
|
||||
BaseBreadcrumbHandledProps,
|
||||
BreadcrumbManagedClasses
|
||||
keyof BreadcrumbManagedClasses
|
||||
>;
|
||||
type BreadcrumbProps = ManagedJSSProps<
|
||||
BaseBreadcrumbProps,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ButtonHandledProps,
|
||||
ButtonManagedClasses,
|
||||
|
@ -13,7 +12,7 @@ import {
|
|||
export type ButtonBaseManagedClasses = ManagedClasses<ButtonBaseClassNameContract>;
|
||||
export interface ButtonBaseHandledProps
|
||||
extends ButtonBaseManagedClasses,
|
||||
Subtract<ButtonHandledProps, ButtonManagedClasses> {
|
||||
Omit<ButtonHandledProps, keyof ButtonManagedClasses> {
|
||||
/**
|
||||
* The preceding content
|
||||
*/
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ButtonHandledProps as BaseButtonHandledProps,
|
||||
ButtonManagedClasses as BaseButtonManagedClasses,
|
||||
|
@ -21,7 +20,7 @@ export enum ButtonAppearance {
|
|||
export type ButtonManagedClasses = ManagedClasses<ButtonClassNameContract>;
|
||||
export interface ButtonHandledProps
|
||||
extends ButtonManagedClasses,
|
||||
Subtract<BaseButtonHandledProps, BaseButtonManagedClasses> {
|
||||
Omit<BaseButtonHandledProps, keyof BaseButtonManagedClasses> {
|
||||
/**
|
||||
* The Button appearance
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { ButtonClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { ButtonStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTButton, {
|
||||
ButtonAppearance,
|
||||
ButtonManagedClasses,
|
||||
|
@ -21,7 +20,7 @@ import buttonSchema2 from "./button.schema.2";
|
|||
const Button = manageJss(ButtonStyles)(MSFTButton);
|
||||
type Button = InstanceType<typeof Button>;
|
||||
|
||||
type ButtonHandledProps = Subtract<MSFTButtonHandledProps, ButtonManagedClasses>;
|
||||
type ButtonHandledProps = Omit<MSFTButtonHandledProps, keyof ButtonManagedClasses>;
|
||||
type ButtonProps = ManagedJSSProps<
|
||||
MSFTButtonProps,
|
||||
ButtonClassNameContract,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Omit } from "utility-types";
|
||||
import {
|
||||
CallToActionClassNameContract,
|
||||
ManagedClasses,
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { CallToActionClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { CallToActionStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTCallToAction, {
|
||||
CallToActionAppearance,
|
||||
CallToActionManagedClasses,
|
||||
|
@ -20,9 +19,9 @@ import callToActionSchema2 from "./call-to-action.schema.2";
|
|||
const CallToAction = manageJss(CallToActionStyles)(MSFTCallToAction);
|
||||
type CallToAction = InstanceType<typeof CallToAction>;
|
||||
|
||||
type CallToActionHandledProps = Subtract<
|
||||
type CallToActionHandledProps = Omit<
|
||||
MSFTCallToActionHandledProps,
|
||||
CallToActionManagedClasses
|
||||
keyof CallToActionManagedClasses
|
||||
>;
|
||||
type CallToActionProps = ManagedJSSProps<
|
||||
MSFTCallToActionProps,
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { CaptionClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { CaptionStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import captionSchema from "./caption.schema";
|
||||
import captionSchema2 from "./caption.schema.2";
|
||||
import MSFTCaption, {
|
||||
|
@ -21,7 +20,7 @@ import MSFTCaption, {
|
|||
const Caption = manageJss(CaptionStyles)(MSFTCaption);
|
||||
type Caption = InstanceType<typeof Caption>;
|
||||
|
||||
type CaptionHandledProps = Subtract<MSFTCaptionHandledProps, CaptionManagedClasses>;
|
||||
type CaptionHandledProps = Omit<MSFTCaptionHandledProps, keyof CaptionManagedClasses>;
|
||||
type CaptionProps = ManagedJSSProps<
|
||||
MSFTCaptionProps,
|
||||
CaptionClassNameContract,
|
||||
|
|
|
@ -10,14 +10,13 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { CardStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import cardSchema from "./card.schema";
|
||||
import cardSchema2 from "./card.schema.2";
|
||||
|
||||
const Card = manageJss(CardStyles)(BaseCard);
|
||||
type Card = InstanceType<typeof Card>;
|
||||
|
||||
type CardHandledProps = Subtract<BaseCardHandledProps, CardManagedClasses>;
|
||||
type CardHandledProps = Omit<BaseCardHandledProps, keyof CardManagedClasses>;
|
||||
type CardProps = ManagedJSSProps<BaseCardProps, CardClassNameContract, DesignSystem>;
|
||||
|
||||
export {
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { CarouselClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { CarouselStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import carouselSchema from "./carousel.schema";
|
||||
import carouselSchema2 from "./carousel.schema.2";
|
||||
import MSFTCarousel, {
|
||||
|
@ -22,7 +21,7 @@ import MSFTCarousel, {
|
|||
const Carousel = manageJss(CarouselStyles)(MSFTCarousel);
|
||||
type Carousel = InstanceType<typeof Carousel>;
|
||||
|
||||
type CarouselHandledProps = Subtract<MSFTCarouselHandledProps, CarouselManagedClasses>;
|
||||
type CarouselHandledProps = Omit<MSFTCarouselHandledProps, keyof CarouselManagedClasses>;
|
||||
type CarouselProps = ManagedJSSProps<
|
||||
MSFTCarouselProps,
|
||||
CarouselClassNameContract,
|
||||
|
|
|
@ -11,7 +11,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { CheckboxStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import checkboxSchema from "./checkbox.schema";
|
||||
import checkboxSchema2 from "./checkbox.schema.2";
|
||||
|
||||
|
@ -22,7 +21,7 @@ import checkboxSchema2 from "./checkbox.schema.2";
|
|||
const Checkbox = manageJss(CheckboxStyles)(BaseCheckbox);
|
||||
type Checkbox = InstanceType<typeof Checkbox>;
|
||||
|
||||
type CheckboxHandledProps = Subtract<MSFTCheckboxHandledProps, CheckboxManagedClasses>;
|
||||
type CheckboxHandledProps = Omit<MSFTCheckboxHandledProps, keyof CheckboxManagedClasses>;
|
||||
type CheckboxProps = ManagedJSSProps<
|
||||
MSFTCheckboxProps,
|
||||
CheckboxClassNameContract,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ContextMenuItemHandledProps as BaseContextMenuItemHandledProps,
|
||||
ContextMenuItemManagedClasses as BaseContextMenuItemManagedClasses,
|
||||
|
@ -15,7 +14,7 @@ export type ContextMenuItemManagedClasses = ManagedClasses<
|
|||
>;
|
||||
export interface ContextMenuItemHandledProps
|
||||
extends ContextMenuItemManagedClasses,
|
||||
Subtract<BaseContextMenuItemHandledProps, BaseContextMenuItemManagedClasses> {
|
||||
Omit<BaseContextMenuItemHandledProps, keyof BaseContextMenuItemManagedClasses> {
|
||||
/**
|
||||
* The element that comes after the primary content
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,6 @@ import {
|
|||
ContextMenuItemStyles,
|
||||
DesignSystem,
|
||||
} from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import contextMenuItemSchema from "./context-menu-item.schema";
|
||||
import contextMenuItemSchema2 from "./context-menu-item.schema.2";
|
||||
import MSFTContextMenuItem, {
|
||||
|
@ -19,9 +18,9 @@ import MSFTContextMenuItem, {
|
|||
const ContextMenuItem = manageJss(ContextMenuItemStyles)(MSFTContextMenuItem);
|
||||
type ContextMenuItem = InstanceType<typeof ContextMenuItem>;
|
||||
|
||||
type ContextMenuItemHandledProps = Subtract<
|
||||
type ContextMenuItemHandledProps = Omit<
|
||||
MSFTContextMenuItemHandledProps,
|
||||
ContextMenuItemManagedClasses
|
||||
keyof ContextMenuItemManagedClasses
|
||||
>;
|
||||
type ContextMenuItemProps = ManagedJSSProps<
|
||||
MSFTContextMenuItemProps,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ContextMenuHandledProps as BaseContextMenuHandledProps,
|
||||
ContextMenuManagedClasses as BaseContextMenuManagedClasses,
|
||||
|
@ -13,7 +12,7 @@ import {
|
|||
export type ContextMenuManagedClasses = ManagedClasses<ContextMenuClassNameContract>;
|
||||
export interface ContextMenuHandledProps
|
||||
extends ContextMenuManagedClasses,
|
||||
Subtract<BaseContextMenuHandledProps, BaseContextMenuManagedClasses> {}
|
||||
Omit<BaseContextMenuHandledProps, keyof BaseContextMenuManagedClasses> {}
|
||||
|
||||
export type ContextMenuUnhandledProps = BaseContextMenuUnhandledProps;
|
||||
export type ContextMenuProps = ContextMenuHandledProps & ContextMenuUnhandledProps;
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { ContextMenuClassNameContract } from "@microsoft/fast-components-class-name-contracts-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { ContextMenuStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import contextMenuSchema from "./context-menu.schema";
|
||||
import contextMenuSchema2 from "./context-menu.schema.2";
|
||||
import MSFTContextMenu, {
|
||||
|
@ -15,9 +14,9 @@ import MSFTContextMenu, {
|
|||
const ContextMenu = manageJss(ContextMenuStyles)(MSFTContextMenu);
|
||||
type ContextMenu = InstanceType<typeof ContextMenu>;
|
||||
|
||||
type ContextMenuHandledProps = Subtract<
|
||||
type ContextMenuHandledProps = Omit<
|
||||
MSFTContextMenuHandledProps,
|
||||
ContextMenuManagedClasses
|
||||
keyof ContextMenuManagedClasses
|
||||
>;
|
||||
type ContextMenuProps = ManagedJSSProps<
|
||||
MSFTContextMenuProps,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { storiesOf } from "@storybook/react";
|
||||
import React from "react";
|
||||
import { isEqual, omit } from "lodash-es";
|
||||
import { Omit } from "utility-types";
|
||||
import {
|
||||
DataGrid,
|
||||
DataGridCellProps,
|
||||
|
|
|
@ -13,7 +13,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DataGridStyles, DesignSystem } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import dataGridSchema from "./data-grid.schema";
|
||||
|
||||
/*
|
||||
|
@ -23,7 +22,7 @@ import dataGridSchema from "./data-grid.schema";
|
|||
const DataGrid = manageJss(DataGridStyles)(BaseDataGrid);
|
||||
type DataGrid = InstanceType<typeof DataGrid>;
|
||||
|
||||
type DataGridHandledProps = Subtract<BaseDataGridHandledProps, DataGridManagedClasses>;
|
||||
type DataGridHandledProps = Omit<BaseDataGridHandledProps, keyof DataGridManagedClasses>;
|
||||
type DataGridProps = ManagedJSSProps<
|
||||
BaseDataGridProps,
|
||||
DataGridClassNameContract,
|
||||
|
|
|
@ -9,7 +9,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, DialogStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import dialogSchema from "./dialog.schema";
|
||||
import dialogSchema2 from "./dialog.schema.2";
|
||||
|
||||
|
@ -20,7 +19,7 @@ import dialogSchema2 from "./dialog.schema.2";
|
|||
const Dialog = manageJss(DialogStyles)(BaseDialog);
|
||||
type Dialog = InstanceType<typeof Dialog>;
|
||||
|
||||
type DialogHandledProps = Subtract<BaseDialogHandledProps, DialogManagedClasses>;
|
||||
type DialogHandledProps = Omit<BaseDialogHandledProps, keyof DialogManagedClasses>;
|
||||
type DialogProps = ManagedJSSProps<
|
||||
BaseDialogProps,
|
||||
DialogClassNameContract,
|
||||
|
|
|
@ -10,7 +10,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, DividerStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import dividerSchema from "./divider.schema";
|
||||
|
||||
/*
|
||||
|
@ -20,7 +19,7 @@ import dividerSchema from "./divider.schema";
|
|||
const Divider = manageJss(DividerStyles)(BaseDivider);
|
||||
type Divider = InstanceType<typeof Divider>;
|
||||
|
||||
type DividerHandledProps = Subtract<BaseDividerHandledProps, DividerManagedClasses>;
|
||||
type DividerHandledProps = Omit<BaseDividerHandledProps, keyof DividerManagedClasses>;
|
||||
type DividerProps = ManagedJSSProps<
|
||||
BaseDividerProps,
|
||||
DividerClassNameContract,
|
||||
|
|
|
@ -8,7 +8,6 @@ import {
|
|||
FlipperClassNameContract,
|
||||
ManagedClasses,
|
||||
} from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
|
||||
export enum FlipperDirection {
|
||||
next = "next",
|
||||
|
@ -17,7 +16,7 @@ export enum FlipperDirection {
|
|||
|
||||
export type FlipperManagedClasses = ManagedClasses<FlipperClassNameContract>;
|
||||
export interface FlipperHandledProps
|
||||
extends Subtract<ButtonHandledProps, ButtonManagedClasses>,
|
||||
extends Omit<ButtonHandledProps, keyof ButtonManagedClasses>,
|
||||
FlipperManagedClasses {
|
||||
/**
|
||||
* The flipper direction
|
||||
|
|
|
@ -3,7 +3,6 @@ import { FoundationProps } from "@microsoft/fast-components-foundation-react";
|
|||
import { FlipperClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, FlipperStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTFlipper, {
|
||||
FlipperDirection,
|
||||
FlipperManagedClasses,
|
||||
|
@ -21,7 +20,7 @@ import flipperSchema2 from "./flipper.schema.2";
|
|||
const Flipper = manageJss(FlipperStyles)(MSFTFlipper);
|
||||
type Flipper = InstanceType<typeof Flipper>;
|
||||
|
||||
type FlipperHandledProps = Subtract<MSFTFlipperHandledProps, FlipperManagedClasses>;
|
||||
type FlipperHandledProps = Omit<MSFTFlipperHandledProps, keyof FlipperManagedClasses>;
|
||||
type FlipperProps = ManagedJSSProps<
|
||||
MSFTFlipperProps,
|
||||
FlipperClassNameContract,
|
||||
|
|
|
@ -11,7 +11,6 @@ import {
|
|||
FlyoutClassNameContract,
|
||||
ManagedClasses,
|
||||
} from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
|
||||
export enum FlyoutHorizontalPosition {
|
||||
left = ViewportPositionerHorizontalPosition.left,
|
||||
|
@ -42,7 +41,7 @@ interface ViewportPositionerSubtractedProps extends ViewportPositionerManagedCla
|
|||
|
||||
export type FlyoutManagedClasses = ManagedClasses<FlyoutClassNameContract>;
|
||||
export interface FlyoutHandledProps
|
||||
extends Subtract<ViewportPositionerHandledProps, ViewportPositionerSubtractedProps>,
|
||||
extends Omit<ViewportPositionerHandledProps, keyof ViewportPositionerSubtractedProps>,
|
||||
FlyoutManagedClasses {
|
||||
/**
|
||||
* Reference to the element the positioner is anchored to
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import React from "react";
|
||||
import Adapter from "enzyme-adapter-react-16";
|
||||
import { configure, mount, shallow } from "enzyme";
|
||||
import { Omit } from "utility-types";
|
||||
import { keyCodeEscape } from "@microsoft/fast-web-utilities";
|
||||
import { DisplayNamePrefix } from "../utilities";
|
||||
import MSFTFlyout from "./flyout";
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { storiesOf } from "@storybook/react";
|
||||
import React from "react";
|
||||
import { ViewportContext } from "@microsoft/fast-components-react-base";
|
||||
import { Omit } from "utility-types";
|
||||
import { Heading, HeadingSize } from "../heading";
|
||||
import { AccentButton } from "../accent-button";
|
||||
import { FlyoutAxisPositioningMode } from "./flyout.props";
|
||||
|
|
|
@ -3,7 +3,6 @@ import { FoundationProps } from "@microsoft/fast-components-foundation-react";
|
|||
import { FlyoutClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, FlyoutStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTFlyout, {
|
||||
FlyoutAxisPositioningMode,
|
||||
FlyoutHorizontalPosition,
|
||||
|
@ -23,7 +22,7 @@ import flyoutSchema2 from "./flyout.schema.2";
|
|||
const Flyout = manageJss(FlyoutStyles)(MSFTFlyout);
|
||||
type Flyout = InstanceType<typeof Flyout>;
|
||||
|
||||
type FlyoutHandledProps = Subtract<MSFTFlyoutHandledProps, FlyoutManagedClasses>;
|
||||
type FlyoutHandledProps = Omit<MSFTFlyoutHandledProps, keyof FlyoutManagedClasses>;
|
||||
type FlyoutProps = ManagedJSSProps<
|
||||
MSFTFlyoutProps,
|
||||
FlyoutClassNameContract,
|
||||
|
|
|
@ -3,7 +3,6 @@ import { FoundationProps } from "@microsoft/fast-components-foundation-react";
|
|||
import { HeadingClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, HeadingStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import headingSchema from "./heading.schema";
|
||||
import headingSchema2 from "./heading.schema.2";
|
||||
import MSFTHeading, {
|
||||
|
@ -23,7 +22,7 @@ import MSFTHeading, {
|
|||
const Heading = manageJss(HeadingStyles)(MSFTHeading);
|
||||
type Heading = InstanceType<typeof Heading>;
|
||||
|
||||
type HeadingHandledProps = Subtract<MSFTHeadingHandledProps, HeadingManagedClasses>;
|
||||
type HeadingHandledProps = Omit<MSFTHeadingHandledProps, keyof HeadingManagedClasses>;
|
||||
type HeadingProps = ManagedJSSProps<
|
||||
MSFTHeadingProps,
|
||||
HeadingClassNameContract,
|
||||
|
|
|
@ -9,7 +9,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, HypertextStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import hypertextSchema from "./hypertext.schema";
|
||||
import hypertextSchema2 from "./hypertext.schema.2";
|
||||
|
||||
|
@ -20,7 +19,10 @@ import hypertextSchema2 from "./hypertext.schema.2";
|
|||
const Hypertext = manageJss(HypertextStyles)(BaseHypertext);
|
||||
type Hypertext = InstanceType<typeof Hypertext>;
|
||||
|
||||
type HypertextHandledProps = Subtract<BaseHypertextHandledProps, HypertextManagedClasses>;
|
||||
type HypertextHandledProps = Omit<
|
||||
BaseHypertextHandledProps,
|
||||
keyof HypertextManagedClasses
|
||||
>;
|
||||
type HypertextProps = ManagedJSSProps<
|
||||
BaseHypertextProps,
|
||||
HypertextClassNameContract,
|
||||
|
|
|
@ -11,7 +11,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, ImageStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import imageSchema from "./image.schema";
|
||||
|
||||
/*
|
||||
|
@ -21,7 +20,7 @@ import imageSchema from "./image.schema";
|
|||
const Image = manageJss(ImageStyles)(BaseImage);
|
||||
type Image = InstanceType<typeof Image>;
|
||||
|
||||
type ImageHandledProps = Subtract<BaseImageHandledProps, ImageManagedClasses>;
|
||||
type ImageHandledProps = Omit<BaseImageHandledProps, keyof ImageManagedClasses>;
|
||||
type ImageProps = ManagedJSSProps<BaseImageProps, ImageClassNameContract, DesignSystem>;
|
||||
|
||||
export {
|
||||
|
|
|
@ -11,7 +11,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, LabelStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import labelSchema from "./label.schema";
|
||||
import labelSchema2 from "./label.schema.2";
|
||||
|
||||
|
@ -22,7 +21,7 @@ import labelSchema2 from "./label.schema.2";
|
|||
const Label = manageJss(LabelStyles)(BaseLabel);
|
||||
type Label = InstanceType<typeof Label>;
|
||||
|
||||
type LabelHandledProps = Subtract<BaseLabelHandledProps, LabelManagedClasses>;
|
||||
type LabelHandledProps = Omit<BaseLabelHandledProps, keyof LabelManagedClasses>;
|
||||
type LabelProps = ManagedJSSProps<BaseLabelProps, LabelClassNameContract, DesignSystem>;
|
||||
|
||||
export {
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
DesignSystem,
|
||||
LightweightButtonStyles,
|
||||
} from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ButtonBase,
|
||||
ButtonBaseHandledProps,
|
||||
|
@ -24,9 +23,9 @@ import lightweightButtonSchema2 from "./lightweight-button.schema.2";
|
|||
const LightweightButton = manageJss(LightweightButtonStyles)(ButtonBase);
|
||||
type LightweightButton = InstanceType<typeof LightweightButton>;
|
||||
|
||||
type LightweightButtonHandledProps = Subtract<
|
||||
type LightweightButtonHandledProps = Omit<
|
||||
ButtonBaseHandledProps,
|
||||
ButtonBaseManagedClasses
|
||||
keyof ButtonBaseManagedClasses
|
||||
>;
|
||||
type LightweightButtonProps = ManagedJSSProps<
|
||||
ButtonBaseProps,
|
||||
|
|
|
@ -3,7 +3,6 @@ import { FoundationProps } from "@microsoft/fast-components-foundation-react";
|
|||
import { MetatextClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, MetatextStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import metatextSchema from "./metatext.schema";
|
||||
import metatextSchema2 from "./metatext.schema.2";
|
||||
import MSFTMetatext, {
|
||||
|
@ -21,7 +20,7 @@ import MSFTMetatext, {
|
|||
const Metatext = manageJss(MetatextStyles)(MSFTMetatext);
|
||||
type Metatext = InstanceType<typeof Metatext>;
|
||||
|
||||
type MetatextHandledProps = Subtract<MSFTMetatextHandledProps, MetatextManagedClasses>;
|
||||
type MetatextHandledProps = Omit<MSFTMetatextHandledProps, keyof MetatextManagedClasses>;
|
||||
type MetatextProps = ManagedJSSProps<
|
||||
MSFTMetatextProps,
|
||||
MetatextClassNameContract,
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
DesignSystem,
|
||||
NeutralButtonStyles,
|
||||
} from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ButtonBase,
|
||||
ButtonBaseHandledProps,
|
||||
|
@ -24,9 +23,9 @@ import neutralButtonSchema2 from "./neutral-button.schema.2";
|
|||
const NeutralButton = manageJss(NeutralButtonStyles)(ButtonBase);
|
||||
type NeutralButton = InstanceType<typeof NeutralButton>;
|
||||
|
||||
type NeutralButtonHandledProps = Subtract<
|
||||
type NeutralButtonHandledProps = Omit<
|
||||
ButtonBaseHandledProps,
|
||||
ButtonBaseManagedClasses
|
||||
keyof ButtonBaseManagedClasses
|
||||
>;
|
||||
type NeutralButtonProps = ManagedJSSProps<
|
||||
ButtonBaseProps,
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
DesignSystem,
|
||||
OutlineButtonStyles,
|
||||
} from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ButtonBase,
|
||||
ButtonBaseHandledProps,
|
||||
|
@ -24,9 +23,9 @@ import outlineButtonSchema2 from "./outline-button.schema.2";
|
|||
const OutlineButton = manageJss(OutlineButtonStyles)(ButtonBase);
|
||||
type OutlineButton = InstanceType<typeof OutlineButton>;
|
||||
|
||||
type OutlineButtonHandledProps = Subtract<
|
||||
type OutlineButtonHandledProps = Omit<
|
||||
ButtonBaseHandledProps,
|
||||
ButtonBaseManagedClasses
|
||||
keyof ButtonBaseManagedClasses
|
||||
>;
|
||||
type OutlineButtonProps = ManagedJSSProps<
|
||||
ButtonBaseProps,
|
||||
|
|
|
@ -3,7 +3,6 @@ import { FoundationProps } from "@microsoft/fast-components-foundation-react";
|
|||
import { ParagraphClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, ParagraphStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import paragraphSchema from "./paragraph.schema";
|
||||
import paragraphSchema2 from "./paragraph.schema.2";
|
||||
import MSFTParagraph, {
|
||||
|
@ -21,7 +20,10 @@ import MSFTParagraph, {
|
|||
const Paragraph = manageJss(ParagraphStyles)(MSFTParagraph);
|
||||
type Paragraph = InstanceType<typeof Paragraph>;
|
||||
|
||||
type ParagraphHandledProps = Subtract<MSFTParagraphHandledProps, ParagraphManagedClasses>;
|
||||
type ParagraphHandledProps = Omit<
|
||||
MSFTParagraphHandledProps,
|
||||
keyof ParagraphManagedClasses
|
||||
>;
|
||||
type ParagraphProps = ManagedJSSProps<
|
||||
MSFTParagraphProps,
|
||||
ParagraphClassNameContract,
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { PivotClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, PivotStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import pivotSchema from "./pivot.schema";
|
||||
import pivotSchema2 from "./pivot.schema.2";
|
||||
import MSFTPivot, {
|
||||
|
@ -15,7 +14,7 @@ import MSFTPivot, {
|
|||
const Pivot = manageJss(PivotStyles)(MSFTPivot);
|
||||
type Pivot = InstanceType<typeof Pivot>;
|
||||
|
||||
type PivotHandledProps = Subtract<MSFTPivotHandledProps, PivotManagedClasses>;
|
||||
type PivotHandledProps = Omit<MSFTPivotHandledProps, keyof PivotManagedClasses>;
|
||||
type PivotProps = ManagedJSSProps<MSFTPivotProps, PivotClassNameContract, DesignSystem>;
|
||||
|
||||
export {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
TabsHandledProps as BaseTabsHandledProps,
|
||||
TabsManagedClasses as BaseTabsManagedClasses,
|
||||
|
@ -14,7 +13,7 @@ import {
|
|||
export type PivotManagedClasses = ManagedClasses<PivotClassNameContract>;
|
||||
export interface PivotHandledProps
|
||||
extends PivotManagedClasses,
|
||||
Subtract<BaseTabsHandledProps, BaseTabsManagedClasses> {
|
||||
Omit<BaseTabsHandledProps, keyof BaseTabsManagedClasses> {
|
||||
/**
|
||||
* Items that will make up the pivot and pivot content
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { ProgressClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, ProgressStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTProgress, {
|
||||
ProgressHandledProps as MSFTProgressHandledProps,
|
||||
ProgressProps as MSFTProgressProps,
|
||||
|
@ -20,7 +19,7 @@ import progressSchema2 from "./progress.schema.2";
|
|||
const Progress = manageJss(ProgressStyles)(MSFTProgress);
|
||||
type Progress = InstanceType<typeof Progress>;
|
||||
|
||||
type ProgressHandledProps = Subtract<MSFTProgressHandledProps, ProgressManagedClasses>;
|
||||
type ProgressHandledProps = Omit<MSFTProgressHandledProps, keyof ProgressManagedClasses>;
|
||||
type ProgressProps = ManagedJSSProps<
|
||||
MSFTProgressProps,
|
||||
ProgressClassNameContract,
|
||||
|
|
|
@ -8,7 +8,6 @@ import {
|
|||
ManagedClasses,
|
||||
ProgressClassNameContract,
|
||||
} from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
|
||||
export enum ProgressSize {
|
||||
control = "control",
|
||||
|
@ -18,7 +17,7 @@ export enum ProgressSize {
|
|||
|
||||
export type ProgressManagedClasses = ManagedClasses<ProgressClassNameContract>;
|
||||
export interface ProgressHandledProps
|
||||
extends Subtract<BaseProgressHandledProps, BaseProgressManagedClasses>,
|
||||
extends Omit<BaseProgressHandledProps, keyof BaseProgressManagedClasses>,
|
||||
ProgressManagedClasses {
|
||||
/**
|
||||
* The progress circular prop
|
||||
|
|
|
@ -10,7 +10,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, RadioStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import radioSchema from "./radio.schema";
|
||||
import radioSchema2 from "./radio.schema.2";
|
||||
|
||||
|
@ -21,7 +20,7 @@ import radioSchema2 from "./radio.schema.2";
|
|||
const Radio = manageJss(RadioStyles)(BaseRadio);
|
||||
type Radio = InstanceType<typeof Radio>;
|
||||
|
||||
type RadioHandledProps = Subtract<BaseRadioHandledProps, RadioManagedClasses>;
|
||||
type RadioHandledProps = Omit<BaseRadioHandledProps, keyof RadioManagedClasses>;
|
||||
type RadioProps = ManagedJSSProps<BaseRadioProps, RadioClassNameContract, DesignSystem>;
|
||||
|
||||
export {
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { SelectOptionClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import { DesignSystem, SelectOptionStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import selectOptionSchema from "./select-option.schema";
|
||||
import selectOptionSchema2 from "./select-option.schema.2";
|
||||
import MSFTSelectOption, {
|
||||
|
@ -15,9 +14,9 @@ import MSFTSelectOption, {
|
|||
const SelectOption = manageJss(SelectOptionStyles)(MSFTSelectOption);
|
||||
type SelectOption = InstanceType<typeof SelectOption>;
|
||||
|
||||
type SelectOptionHandledProps = Subtract<
|
||||
type SelectOptionHandledProps = Omit<
|
||||
MSFTSelectOptionHandledProps,
|
||||
SelectOptionManagedClasses
|
||||
keyof SelectOptionManagedClasses
|
||||
>;
|
||||
type SelectOptionProps = ManagedJSSProps<
|
||||
MSFTSelectOptionProps,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ListboxItemHandledProps as BaseListboxItemHandledProps,
|
||||
ListboxItemManagedClasses as BaseListboxItemManagedClasses,
|
||||
|
@ -13,7 +12,7 @@ import {
|
|||
export type SelectOptionManagedClasses = ManagedClasses<SelectOptionClassNameContract>;
|
||||
export interface SelectOptionHandledProps
|
||||
extends SelectOptionManagedClasses,
|
||||
Subtract<BaseListboxItemHandledProps, BaseListboxItemManagedClasses> {
|
||||
Omit<BaseListboxItemHandledProps, keyof BaseListboxItemManagedClasses> {
|
||||
/**
|
||||
* The select option item glyph render prop
|
||||
*/
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { SelectClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, SelectStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTSelect, {
|
||||
SelectHandledProps as MSFTSelectHandledProps,
|
||||
SelectProps as MSFTSelectProps,
|
||||
|
@ -19,7 +18,7 @@ import selectSchema2 from "./select.schema.2";
|
|||
const Select = manageJss(SelectStyles)(MSFTSelect);
|
||||
type Select = InstanceType<typeof Select>;
|
||||
|
||||
type SelectHandledProps = Subtract<MSFTSelectHandledProps, SelectManagedClasses>;
|
||||
type SelectHandledProps = Omit<MSFTSelectHandledProps, keyof SelectManagedClasses>;
|
||||
type SelectProps = ManagedJSSProps<
|
||||
MSFTSelectProps,
|
||||
SelectClassNameContract,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
SelectHandledProps as BaseSelectHandledProps,
|
||||
SelectManagedClasses as BaseSelectManagedClasses,
|
||||
|
@ -13,7 +12,7 @@ import {
|
|||
export type SelectManagedClasses = ManagedClasses<SelectClassNameContract>;
|
||||
export interface SelectHandledProps
|
||||
extends SelectManagedClasses,
|
||||
Subtract<BaseSelectHandledProps, BaseSelectManagedClasses> {}
|
||||
Omit<BaseSelectHandledProps, keyof BaseSelectManagedClasses> {}
|
||||
|
||||
export type SelectUnhandledProps = BaseSelectUnhandledProps;
|
||||
export type SelectProps = SelectHandledProps & SelectUnhandledProps;
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { SliderLabelClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import { DesignSystem, SliderLabelStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import sliderLabelSchema from "./slider-label.schema";
|
||||
import sliderLabelSchema2 from "./slider-label.schema.2";
|
||||
import MSFTSliderLabel, {
|
||||
|
@ -15,9 +14,9 @@ import MSFTSliderLabel, {
|
|||
const SliderLabel = manageJss(SliderLabelStyles)(MSFTSliderLabel);
|
||||
type SliderLabel = InstanceType<typeof SliderLabel>;
|
||||
|
||||
type SliderLabelHandledProps = Subtract<
|
||||
type SliderLabelHandledProps = Omit<
|
||||
MSFTSliderLabelHandledProps,
|
||||
SliderLabelManagedClasses
|
||||
keyof SliderLabelManagedClasses
|
||||
>;
|
||||
type SliderLabelProps = ManagedJSSProps<
|
||||
MSFTSliderLabelProps,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Omit } from "utility-types";
|
||||
import {
|
||||
SliderTrackItemHandledProps as BaseSliderTrackItemHandledProps,
|
||||
SliderTrackItemManagedClasses as BaseSliderTrackItemManagedClasses,
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { SliderClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, SliderStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import MSFTSlider, {
|
||||
SliderHandledProps as MSFTSliderHandledProps,
|
||||
SliderProps as MSFTSliderProps,
|
||||
|
@ -19,7 +18,7 @@ import sliderSchema2 from "./slider.schema.2";
|
|||
const Slider = manageJss(SliderStyles)(MSFTSlider);
|
||||
type Slider = InstanceType<typeof Slider>;
|
||||
|
||||
type SliderHandledProps = Subtract<MSFTSliderHandledProps, SliderManagedClasses>;
|
||||
type SliderHandledProps = Omit<MSFTSliderHandledProps, keyof SliderManagedClasses>;
|
||||
type SliderProps = ManagedJSSProps<
|
||||
MSFTSliderProps,
|
||||
SliderClassNameContract,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
SliderHandledProps as BaseSliderHandledProps,
|
||||
SliderManagedClasses as BaseSliderManagedClasses,
|
||||
|
@ -13,7 +12,7 @@ import {
|
|||
export type SliderManagedClasses = ManagedClasses<SliderClassNameContract>;
|
||||
export interface SliderHandledProps
|
||||
extends SliderManagedClasses,
|
||||
Subtract<BaseSliderHandledProps, BaseSliderManagedClasses> {}
|
||||
Omit<BaseSliderHandledProps, keyof BaseSliderManagedClasses> {}
|
||||
|
||||
export type SliderUnhandledProps = BaseSliderUnhandledProps;
|
||||
export type SliderProps = SliderHandledProps & SliderUnhandledProps;
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
DesignSystem,
|
||||
StealthButtonStyles,
|
||||
} from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
ButtonBase,
|
||||
ButtonBaseHandledProps,
|
||||
|
@ -24,9 +23,9 @@ import stealthButtonSchema2 from "./stealth-button.schema.2";
|
|||
const StealthButton = manageJss(StealthButtonStyles)(ButtonBase);
|
||||
type StealthButton = InstanceType<typeof StealthButton>;
|
||||
|
||||
type StealthButtonHandledProps = Subtract<
|
||||
type StealthButtonHandledProps = Omit<
|
||||
ButtonBaseHandledProps,
|
||||
ButtonBaseManagedClasses
|
||||
keyof ButtonBaseManagedClasses
|
||||
>;
|
||||
type StealthButtonProps = ManagedJSSProps<
|
||||
ButtonBaseProps,
|
||||
|
|
|
@ -3,7 +3,6 @@ import { FoundationProps } from "@microsoft/fast-components-foundation-react";
|
|||
import { SubheadingClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, SubheadingStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import subheadingSchema from "./subheading.schema";
|
||||
import subheadingSchema2 from "./subheading.schema.2";
|
||||
import MSFTSubheading, {
|
||||
|
@ -22,9 +21,9 @@ import MSFTSubheading, {
|
|||
const Subheading = manageJss(SubheadingStyles)(MSFTSubheading);
|
||||
type Subheading = InstanceType<typeof MSFTSubheading>;
|
||||
|
||||
type SubheadingHandledProps = Subtract<
|
||||
type SubheadingHandledProps = Omit<
|
||||
MSFTSubheadingHandledProps,
|
||||
SubheadingManagedClasses
|
||||
keyof SubheadingManagedClasses
|
||||
>;
|
||||
type SubheadingProps = ManagedJSSProps<
|
||||
MSFTSubheadingProps,
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { TextActionClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, TextActionStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import textActionSchema from "./text-action.schema";
|
||||
import textActionSchema2 from "./text-action.schema.2";
|
||||
import {
|
||||
|
@ -22,9 +21,9 @@ import MSFTTextAction from "./text-action";
|
|||
const TextAction = manageJss(TextActionStyles)(MSFTTextAction);
|
||||
type TextAction = InstanceType<typeof TextAction>;
|
||||
|
||||
type TextActionHandledProps = Subtract<
|
||||
type TextActionHandledProps = Omit<
|
||||
MSFTTextActionHandledProps,
|
||||
TextActionManagedClasses
|
||||
keyof TextActionManagedClasses
|
||||
>;
|
||||
type TextActionProps = ManagedJSSProps<
|
||||
MSFTTextActionProps,
|
||||
|
|
|
@ -5,7 +5,6 @@ import {
|
|||
TextFieldHandledProps,
|
||||
TextFieldManagedClasses,
|
||||
} from "@microsoft/fast-components-react-base";
|
||||
import { Omit, Subtract } from "utility-types";
|
||||
|
||||
export enum TextActionAppearance {
|
||||
filled = "filled",
|
||||
|
@ -24,7 +23,7 @@ export type TextActionUnhandledProps = Omit<
|
|||
"type"
|
||||
>;
|
||||
export interface TextActionHandledProps
|
||||
extends Subtract<TextFieldHandledProps, TextFieldManagedClasses>,
|
||||
extends Omit<TextFieldHandledProps, keyof TextFieldManagedClasses>,
|
||||
TextActionManagedClasses {
|
||||
/**
|
||||
* The text action appearance
|
||||
|
|
|
@ -9,7 +9,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, TextAreaStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import textAreaSchema from "./text-area.schema";
|
||||
|
||||
/*
|
||||
|
@ -19,7 +18,7 @@ import textAreaSchema from "./text-area.schema";
|
|||
const TextArea = manageJss(TextAreaStyles)(BaseTextArea);
|
||||
type TextArea = InstanceType<typeof TextArea>;
|
||||
|
||||
type TextAreaHandledProps = Subtract<BaseTextAreaHandledProps, TextAreaManagedClasses>;
|
||||
type TextAreaHandledProps = Omit<BaseTextAreaHandledProps, keyof TextAreaManagedClasses>;
|
||||
type TextAreaProps = ManagedJSSProps<
|
||||
BaseTextAreaProps,
|
||||
TextAreaClassNameContract,
|
||||
|
|
|
@ -3,7 +3,6 @@ import { TextFieldClassNameContract } from "@microsoft/fast-components-class-nam
|
|||
import { TextFieldType } from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, TextFieldStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import textFieldSchema from "./text-field.schema";
|
||||
import MSFTTextField, {
|
||||
TextFieldHandledProps as MSFTTextFieldHandledProps,
|
||||
|
@ -20,7 +19,10 @@ import MSFTTextField, {
|
|||
const TextField = manageJss(TextFieldStyles)(MSFTTextField);
|
||||
type TextField = InstanceType<typeof TextField>;
|
||||
|
||||
type TextFieldHandledProps = Subtract<MSFTTextFieldHandledProps, TextFieldManagedClasses>;
|
||||
type TextFieldHandledProps = Omit<
|
||||
MSFTTextFieldHandledProps,
|
||||
keyof TextFieldManagedClasses
|
||||
>;
|
||||
type TextFieldProps = ManagedJSSProps<
|
||||
MSFTTextFieldProps,
|
||||
TextFieldClassNameContract,
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
TextFieldHandledProps as BaseTextFieldHandledProps,
|
||||
TextFieldManagedClasses as BaseTextFieldManagedClasses,
|
||||
|
@ -17,7 +16,7 @@ export enum TextFieldAppearance {
|
|||
export type TextFieldManagedClasses = ManagedClasses<TextFieldClassNameContract>;
|
||||
export interface TextFieldHandledProps
|
||||
extends TextFieldManagedClasses,
|
||||
Subtract<BaseTextFieldHandledProps, BaseTextFieldManagedClasses> {
|
||||
Omit<BaseTextFieldHandledProps, keyof BaseTextFieldManagedClasses> {
|
||||
/**
|
||||
* The TextField appearance
|
||||
*/
|
||||
|
|
|
@ -10,7 +10,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, ToggleStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import toggleSchema from "./toggle.schema";
|
||||
import toggleSchema2 from "./toggle.schema.2";
|
||||
|
||||
|
@ -21,7 +20,7 @@ import toggleSchema2 from "./toggle.schema.2";
|
|||
const Toggle = manageJss(ToggleStyles)(BaseToggle);
|
||||
type Toggle = InstanceType<typeof Toggle>;
|
||||
|
||||
type ToggleHandledProps = Subtract<BaseToggleHandledProps, ToggleManagedClasses>;
|
||||
type ToggleHandledProps = Omit<BaseToggleHandledProps, keyof ToggleManagedClasses>;
|
||||
type ToggleProps = ManagedJSSProps<
|
||||
BaseToggleProps,
|
||||
ToggleClassNameContract,
|
||||
|
|
|
@ -2,7 +2,6 @@ import React from "react";
|
|||
import { TreeViewItemClassNameContract } from "@microsoft/fast-components-class-name-contracts-msft";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, TreeViewItemStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import treeViewItemSchema from "./tree-view-item.schema";
|
||||
import treeViewItemSchema2 from "./tree-view-item.schema.2";
|
||||
import MSFTTreeViewItem, {
|
||||
|
@ -19,9 +18,9 @@ import MSFTTreeViewItem, {
|
|||
const TreeViewItem = manageJss(TreeViewItemStyles)(MSFTTreeViewItem);
|
||||
type TreeViewItem = InstanceType<typeof TreeViewItem>;
|
||||
|
||||
type TreeViewItemHandledProps = Subtract<
|
||||
type TreeViewItemHandledProps = Omit<
|
||||
MSFTTreeViewItemHandledProps,
|
||||
TreeViewItemManagedClasses
|
||||
keyof TreeViewItemManagedClasses
|
||||
>;
|
||||
type TreeViewItemProps = ManagedJSSProps<
|
||||
MSFTTreeViewItemProps,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from "react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
TreeViewItemHandledProps as BaseTreeViewItemHandledProps,
|
||||
TreeViewItemManagedClasses as BaseTreeViewItemManagedClasses,
|
||||
|
@ -13,7 +12,7 @@ import {
|
|||
export type TreeViewItemManagedClasses = ManagedClasses<TreeViewItemClassNameContract>;
|
||||
export interface TreeViewItemHandledProps
|
||||
extends TreeViewItemManagedClasses,
|
||||
Subtract<BaseTreeViewItemHandledProps, BaseTreeViewItemManagedClasses> {
|
||||
Omit<BaseTreeViewItemHandledProps, keyof BaseTreeViewItemManagedClasses> {
|
||||
/**
|
||||
* The preceding content
|
||||
*/
|
||||
|
|
|
@ -9,7 +9,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, TreeViewStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import treeViewSchema from "./tree-view.schema";
|
||||
import treeViewSchema2 from "./tree-view.schema.2";
|
||||
|
||||
|
@ -20,7 +19,7 @@ import treeViewSchema2 from "./tree-view.schema.2";
|
|||
const TreeView = manageJss(TreeViewStyles)(BaseTreeView);
|
||||
type TreeView = InstanceType<typeof TreeView>;
|
||||
|
||||
type TreeViewHandledProps = Subtract<BaseTreeViewHandledProps, TreeViewManagedClasses>;
|
||||
type TreeViewHandledProps = Omit<BaseTreeViewHandledProps, keyof TreeViewManagedClasses>;
|
||||
type TreeViewProps = ManagedJSSProps<
|
||||
BaseTreeViewProps,
|
||||
TreeViewClassNameContract,
|
||||
|
|
|
@ -11,7 +11,6 @@ import {
|
|||
} from "@microsoft/fast-components-react-base";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { DesignSystem, TypographyStyles } from "@microsoft/fast-components-styles-msft";
|
||||
import { Subtract } from "utility-types";
|
||||
import typographySchema from "./typography.schema";
|
||||
import typographySchema2 from "./typography.schema.2";
|
||||
|
||||
|
@ -22,9 +21,9 @@ import typographySchema2 from "./typography.schema.2";
|
|||
const Typography = manageJss(TypographyStyles)(BaseTypography);
|
||||
type Typography = InstanceType<typeof Typography>;
|
||||
|
||||
type TypographyHandledProps = Subtract<
|
||||
type TypographyHandledProps = Omit<
|
||||
BaseTypographyHandledProps,
|
||||
TypographyManagedClasses
|
||||
keyof TypographyManagedClasses
|
||||
>;
|
||||
type TypographyProps = ManagedJSSProps<
|
||||
BaseTypographyProps,
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
"rollup-plugin-typescript": "^1.0.1",
|
||||
"ts-jest": "^25.4.0",
|
||||
"tslib": "^1.10.0",
|
||||
"typescript": "3.3.3"
|
||||
"typescript": "^3.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@microsoft/fast-colors": "^5.0.12",
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
"react-dom": "^16.8.0",
|
||||
"react-test-renderer": "^16.2.0",
|
||||
"ts-jest": "^25.4.0",
|
||||
"typescript": "3.3.3",
|
||||
"typescript": "^3.9.0",
|
||||
"watch": "^1.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
"lodash-es": "^4.17.11",
|
||||
"prettier": "2.0.2",
|
||||
"ts-jest": "^25.4.0",
|
||||
"typescript": "3.3.3"
|
||||
"typescript": "^3.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@microsoft/fast-components-class-name-contracts-base": "^4.7.3",
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
"lodash-es": "^4.17.10",
|
||||
"prettier": "2.0.2",
|
||||
"ts-jest": "^25.4.0",
|
||||
"typescript": "3.3.3"
|
||||
"typescript": "^3.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@microsoft/fast-colors": "^5.0.12",
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
"react-dom": "^16.8.0",
|
||||
"ts-jest": "^25.4.0",
|
||||
"ts-loader": "^4.0.1",
|
||||
"typescript": "3.3.3",
|
||||
"typescript": "^3.9.0",
|
||||
"webpack": "^4.1.0",
|
||||
"webpack-cli": "^3.1.1",
|
||||
"webpack-dev-server": "^3.11.0"
|
||||
|
@ -116,7 +116,6 @@
|
|||
"@microsoft/fast-jss-utilities": "^4.7.18",
|
||||
"@microsoft/fast-web-utilities": "^4.5.2",
|
||||
"exenv-es6": "^1.0.0",
|
||||
"raf-throttle": "^2.0.3",
|
||||
"utility-types": "^2.1.0"
|
||||
"raf-throttle": "^2.0.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import React from "react";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
Canvas as BaseCanvas,
|
||||
CanvasHandledProps as BaseCanvasHandledProps,
|
||||
|
@ -14,7 +13,7 @@ import {
|
|||
const Canvas = manageJss(canvasStyleSheet)(BaseCanvas);
|
||||
type Canvas = typeof Canvas;
|
||||
|
||||
type CanvasHandledProps = Subtract<BaseCanvasHandledProps, CanvasManagedClasses>;
|
||||
type CanvasHandledProps = Omit<BaseCanvasHandledProps, keyof CanvasManagedClasses>;
|
||||
type CanvasProps = ManagedJSSProps<BaseCanvasProps, CanvasClassNamesContract, undefined>;
|
||||
|
||||
export {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import React from "react";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
Column as BaseColumn,
|
||||
ColumnHandledProps as BaseColumnHandledProps,
|
||||
|
@ -13,7 +12,7 @@ import {
|
|||
const Column = manageJss()(BaseColumn);
|
||||
type Column = typeof Column;
|
||||
|
||||
type ColumnHandledProps = Subtract<BaseColumnHandledProps, ColumnManagedClasses>;
|
||||
type ColumnHandledProps = Omit<BaseColumnHandledProps, keyof ColumnManagedClasses>;
|
||||
type ColumnProps = ManagedJSSProps<BaseColumnProps, ColumnClassNamesContract, undefined>;
|
||||
|
||||
export {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import React from "react";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
Container as BaseContainer,
|
||||
ContainerHandledProps as BaseContainerHandledProps,
|
||||
|
@ -14,7 +13,10 @@ import {
|
|||
const Container = manageJss(containerStyleSheet)(BaseContainer);
|
||||
type Container = typeof Container;
|
||||
|
||||
type ContainerHandledProps = Subtract<BaseContainerHandledProps, ContainerManagedClasses>;
|
||||
type ContainerHandledProps = Omit<
|
||||
BaseContainerHandledProps,
|
||||
keyof ContainerManagedClasses
|
||||
>;
|
||||
type ContainerProps = ManagedJSSProps<
|
||||
BaseContainerProps,
|
||||
ContainerClassNamesContract,
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import React from "react";
|
||||
import manageJss, { ManagedJSSProps } from "@microsoft/fast-jss-manager-react";
|
||||
import { Subtract } from "utility-types";
|
||||
import {
|
||||
Grid as BaseGrid,
|
||||
GridHandledProps as BaseGridHandledProps,
|
||||
|
@ -16,7 +15,7 @@ import {
|
|||
const Grid = manageJss()(BaseGrid);
|
||||
type Grid = typeof Grid;
|
||||
|
||||
type GridHandledProps = Subtract<BaseGridHandledProps, GridManagedClasses>;
|
||||
type GridHandledProps = Omit<BaseGridHandledProps, keyof GridManagedClasses>;
|
||||
type GridProps = ManagedJSSProps<BaseGridProps, GridClassNamesContract, undefined>;
|
||||
|
||||
export {
|
||||
|
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче