@mw-kit/mw-ui 1.0.17 → 1.2.0

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.
@@ -12,6 +12,7 @@ interface CommonProps extends React.HTMLAttributes<HTMLDivElement> {
12
12
  maxWidth?: string | number;
13
13
  maxHeight?: string | number;
14
14
  references?: References;
15
+ zIndex?: number;
15
16
  }
16
17
  export interface AbsoluteContainerProps extends CommonProps {
17
18
  position?: Position;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const EllipsisContainer: (props: React.HTMLAttributes<HTMLDivElement>) => JSX.Element;
3
+ export default EllipsisContainer;
@@ -0,0 +1 @@
1
+ export declare const EllipsisContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -23,11 +23,12 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
23
23
  htmlDisabled?: boolean;
24
24
  type?: 'text' | 'number' | 'search' | 'email' | 'url' | 'PASSWORD';
25
25
  width?: string;
26
+ arrows?: boolean;
26
27
  }
27
28
  export interface StyledLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
28
- required?: 1 | 0;
29
- invalid?: 1 | 0;
30
- disabled?: 1 | 0;
29
+ required: 1 | 0;
30
+ invalid: 1 | 0;
31
+ disabled: 1 | 0;
31
32
  icon?: {
32
33
  width: string | number;
33
34
  position: 'left' | 'right';
@@ -35,5 +36,6 @@ export interface StyledLabelProps extends React.LabelHTMLAttributes<HTMLLabelEle
35
36
  width?: string;
36
37
  }
37
38
  export interface StyledInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'required'> {
38
- invalid?: 1 | 0;
39
+ invalid: 1 | 0;
40
+ arrows: 1 | 0;
39
41
  }
@@ -6,7 +6,10 @@ interface StyledLabelProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
6
6
  width?: string;
7
7
  }
8
8
  export declare const Label: import("styled-components").StyledComponent<"label", import("styled-components").DefaultTheme, StyledLabelProps, never>;
9
- export declare const InputContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
9
+ interface InputContainerProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
10
+ invalid: 1 | 0;
11
+ }
12
+ export declare const InputContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, InputContainerProps, never>;
10
13
  export declare const MinMaxLabelContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
