Remove wix-style-react package (#47586)

Co-authored-by: giladsegal <gilads@wix.com>
This commit is contained in:
Nathan Shively-Sanders 2020-09-14 16:05:07 -07:00 committed by GitHub
parent a0edcf862c
commit 7d58626e47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 6 additions and 203 deletions

View File

@ -5802,6 +5802,12 @@
"sourceRepoURL": "https://github.com/winstonjs/winston.git",
"asOfVersion": "2.4.4"
},
{
"libraryName": "wix-style-react",
"typingsPackageName": "wix-style-react",
"sourceRepoURL": "https://github.com/wix/wix-style-react",
"asOfVersion": "7.47.1"
},
{
"libraryName": "wolfy87-eventemitter",
"typingsPackageName": "wolfy87-eventemitter",

View File

@ -1,8 +0,0 @@
import * as React from 'react';
export interface WixComponentProps {
dataHook?: string;
styles?: string;
}
export default class WixComponent<T extends WixComponentProps = {}> extends React.PureComponent<T> {}

View File

@ -1,31 +0,0 @@
import * as React from 'react';
export interface ButtonProps {
as?: any;
className?: string;
skin?: ButtonSkin;
priority?: ButtonPriority;
size?: ButtonSize;
onClick?: React.MouseEventHandler<HTMLElement>;
fullWidth?: boolean;
suffixIcon?: React.ReactElement;
prefixIcon?: React.ReactElement;
disabled?: boolean;
dataHook?: string;
}
export default class Button extends React.Component<ButtonProps> {}
export type ButtonSkin =
| 'standard'
| 'inverted'
| 'destructive'
| 'premium'
| 'dark'
| 'light'
| 'transparent'
| 'premium-light';
export type ButtonPriority = 'primary' | 'secondary';
export type ButtonSize = 'tiny' | 'small' | 'medium' | 'large';

View File

@ -1,19 +0,0 @@
import * as React from 'react';
import WixComponent, { WixComponentProps } from './BaseComponents';
export interface LoaderProps extends WixComponentProps {
size?: LoaderSize;
color?: LoaderColor;
text?: React.ReactNode;
status?: LoaderStatus;
statusMessage?: string;
shouldLoadAsync?: boolean;
}
export default class Loader extends WixComponent<LoaderProps> {}
export type LoaderSize = 'tiny' | 'small' | 'medium' | 'large';
export type LoaderColor = 'blue' | 'white';
export type LoaderStatus = 'loading' | 'success' | 'error';

View File

@ -1,27 +0,0 @@
import * as React from 'react';
export interface TextProps {
showTooltip?: boolean;
ellipsis?: boolean;
tagName?: string;
className?: string;
size?: TextSize;
secondary?: boolean;
skin?: TextSkin;
light?: boolean;
weight?: TextWeight;
}
declare const Text: React.SFC<TextProps>;
export default Text;
export type TextSize = 'tiny' | 'small' | 'medium';
export type TextSkin =
| 'standard'
| 'error'
| 'success'
| 'premium'
| 'disabled';
export type TextWeight = 'thin' | 'normal' | 'bold';

View File

@ -1,10 +0,0 @@
// Type definitions for wix-style-react 6.17
// Project: https://github.com/wix/wix-style-react
// Definitions by: Gilad Segal <https://github.com/giladsegal>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.5
export { default as Button, ButtonProps } from './Button';
export { default as Text, TextProps } from './Text';
export { default as WixComponent, WixComponentProps } from './BaseComponents';
export { default as Loader, LoaderProps } from './Loader';

View File

@ -1,10 +0,0 @@
import * as React from 'react';
import WixComponent from 'wix-style-react/BaseComponents';
function WixComponentWithMandatoryProps() {
return <WixComponent />;
}
function WixComponentWithAllProps() {
return <WixComponent dataHook="hook" styles="14px" />;
}

View File

@ -1,24 +0,0 @@
import * as React from 'react';
import Button from 'wix-style-react/Button';
function ButtonWithMandatoryProps() {
return <Button />;
}
function ButtonWithAllProps() {
return (
<Button
as="button"
className="cls"
dataHook="hook"
disabled
fullWidth
onClick={e => undefined}
prefixIcon={<span />}
suffixIcon={<span />}
priority="primary"
size="medium"
skin="dark"
/>
);
}

View File

@ -1,20 +0,0 @@
import * as React from 'react';
import Loader from 'wix-style-react/Loader';
function LoaderWithMandatoryProps() {
return <Loader />;
}
function LoaderWithAllProps() {
return (
<Loader
color="blue"
dataHook="hook"
size="large"
status="error"
statusMessage="msg"
text="text"
shouldLoadAsync
/>
);
}

View File

@ -1,22 +0,0 @@
import * as React from 'react';
import Text from 'wix-style-react/Text';
function TextWithMandatoryProps() {
return <Text />;
}
function TextWithAllProps() {
return (
<Text
className="cssssss"
size="tiny"
ellipsis
light
secondary
showTooltip
skin="standard"
tagName="marquee"
weight="thin"
/>
);
}

View File

@ -1,28 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react"
},
"files": [
"index.d.ts",
"wix-style-react-tests.ts",
"test/Text-tests.tsx",
"test/Button-tests.tsx",
"test/Loader-tests.tsx",
"test/BaseComponents-tests.tsx"
]
}

View File

@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }

View File

@ -1,3 +0,0 @@
// verify that all imports work
import { Button, Text, Loader } from 'wix-style-react';