@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.
Files changed (51) hide show
  1. package/dist/@types/Component/BaseButton/BaseButton.d.ts +1 -1
  2. package/dist/@types/Component/Button/Button.d.ts +3 -2
  3. package/dist/@types/Component/ButtonGroup/ButtonGroup.d.ts +2 -2
  4. package/dist/@types/Component/CheckBox/CheckBox.d.ts +1 -1
  5. package/dist/@types/Component/CheckboxGroup/CheckboxGroup.d.ts +2 -2
  6. package/dist/@types/Component/CheckboxNew/CheckboxNew.d.ts +1 -1
  7. package/dist/@types/Component/Dropdown/Dropdown.d.ts +73 -3
  8. package/dist/@types/Component/Dropdown/index.d.ts +1 -2
  9. package/dist/@types/Component/DropdownNew/DropdownNew.d.ts +4 -0
  10. package/dist/@types/Component/DropdownNew/index.d.ts +2 -0
  11. package/dist/@types/Component/Icon/Icons.d.ts +2 -0
  12. package/dist/@types/Component/MenuList/MenuItem.d.ts +2 -2
  13. package/dist/@types/Component/MenuList/MenuList.d.ts +2 -2
  14. package/dist/@types/Component/MessageBar/index.d.ts +1 -0
  15. package/dist/@types/Component/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
  16. package/dist/@types/Component/ReactFileReader/ReactFileReader.d.ts +1 -1
  17. package/dist/@types/Component/StickyHeader/StickyHeader.d.ts +1 -1
  18. package/dist/@types/Component/Tabs/Tabs.d.ts +3 -3
  19. package/dist/@types/Component/TextArea/TextArea.d.ts +2 -2
  20. package/dist/@types/Component/TextInput/TextInput.d.ts +1 -1
  21. package/dist/@types/Component/Toggle/Toggle.d.ts +6 -0
  22. package/dist/@types/Component/Toggle/index.d.ts +1 -0
  23. package/dist/@types/Component/TypeAhead/TypeAhead.d.ts +2 -2
  24. package/dist/@types/Component/index.d.ts +3 -1
  25. package/dist/@types/Example/ReactFileReader/ReactFileReader.story.d.ts +2 -2
  26. package/dist/@types/Example/ReactFileReader/index.d.ts +1 -1
  27. package/dist/@types/storyguide/Buttons/BaseButton.d.ts +17 -0
  28. package/dist/@types/storyguide/JobCard/Bookmark/BookmarkButton.d.ts +6 -0
  29. package/dist/@types/storyguide/JobCard/CompanyInfo.d.ts +2 -0
  30. package/dist/@types/storyguide/JobCard/JobBenefit.d.ts +2 -0
  31. package/dist/@types/storyguide/JobCard/JobCard.d.ts +2 -0
  32. package/dist/@types/storyguide/JobCard/JobInfo.d.ts +2 -0
  33. package/dist/@types/storyguide/JobCard/JobLastPostedDate.d.ts +2 -0
  34. package/dist/@types/storyguide/JobCard/JobPostStatus.d.ts +2 -0
  35. package/dist/@types/storyguide/JobCard/JobSkillInfo.d.ts +2 -0
  36. package/dist/@types/storyguide/JobCard/JobSponsor.d.ts +2 -0
  37. package/dist/@types/storyguide/JobCard/JobTitle.d.ts +2 -0
  38. package/dist/@types/storyguide/JobCard/SalaryInfo.d.ts +2 -0
  39. package/dist/@types/storyguide/Skills/Score.d.ts +6 -0
  40. package/dist/@types/storyguide/Skills/Scorebar.d.ts +6 -0
  41. package/dist/@types/storyguide/Skills/SkillPill.d.ts +7 -0
  42. package/dist/@types/storyguide/Text/Font.d.ts +12 -0
  43. package/dist/@types/storyguide/Text/TextSize.d.ts +4 -0
  44. package/dist/index.js +1 -1
  45. package/dist/index.js.map +1 -1
  46. package/jest.config.js +2 -2
  47. package/package.json +20 -12
  48. package/test/helpers/enzyme.ts +4 -0
  49. package/test/helpers/index.ts +2 -0
  50. package/jest.setup.ts +0 -8
  51. /package/dist/@types/Component/{Dropdown/Dropdown.constants.d.ts → DropdownNew/DropdownNew.constants.d.ts} +0 -0
@@ -13,4 +13,4 @@ export interface IBaseButtonProps {
13
13
  type?: TYPE;
14
14
  id?: string;
15
15
  }
16
- export declare const BaseButton: React.FC<IBaseButtonProps>;
16
+ export declare const BaseButton: React.SFC<IBaseButtonProps>;
@@ -1,4 +1,4 @@
1
- import React, { ButtonHTMLAttributes, DetailedHTMLProps } from 'react';
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: React.FC<IButtonProps>;
16
+ declare const Button: FC<IButtonProps>;
16
17
  export default Button;
