@mcf/lib-ui 2.4.87 → 2.4.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/Component/BaseButton/BaseButton.d.ts +1 -1
- package/dist/@types/Component/Button/Button.d.ts +3 -2
- package/dist/@types/Component/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/dist/@types/Component/CheckBox/CheckBox.d.ts +1 -1
- package/dist/@types/Component/CheckboxGroup/CheckboxGroup.d.ts +2 -2
- package/dist/@types/Component/CheckboxNew/CheckboxNew.d.ts +1 -1
- package/dist/@types/Component/Dropdown/Dropdown.d.ts +73 -3
- package/dist/@types/Component/Dropdown/index.d.ts +1 -2
- package/dist/@types/Component/DropdownNew/DropdownNew.d.ts +4 -0
- package/dist/@types/Component/DropdownNew/index.d.ts +2 -0
- package/dist/@types/Component/Icon/Icons.d.ts +2 -0
- package/dist/@types/Component/MenuList/MenuItem.d.ts +2 -2
- package/dist/@types/Component/MenuList/MenuList.d.ts +2 -2
- package/dist/@types/Component/MessageBar/index.d.ts +1 -0
- package/dist/@types/Component/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/dist/@types/Component/ReactFileReader/ReactFileReader.d.ts +1 -1
- package/dist/@types/Component/StickyHeader/StickyHeader.d.ts +1 -1
- package/dist/@types/Component/Tabs/Tabs.d.ts +3 -3
- package/dist/@types/Component/TextArea/TextArea.d.ts +2 -2
- package/dist/@types/Component/TextInput/TextInput.d.ts +1 -1
- package/dist/@types/Component/Toggle/Toggle.d.ts +6 -0
- package/dist/@types/Component/Toggle/index.d.ts +1 -0
- package/dist/@types/Component/TypeAhead/TypeAhead.d.ts +2 -2
- package/dist/@types/Component/index.d.ts +3 -1
- package/dist/@types/Example/ReactFileReader/ReactFileReader.story.d.ts +2 -2
- package/dist/@types/Example/ReactFileReader/index.d.ts +1 -1
- package/dist/@types/storyguide/Buttons/BaseButton.d.ts +17 -0
- package/dist/@types/storyguide/JobCard/Bookmark/BookmarkButton.d.ts +6 -0
- package/dist/@types/storyguide/JobCard/CompanyInfo.d.ts +2 -0
- package/dist/@types/storyguide/JobCard/JobBenefit.d.ts +2 -0
- package/dist/@types/storyguide/JobCard/JobCard.d.ts +2 -0
- package/dist/@types/storyguide/JobCard/JobInfo.d.ts +2 -0
- package/dist/@types/storyguide/JobCard/JobLastPostedDate.d.ts +2 -0
- package/dist/@types/storyguide/JobCard/JobPostStatus.d.ts +2 -0
- package/dist/@types/storyguide/JobCard/JobSkillInfo.d.ts +2 -0
- package/dist/@types/storyguide/JobCard/JobSponsor.d.ts +2 -0
- package/dist/@types/storyguide/JobCard/JobTitle.d.ts +2 -0
- package/dist/@types/storyguide/JobCard/SalaryInfo.d.ts +2 -0
- package/dist/@types/storyguide/Skills/Score.d.ts +6 -0
- package/dist/@types/storyguide/Skills/Scorebar.d.ts +6 -0
- package/dist/@types/storyguide/Skills/SkillPill.d.ts +7 -0
- package/dist/@types/storyguide/Text/Font.d.ts +12 -0
- package/dist/@types/storyguide/Text/TextSize.d.ts +4 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/jest.config.js +2 -2
- package/package.json +20 -12
- package/test/helpers/enzyme.ts +4 -0
- package/test/helpers/index.ts +2 -0
- package/jest.setup.ts +0 -8
- /package/dist/@types/Component/{Dropdown/Dropdown.constants.d.ts → DropdownNew/DropdownNew.constants.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { FC, ButtonHTMLAttributes, DetailedHTMLProps, ReactElement } from 'react';
|
|
2
2
|
import { ButtonCategory, ButtonColor, ButtonPadding, ButtonSize } from './ButtonConstants';
|
|
3
3
|
import { IconProps } from '../Icon/Icon';
|
|
4
4
|
export interface IButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
|
@@ -10,7 +10,8 @@ export interface IButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTM
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
leftIconProps?: IconProps;
|
|
12
12
|
rightIconProps?: IconProps;
|
|
13
|
+
content?: ReactElement;
|
|
13
14
|
badgeCount?: number;
|
|
14
15
|
}
|
|
15
|
-
declare const Button:
|
|
16
|
+
declare const Button: FC<IButtonProps>;
|
|
16
17
|
export default Button;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
2
2
|
import { IButtonProps } from '../Button/Button';
|
|
3
3
|
interface IButtonGroupProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
|
|
4
4
|
buttons: IButtonProps[];
|
|
@@ -6,5 +6,5 @@ interface IButtonGroupProps extends DetailedHTMLProps<HTMLAttributes<HTMLDivElem
|
|
|
6
6
|
onActiveButtonChange?: (index: number) => any;
|
|
7
7
|
activeButtonClass?: string;
|
|
8
8
|
}
|
|
9
|
-
declare const ButtonGroup: ({ activeButton, activeButtonClass, buttons, className, onActiveButtonChange, ...divProps }: IButtonGroupProps) =>
|
|
9
|
+
declare const ButtonGroup: ({ activeButton, activeButtonClass, buttons, className, onActiveButtonChange, ...divProps }: IButtonGroupProps) => JSX.Element;
|
|
10
10
|
export default ButtonGroup;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { ICheckboxProps } from '../CheckboxNew/CheckboxNew';
|
|
3
3
|
export declare enum Orientation {
|
|
4
4
|
Horizontal = "Horizontal",
|
|
@@ -11,5 +11,5 @@ interface ICheckboxGroupProps {
|
|
|
11
11
|
checkboxInformation: ICheckboxProps[];
|
|
12
12
|
error?: string;
|
|
13
13
|
}
|
|
14
|
-
declare const CheckboxGroup:
|
|
14
|
+
declare const CheckboxGroup: ({ orientation, primaryLabel, secondaryLabel, checkboxInformation, error, }: ICheckboxGroupProps) => JSX.Element;
|
|
15
15
|
export default CheckboxGroup;
|
|
@@ -13,5 +13,5 @@ export interface ICheckboxProps extends React.DetailedHTMLProps<InputHTMLAttribu
|
|
|
13
13
|
errorMessage?: string;
|
|
14
14
|
containerClassName?: string;
|
|
15
15
|
}
|
|
16
|
-
declare const Checkbox:
|
|
16
|
+
declare const Checkbox: (props: ICheckboxProps) => JSX.Element;
|
|
17
17
|
export default Checkbox;
|
|
@@ -1,4 +1,74 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import 'react-select-plus/dist/react-select-plus.css';
|
|
3
|
+
export interface IDropdownProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
data: any[];
|
|
6
|
+
label?: string;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
aria?: {
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
ariaLabelledBy?: string;
|
|
12
|
+
ariaDescribedBy?: string;
|
|
13
|
+
};
|
|
14
|
+
labelKey?: string;
|
|
15
|
+
loadData?: () => void;
|
|
16
|
+
name?: string;
|
|
17
|
+
onChange?: (values: any) => void;
|
|
18
|
+
onInputChange?: (value: string) => void;
|
|
19
|
+
onEnterKeyDown?: () => void;
|
|
20
|
+
options?: {
|
|
21
|
+
async?: boolean;
|
|
22
|
+
maxLength?: number;
|
|
23
|
+
multi?: boolean;
|
|
24
|
+
};
|
|
25
|
+
input?: {
|
|
26
|
+
value?: string;
|
|
27
|
+
onChange?: (value: any) => void;
|
|
28
|
+
onBlur?: () => void;
|
|
29
|
+
};
|
|
30
|
+
meta?: {
|
|
31
|
+
error?: string;
|
|
32
|
+
touched?: boolean;
|
|
33
|
+
};
|
|
34
|
+
searchable?: boolean;
|
|
35
|
+
noResultsText?: string;
|
|
36
|
+
value?: any;
|
|
37
|
+
valueKey?: string;
|
|
38
|
+
placeholder?: string;
|
|
39
|
+
clearable?: boolean;
|
|
40
|
+
onFocus?: () => void;
|
|
41
|
+
onBlur?: () => void;
|
|
42
|
+
}
|
|
43
|
+
export interface IDropdownState {
|
|
44
|
+
value: string | string[] | null;
|
|
45
|
+
}
|
|
46
|
+
export declare class Dropdown extends React.Component<IDropdownProps, IDropdownState> {
|
|
47
|
+
static defaultProps: {
|
|
48
|
+
labelKey: string;
|
|
49
|
+
meta: {};
|
|
50
|
+
options: {
|
|
51
|
+
async: boolean;
|
|
52
|
+
maxLength: number;
|
|
53
|
+
multi: boolean;
|
|
54
|
+
};
|
|
55
|
+
valueKey: string;
|
|
56
|
+
};
|
|
57
|
+
static getDerivedStateFromProps(nextProps: IDropdownProps): {
|
|
58
|
+
value: string | null;
|
|
59
|
+
};
|
|
60
|
+
private static computeValue;
|
|
61
|
+
selectRef: any;
|
|
62
|
+
constructor(props: IDropdownProps);
|
|
63
|
+
render(): JSX.Element | null;
|
|
64
|
+
onInputChange(inputValue: string): void;
|
|
65
|
+
onInputKeyDown(e: {
|
|
66
|
+
keyCode: number;
|
|
67
|
+
preventDefault: () => void;
|
|
68
|
+
}): void;
|
|
69
|
+
onChange(selectedItem: {
|
|
70
|
+
[s: string]: string;
|
|
71
|
+
}): void;
|
|
72
|
+
onChangeMulti(selectedItems: string[]): void;
|
|
73
|
+
loadOptions(input: string, callback: (a: any, b: any) => void): void;
|
|
74
|
+
}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './Dropdown.constants';
|
|
1
|
+
export * from './Dropdown';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DropdownProps } from './DropdownNew.constants';
|
|
3
|
+
declare const Dropdown: ({ width, isSearchable, isDisabled, primaryLabel, secondaryLabel, additionalInfo, errorMsg, placeholder, data, input, variant, customStyles, ...props }: DropdownProps) => JSX.Element;
|
|
4
|
+
export default Dropdown;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export declare const Icons: {
|
|
3
3
|
'arrow-left': import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
4
4
|
'arrow-up-right-from-square': import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
5
|
+
'arrow-up-to-line': import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
5
6
|
badge: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
6
7
|
bars: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
7
8
|
'bars-magnifying-glass': import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
@@ -32,6 +33,7 @@ export declare const Icons: {
|
|
|
32
33
|
'folder-pen': import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
33
34
|
'government-building': import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
34
35
|
'icon-open-new-window': import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
36
|
+
lightning: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
35
37
|
'location-dot': import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
36
38
|
'lock-jobs': import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
37
39
|
lock: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export interface IMenuItem {
|
|
3
3
|
id: string;
|
|
4
4
|
text: string;
|
|
@@ -6,4 +6,4 @@ export interface IMenuItem {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
onChange?: (id: string) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare const MenuItem: ({ id, text, isActive, className, onChange }: IMenuItem) =>
|
|
9
|
+
export declare const MenuItem: ({ id, text, isActive, className, onChange }: IMenuItem) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { IMenuItem } from './MenuItem';
|
|
3
3
|
export interface IMenuListProps {
|
|
4
4
|
title?: string;
|
|
@@ -6,5 +6,5 @@ export interface IMenuListProps {
|
|
|
6
6
|
activeIndex?: string;
|
|
7
7
|
onChange: (id: string) => void;
|
|
8
8
|
}
|
|
9
|
-
declare const MenuList: ({ title, items, onChange, activeIndex }: IMenuListProps) =>
|
|
9
|
+
declare const MenuList: ({ title, items, onChange, activeIndex }: IMenuListProps) => JSX.Element;
|
|
10
10
|
export default MenuList;
|
|
@@ -24,6 +24,6 @@ export interface IInput {
|
|
|
24
24
|
export declare class RadioButtonGroup extends React.Component<IRadioButtonGroupProps, IRadioButtonGroupState> {
|
|
25
25
|
static defaultProps: Partial<IRadioButtonGroupProps>;
|
|
26
26
|
constructor(props: IRadioButtonGroupProps);
|
|
27
|
-
render():
|
|
27
|
+
render(): JSX.Element[];
|
|
28
28
|
private handleOnValueSelected;
|
|
29
29
|
}
|
|
@@ -23,7 +23,7 @@ export interface IReactFileReaderResult {
|
|
|
23
23
|
export declare class ReactFileReader extends React.Component<IReactFileReaderProps> {
|
|
24
24
|
static defaultProps: IReactFileReaderDefaultProps;
|
|
25
25
|
private fileInput;
|
|
26
|
-
render():
|
|
26
|
+
render(): JSX.Element;
|
|
27
27
|
private setFileInput;
|
|
28
28
|
private clickInput;
|
|
29
29
|
private onChangeHandler;
|
|
@@ -28,6 +28,6 @@ export declare class StickyHeader extends React.Component<IStickyHeaderProps, IS
|
|
|
28
28
|
constructor(props: IStickyHeaderProps);
|
|
29
29
|
componentDidMount(): void;
|
|
30
30
|
componentWillUnmount(): void;
|
|
31
|
-
render():
|
|
31
|
+
render(): JSX.Element;
|
|
32
32
|
private getHeight;
|
|
33
33
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
1
|
+
import React, { ReactElement, DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
2
2
|
export interface ITab {
|
|
3
|
-
title: string |
|
|
4
|
-
content:
|
|
3
|
+
title: string | ReactElement;
|
|
4
|
+
content: ReactElement;
|
|
5
5
|
badgeCount?: number;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface IBaseProps {
|
|
3
3
|
input: {
|
|
4
4
|
onChange: (value: string) => void;
|
|
5
5
|
value?: string;
|
|
@@ -16,5 +16,5 @@ interface ITextAreaWithoutCounterProps extends IBaseProps {
|
|
|
16
16
|
maxLength?: undefined;
|
|
17
17
|
}
|
|
18
18
|
export type ITextAreaProps = ITextAreaWithCounterProps | ITextAreaWithoutCounterProps;
|
|
19
|
-
export declare const TextArea: React.
|
|
19
|
+
export declare const TextArea: React.SFC<ITextAreaProps>;
|
|
20
20
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Toggle';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component } from 'react';
|
|
2
2
|
export interface ITypeAheadProps {
|
|
3
3
|
autoComplete?: string;
|
|
4
4
|
data?: any[];
|
|
@@ -35,7 +35,7 @@ export declare class TypeAhead extends Component<ITypeAheadProps, ITypeAheadStat
|
|
|
35
35
|
private static getInitialValue;
|
|
36
36
|
constructor(props: ITypeAheadProps);
|
|
37
37
|
componentDidMount(): void;
|
|
38
|
-
render():
|
|
38
|
+
render(): JSX.Element;
|
|
39
39
|
private getSuggestions;
|
|
40
40
|
private renderSuggestion;
|
|
41
41
|
private renderSuggestionsContainer;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export * from './BaseButton';
|
|
2
2
|
export * from './CheckBox';
|
|
3
3
|
export * from './ConfirmationBox';
|
|
4
|
+
export * from './Dropdown';
|
|
4
5
|
export * from './RadioButtonGroup';
|
|
5
6
|
export * from './ReactFileReader';
|
|
6
7
|
export * from './StickyHeader';
|
|
7
8
|
export * from './TextArea';
|
|
8
9
|
export * from './TextInput';
|
|
10
|
+
export * from './Toggle';
|
|
9
11
|
export * from './TypeAhead';
|
|
10
12
|
export * from './Icon';
|
|
11
13
|
export * from './Button';
|
|
@@ -19,4 +21,4 @@ export * from './Tabs';
|
|
|
19
21
|
export * from './TextInputNew';
|
|
20
22
|
export * from './Collapse';
|
|
21
23
|
export * from './MenuList';
|
|
22
|
-
export * from './
|
|
24
|
+
export * from './DropdownNew';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const DisplayReactFileReader: {
|
|
7
|
-
():
|
|
7
|
+
(): JSX.Element;
|
|
8
8
|
story: {
|
|
9
9
|
name: string;
|
|
10
10
|
};
|
|
@@ -8,7 +8,7 @@ interface IExampleReactFileReaderState {
|
|
|
8
8
|
}
|
|
9
9
|
export declare class ExampleReactFileReader extends React.Component<IEmptyInterface, IExampleReactFileReaderState> {
|
|
10
10
|
state: Readonly<IExampleReactFileReaderState>;
|
|
11
|
-
render():
|
|
11
|
+
render(): JSX.Element;
|
|
12
12
|
private renderReactFileReader;
|
|
13
13
|
private showFileResult;
|
|
14
14
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function BaseButton(props: {
|
|
3
|
+
className: any;
|
|
4
|
+
text: React.ReactNode;
|
|
5
|
+
}): JSX.Element;
|
|
6
|
+
export declare function IconButton(props: {
|
|
7
|
+
className: any;
|
|
8
|
+
text: React.ReactNode;
|
|
9
|
+
}): JSX.Element;
|
|
10
|
+
export declare function IconButtonwWord(props: {
|
|
11
|
+
className: any;
|
|
12
|
+
text: React.ReactNode;
|
|
13
|
+
}): JSX.Element;
|
|
14
|
+
export declare function FloatingActionButton(props: {
|
|
15
|
+
className: any;
|
|
16
|
+
text: React.ReactNode;
|
|
17
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default function TextHeadLine(props: {
|
|
3
|
+
className: any;
|
|
4
|
+
}): JSX.Element;
|
|
5
|
+
export declare function FontFamily(props: {
|
|
6
|
+
text: React.ReactNode;
|
|
7
|
+
}): JSX.Element;
|
|
8
|
+
export declare function FontStyle(props: {
|
|
9
|
+
className: any;
|
|
10
|
+
code: React.ReactNode;
|
|
11
|
+
text: React.ReactNode;
|
|
12
|
+
}): JSX.Element;
|