11
14
  interface LabelsContainerProps extends React.HTMLAttributes<HTMLDivElement> {
12
15
  position: 'bottom' | 'top';
@@ -14,7 +17,6 @@ interface LabelsContainerProps extends React.HTMLAttributes<HTMLDivElement> {
14
17
  export declare const LabelsContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, LabelsContainerProps, never>;
15
18
  interface SelectedAreaProps extends React.HtmlHTMLAttributes<HTMLDivElement> {
16
19
  percent: number;
17
- invalid: 1 | 0;
18
20
  }
19
21
  export declare const SelectedArea: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, SelectedAreaProps, never>;
20
22
  export declare const MarkersContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Footer: () => JSX.Element;
3
+ export default Footer;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Header: () => JSX.Element;
3
+ export default Header;
@@ -3,38 +3,48 @@ import { ElementOrString } from '../../../../interfaces';
3
3
  import { Position } from '../../../AbsoluteContainer/interfaces';
4
4
  import { InputProps } from '../Input/interfaces';
5
5
  export interface Data {
6
- value: string | number;
6
+ value: string;
7
7
  }
8
- interface Option extends Data {
9
- label: ElementOrString;
8
+ export interface Option extends Data {
9
+ label: string | {
10
+ text: string;
11
+ element: ElementOrString;
12
+ };
10
13
  onClick?: (index: number, data: Data) => void;
11
14
  }
12
- interface CommonProps extends Omit<InputProps, 'type' | 'mask' | 'icon' | 'setValue' | 'name' | 'value'> {
15
+ interface LoaderReturn {
16
+ options: Option[];
17
+ lastPage: boolean;
18
+ }
19
+ export declare type Loader = (search: string, page: number) => Promise<LoaderReturn | Option[]>;
20
+ interface CommonProps extends Omit<InputProps, 'type' | 'mask' | 'icon' | 'setValue' | 'name' | 'value' | 'onChange'> {
13
21
  onScrollEnd?: () => Promise<void>;
14
22
  position?: Position;
15
23
  disableAutoPosition?: boolean;
16
- search?: (value: string) => Promise<void>;
24
+ loader?: Loader;
25
+ options: Option[];
26
+ setOptions: React.Dispatch<React.SetStateAction<Option[]>>;
17
27
  }
18
28
  export interface OneSelectProps extends CommonProps {
19
29
  type: 'select';
20
- options: Option[];
21
30
  name?: string;
22
- setValue: (value: string | number) => void;
23
- value?: string | number;
31
+ setValue: (value: string) => void;
32
+ value: string;
24
33
  }
25
34
  export interface MultSelectProps extends CommonProps {
26
35
  type: 'select-multiple';
27
- options: Option[];
28
- setValue: (value: (string | number)[]) => void;
29
- value: (string | number)[];
36
+ setValue: (value: string[]) => void;
37
+ value: string[];
30
38
  selectAll?: boolean;
31
39
  }
32
40
  export declare type SelectProps = OneSelectProps | MultSelectProps;
33
41
  export interface ContextInterface {
34
42
  props: SelectProps;
35
- open: boolean;
36
43
  setOpen: React.Dispatch<React.SetStateAction<boolean>>;
37
- checked: (string | number)[];
38
- setChecked: React.Dispatch<React.SetStateAction<(string | number)[]>>;
44
+ checked: string[];
45
+ setChecked: React.Dispatch<React.SetStateAction<string[]>>;
46
+ searched: string;
47
+ setSearched: React.Dispatch<React.SetStateAction<string>>;
48
+ setPage: React.Dispatch<React.SetStateAction<number>>;
39
49
  }
40
50
  export {};
@@ -1,9 +1,11 @@
1
1
  /// <reference types="react" />
2
- import { ElementOrString } from '../../interfaces';
3
- import { spacings } from '../../theme/constants';
2
+ import { ElementOrString, SpacingOrZero, Spacings } from '../../interfaces';
4
3
  import { AbsoluteContainerProps } from '../AbsoluteContainer/interfaces';
5
4
  interface CommonOption {
6
- label: ElementOrString;
5
+ label: string | {
6
+ text: string;
7
+ element: ElementOrString;
8
+ };
7
9
  delimiter?: boolean;
8
10
  keepOpen?: boolean;
9
11
  submenu?: Omit<MenuProps, 'open' | 'close'>;
@@ -16,7 +18,7 @@ interface Rule1<T> extends CommonRule {
16
18
  /** funcao que fara a validacao da regra, deve retornar true caso passe na validacao, e false caso contrario */
17
19
  rule: (index: number, data: T) => boolean;
18
20
  }
19
- interface Option1<T> extends CommonOption {
21
+ export interface Option1<T> extends CommonOption {
20
22
  onClick: (index: number, data: T) => void;
21
23
  data: T;
22
24
  rules?: Rule1<T>[];
@@ -32,7 +34,8 @@ interface Option2 extends CommonOption {
32
34
  export declare type Option<T = undefined> = Option1<T> | Option2;
33
35
  export interface CommonProps extends Omit<AbsoluteContainerProps, 'children'> {
34
36
  bordered?: boolean;
35
- spacing?: keyof typeof spacings;
37
+ spacing?: SpacingOrZero | Spacings;
38
+ scrollSpacing?: SpacingOrZero | Spacings;
36
39
  onScrollEnd?: () => void;
37
40
  before?: ElementOrString;
38
41
  after?: ElementOrString;
@@ -1,8 +1,13 @@
1
- /// <reference types="react" />
2
- import { ElementOrString } from '../../interfaces';
3
- export interface ScrollContainerProps extends React.HTMLAttributes<HTMLDivElement> {
1
+ import React from 'react';
2
+ import { ElementOrString, SpacingOrZero, Spacings } from '../../interfaces';
3
+ interface Common extends React.HTMLAttributes<HTMLDivElement> {
4
+ height?: string;
5
+ spacing?: SpacingOrZero | Omit<Spacings, 'right'>;
6
+ }
7
+ export interface ScrollContainerProps extends Common {
4
8
  onScrollEnd?: () => void | Promise<void>;
5
9
  before?: ElementOrString;
6
10
  after?: ElementOrString;
7
- height?: string;
8
11
  }
12
+ export declare type OverflowContainerProps = Common;
13
+ export {};
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ZoomProps } from './interfaces';
3
+ declare const Zoom: (props: ZoomProps) => JSX.Element;
4
+ export default Zoom;
@@ -0,0 +1,9 @@
1
+ import { ModalProps } from '../Modal/interfaces';
2
+ export interface StyledZoomProps {
3
+ width?: number | string;
4
+ height?: number | string;
5
+ }
6
+ export interface ZoomProps extends StyledZoomProps {
7
+ src: string;
8
+ defaultClickOptions?: Partial<ModalProps>;
9
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { StyledZoomProps } from './interfaces';
3
+ export declare const Image: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
4
+ export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledZoomProps, never>;
5
+ export declare const Dimmer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
+ export declare const Button: import("styled-components").StyledComponent<(props: import("../Button/interfaces").ButtonProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
7
+ export declare const ModalContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -15,3 +15,5 @@ export { default as MwToast } from './Toast';
15
15
  export { default as MwDatePicker } from './Calendar';
16
16
  export { default as MwCalendarInterval } from './CalendarInterval';
17
17
  export { default as MwPlaceholder } from './Placeholder';
18
+ export { default as MwZoom } from './Zoom';
19
+ export { default as MwEllipsisContainer } from './EllipsisContainer';
@@ -1 +1,2 @@
1
1
  export declare const stripAccents: (value: string) => string;
2
+ export declare const isKeyOf: <T>(object: T, key: string | number | symbol) => key is keyof T;
@@ -1,3 +1,4 @@
1
+ import { SpacingOrZero, Spacings } from '../interfaces';
1
2
  export declare const filterObject: <T = unknown, R = unknown>(object: T, keys: (keyof T)[], inital?: R) => R;
2
3
  export declare const phone: (value: string) => string;
3
4
  export declare const cnpj: (value: string) => string;
@@ -20,3 +21,4 @@ export declare const capitalize: (value: string) => string;
20
21
  export declare const dateToIsoString: (date: Date) => string;
21
22
  export declare const isoStringToDate: (value: string) => Date | null;
22
23
  export { stripAccents } from './common';
24
+ export declare const getSpacings: (value: SpacingOrZero | Spacings, defaults?: "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "0" | Spacings | undefined) => string;
@@ -3,7 +3,6 @@ export declare const notEmptyString: (value: unknown) => value is string;
3
3
  export declare const isNumber: (value: unknown) => value is number;
4
4
  export declare const isNumeric: (value: unknown) => value is import("react").Key;
5
5
  export declare const isObject: <T = unknown>(value: unknown) => value is T;
6
- export declare const isKeyOf: <T>(object: T, key: string | number | symbol) => key is keyof T;
7
6
  export declare const isBoolean: (value: unknown) => value is boolean;
8
7
  export declare const isNumericString: (value: unknown) => value is string;
9
8
  export declare const isString: (value: unknown) => value is string;
@@ -16,3 +15,4 @@ export declare const strCmp: (x: string, y: string, options?: {
16
15
  contain?: boolean;
17
16
  }) => boolean;
18
17
  export declare const isValidEmail: (value: string) => boolean;
18
+ export { isKeyOf } from './common';