@@ -1,4 +1,4 @@
1
- import React, { DetailedHTMLProps, HTMLAttributes } from 'react';
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) => React.JSX.Element;
9
+ declare const ButtonGroup: ({ activeButton, activeButtonClass, buttons, className, onActiveButtonChange, ...divProps }: IButtonGroupProps) => JSX.Element;
10
10
  export default ButtonGroup;
@@ -9,4 +9,4 @@ export interface ICheckBoxProps {
9
9
  label: React.ReactElement<IEmptyInterface> | string;
10
10
  disabled?: boolean;
11
11
  }
12
- export declare const CheckBox: React.FC<ICheckBoxProps>;
12
+ export declare const CheckBox: React.SFC<ICheckBoxProps>;
@@ -1,4 +1,4 @@
1
- import React from 'react';
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: React.FC<ICheckboxGroupProps>;
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: React.FC<ICheckboxProps>;
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 { DropdownProps } from './Dropdown.constants';
3
- declare const Dropdown: ({ width, isSearchable, isDisabled, primaryLabel, secondaryLabel, additionalInfo, errorMsg, placeholder, data, input, variant, customStyles, ...props }: DropdownProps) => React.JSX.Element;
4
- export default Dropdown;
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 { default as Dropdown } from './Dropdown';
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;
@@ -0,0 +1,2 @@
1
+ export { default as DropdownNew } from './DropdownNew';
2
+ export * from './DropdownNew.constants';
@@ -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
- import React from 'react';
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) => React.JSX.Element;
9
+ export declare const MenuItem: ({ id, text, isActive, className, onChange }: IMenuItem) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
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) => React.JSX.Element;
9
+ declare const MenuList: ({ title, items, onChange, activeIndex }: IMenuListProps) => JSX.Element;
10
10
  export default MenuList;
@@ -1 +1,2 @@
1
1
  export { default as MessageBar } from './MessageBar';
2
+ export { BORDER_POSITION as MessageBarBorderPosition } from './MessageBar';
@@ -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(): React.ReactPortal;
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(): React.JSX.Element;
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(): React.JSX.Element;
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 | JSX.Element;
4
- content: JSX.Element;
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
- export interface IBaseProps {
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.FC<ITextAreaProps>;
19
+ export declare const TextArea: React.SFC<ITextAreaProps>;
20
20
  export {};
@@ -22,4 +22,4 @@ export interface ITextInputProps {
22
22
  step?: number | string;
23
23
  ariaLabel?: string;
24
24
  }
25
- export declare const TextInput: React.FC<ITextInputProps>;
25
+ export declare const TextInput: React.SFC<ITextInputProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export interface IToggleProps {
3
+ initialState?: boolean;
4
+ changeHandler: (event: React.ChangeEvent<HTMLInputElement>) => void;
5
+ }
6
+ export declare const Toggle: React.SFC<IToggleProps>;
@@ -0,0 +1 @@
1
+ export * from './Toggle';
@@ -1,4 +1,4 @@
1
- import React, { Component } from 'react';
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(): React.ReactNode;
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 './Dropdown';
24
+ export * from './DropdownNew';
@@ -1,10 +1,10 @@
1
- import React from 'react';
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
- (): React.JSX.Element;
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(): React.JSX.Element;
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,6 @@
1
+ import React from 'react';
2
+ export interface IBookmarkedButtonProps {
3
+ selected?: boolean;
4
+ onClick?: (event: React.MouseEvent<HTMLElement>) => any;
5
+ }
6
+ export declare const BookmarkButton: React.FunctionComponent<IBookmarkedButtonProps>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function CompanyInfo(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function JobBenefit(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const Company: React.FunctionComponent;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function JobInfo(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function JobLastPostedDate(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function JobPostStatus(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function JobSkillInfo(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function JobSponsor(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function JobTitle(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function SalaryInfo(): JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const CARD_LABEL: {
3
+ NO_SKILL_INFO: string;
4
+ SKILLS_MATCHED: string;
5
+ };
6
+ export declare const Score: React.FunctionComponent;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const CARD_LABEL: {
3
+ NO_SKILL_INFO: string;
4
+ SKILLS_MATCHED: string;
5
+ };
6
+ export declare function Scorebar(): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface ISkillButtonProps {
3
+ label: string;
4
+ selected?: boolean;
5
+ onClick?: (event: React.MouseEvent<HTMLElement>) => any;
6
+ }
7
+ export declare const SkillButton: React.FunctionComponent<ISkillButtonProps>;
@@ -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;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export default function TextSize(props: {
3
+ className: React.ReactNode;
4
+ }): JSX.Element;