@mw-kit/mw-ui 1.3.1 → 1.6.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.
- package/dist/components/AbsoluteContainer/index.d.ts +2 -2
- package/dist/components/AbsoluteContainer/interfaces.d.ts +7 -2
- package/dist/components/Calendar/interfaces.d.ts +2 -2
- package/dist/components/Calendar/styles.d.ts +1 -1
- package/dist/components/CalendarInterval/interfaces.d.ts +7 -7
- package/dist/components/Filters/AppliedFilters/index.d.ts +4 -0
- package/dist/components/Filters/AppliedFilters/interfaces.d.ts +7 -0
- package/dist/components/Filters/AppliedFilters/styles.d.ts +5 -0
- package/dist/components/{FilterMenu → Filters/Filters}/components/Submenu/components/Header/index.d.ts +0 -0
- package/dist/components/{FilterMenu → Filters/Filters}/components/Submenu/components/Header/interfaces.d.ts +2 -4
- package/dist/components/{FilterMenu → Filters/Filters}/components/Submenu/components/Header/styles.d.ts +0 -0
- package/dist/components/{FilterMenu → Filters/Filters}/components/Submenu/index.d.ts +0 -0
- package/dist/components/{FilterMenu → Filters/Filters}/components/Submenu/interfaces.d.ts +3 -2
- package/dist/components/{FilterMenu → Filters/Filters}/components/Submenu/styles.d.ts +0 -0
- package/dist/components/Filters/Filters/index.d.ts +4 -0
- package/dist/components/{FilterMenu → Filters/Filters}/interfaces.d.ts +10 -28
- package/dist/components/Filters/interfaces.d.ts +20 -0
- package/dist/components/Grid/components/Col/index.d.ts +4 -0
- package/dist/components/Grid/components/Col/interfaces.d.ts +31 -0
- package/dist/components/Grid/components/Col/styles.d.ts +1 -0
- package/dist/components/{Input/components/Select → Grid/components/Grid}/context.d.ts +0 -0
- package/dist/components/Grid/components/Grid/index.d.ts +4 -0
- package/dist/components/Grid/components/Grid/interfaces.d.ts +17 -0
- package/dist/components/Grid/components/Grid/styles.d.ts +1 -0
- package/dist/components/Grid/components/Row/context.d.ts +5 -0
- package/dist/components/Grid/components/Row/index.d.ts +4 -0
- package/dist/components/Grid/components/Row/interfaces.d.ts +26 -0
- package/dist/components/Grid/components/Row/styles.d.ts +1 -0
- package/dist/components/Grid/index.d.ts +6 -0
- package/dist/components/Grid/interfaces.d.ts +2 -0
- package/dist/components/Input/components/DateIntervalPicker/functions.d.ts +5 -0
- package/dist/components/Input/components/DateIntervalPicker/index.d.ts +4 -0
- package/dist/components/Input/components/DateIntervalPicker/interfaces.d.ts +23 -0
- package/dist/components/Input/components/DateIntervalPicker/styles.d.ts +10 -0
- package/dist/components/Input/components/Range/interfaces.d.ts +1 -1
- package/dist/components/Input/components/Select/{header.d.ts → hooks/Select/components/Header/index.d.ts} +0 -0
- package/dist/components/Input/components/Select/hooks/Select/components/Header/styles.d.ts +1 -0
- package/dist/components/Input/components/Select/hooks/Select/context.d.ts +5 -0
- package/dist/components/Input/components/Select/hooks/Select/index.d.ts +4 -0
- package/dist/components/Input/components/Select/hooks/Select/interfaces.d.ts +25 -0
- package/dist/components/Input/components/Select/{footer.d.ts → hooks/SelectMultiple/components/Footer/index.d.ts} +0 -0
- package/dist/components/Input/components/Select/hooks/SelectMultiple/components/Header/index.d.ts +3 -0
- package/dist/components/Input/components/Select/hooks/SelectMultiple/components/Header/styles.d.ts +2 -0
- package/dist/components/Input/components/Select/hooks/SelectMultiple/context.d.ts +5 -0
- package/dist/components/Input/components/Select/hooks/SelectMultiple/index.d.ts +4 -0
- package/dist/components/Input/components/Select/hooks/SelectMultiple/interfaces.d.ts +19 -0
- package/dist/components/Input/components/Select/hooks/interfaces.d.ts +55 -0
- package/dist/components/Input/components/Select/index.d.ts +4 -1
- package/dist/components/Input/components/Select/interfaces.d.ts +2 -51
- package/dist/components/Input/components/Select/styles.d.ts +0 -2
- package/dist/components/Input/components/Time/interfaces.d.ts +1 -0
- package/dist/components/Input/index.d.ts +4 -3
- package/dist/components/Loader/interfaces.d.ts +2 -1
- package/dist/components/Menu/interfaces.d.ts +13 -29
- package/dist/components/Menu/styles.d.ts +1 -1
- package/dist/components/Modal/index.d.ts +5 -9
- package/dist/components/Transition/components/Transition/index.d.ts +4 -0
- package/dist/components/Transition/components/Transition/interfaces.d.ts +8 -0
- package/dist/components/Transition/hooks/useTransition/index.d.ts +3 -0
- package/dist/components/Transition/index.d.ts +3 -0
- package/dist/components/Transition/interfaces.d.ts +1 -0
- package/dist/components/index.d.ts +5 -1
- package/dist/functions/common.d.ts +2 -0
- package/dist/functions/formatters.d.ts +9 -3
- package/dist/functions/validators.d.ts +2 -2
- package/dist/index.js +1962 -811
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1959 -812
- package/dist/index.modern.js.map +1 -1
- package/dist/interfaces.d.ts +3 -2
- package/dist/theme/constants.d.ts +2 -15
- package/dist/theme/interfaces.d.ts +15 -2
- package/package.json +1 -1
- package/dist/components/FilterMenu/index.d.ts +0 -4
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ElementOrString, SpacingOrZero, Spacings } from '../../../../../interfaces';
|
|
3
|
+
import { Position } from '../../../../AbsoluteContainer/interfaces';
|
|
4
|
+
import { Option as MenuOption } from '../../../../Menu/interfaces';
|
|
5
|
+
import { InputProps } from '../../Input/interfaces';
|
|
6
|
+
export interface CommonOption {
|
|
7
|
+
label: string | {
|
|
8
|
+
text: string;
|
|
9
|
+
element: ElementOrString;
|
|
10
|
+
};
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CommonProps extends Omit<InputProps, 'type' | 'mask' | 'icon' | 'setValue' | 'name' | 'value' | 'onChange'> {
|
|
14
|
+
onScrollEnd?: () => Promise<void>;
|
|
15
|
+
position?: Position;
|
|
16
|
+
search?: boolean;
|
|
17
|
+
center?: {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
interface BaseContext {
|
|
23
|
+
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
24
|
+
loading: boolean;
|
|
25
|
+
search: [string, React.Dispatch<React.SetStateAction<string>>];
|
|
26
|
+
searchInput: [string, React.Dispatch<React.SetStateAction<string>>];
|
|
27
|
+
onSearch: () => void;
|
|
28
|
+
onClearSearch: () => void;
|
|
29
|
+
}
|
|
30
|
+
export interface CommonContext<SelectProps extends CommonProps, Option extends CommonOption> extends BaseContext {
|
|
31
|
+
props: SelectProps;
|
|
32
|
+
options: Option[];
|
|
33
|
+
}
|
|
34
|
+
export interface ParsedOption extends MenuOption {
|
|
35
|
+
label: {
|
|
36
|
+
text: string;
|
|
37
|
+
element: ElementOrString;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export interface useSelectReturn {
|
|
41
|
+
parsedOptions: ParsedOption[];
|
|
42
|
+
options: [CommonOption[], React.Dispatch<React.SetStateAction<CommonOption[]>>];
|
|
43
|
+
input: {
|
|
44
|
+
value: string;
|
|
45
|
+
};
|
|
46
|
+
onReset: () => void;
|
|
47
|
+
menu: {
|
|
48
|
+
itemSpacing?: SpacingOrZero | Spacings;
|
|
49
|
+
before?: JSX.Element;
|
|
50
|
+
after?: JSX.Element;
|
|
51
|
+
maxHeight: string;
|
|
52
|
+
};
|
|
53
|
+
getContext: (base: BaseContext, children: JSX.Element) => JSX.Element;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { SelectProps as SingleSelectProps } from './hooks/Select/interfaces';
|
|
3
|
+
import { SelectProps as MultipleSelectProps } from './hooks/SelectMultiple/interfaces';
|
|
4
|
+
export declare type SelectProps = SingleSelectProps | MultipleSelectProps;
|
|
5
|
+
declare const Select: React.ForwardRefExoticComponent<(SingleSelectProps & React.RefAttributes<HTMLInputElement>) | (MultipleSelectProps & React.RefAttributes<HTMLInputElement>)>;
|
|
3
6
|
export default Select;
|
|
@@ -1,51 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { Position } from '../../../AbsoluteContainer/interfaces';
|
|
4
|
-
import { InputProps } from '../Input/interfaces';
|
|
5
|
-
export interface Data {
|
|
6
|
-
value: string;
|
|
7
|
-
}
|
|
8
|
-
export interface Option extends Data {
|
|
9
|
-
label: string | {
|
|
10
|
-
text: string;
|
|
11
|
-
element: ElementOrString;
|
|
12
|
-
};
|
|
13
|
-
onClick?: (index: number, data: Data) => void;
|
|
14
|
-
}
|
|
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'> {
|
|
21
|
-
onScrollEnd?: () => Promise<void>;
|
|
22
|
-
position?: Position;
|
|
23
|
-
loader: Loader;
|
|
24
|
-
search?: boolean;
|
|
25
|
-
center?: {
|
|
26
|
-
x: number;
|
|
27
|
-
y: number;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export interface OneSelectProps extends CommonProps {
|
|
31
|
-
type: 'select';
|
|
32
|
-
name?: string;
|
|
33
|
-
setValue: (value: string) => void;
|
|
34
|
-
value: string;
|
|
35
|
-
}
|
|
36
|
-
export interface MultSelectProps extends CommonProps {
|
|
37
|
-
type: 'select-multiple';
|
|
38
|
-
setValue: (value: string[]) => void;
|
|
39
|
-
value: string[];
|
|
40
|
-
selectAll?: boolean;
|
|
41
|
-
}
|
|
42
|
-
export declare type SelectProps = OneSelectProps | MultSelectProps;
|
|
43
|
-
export interface ContextInterface {
|
|
44
|
-
props: SelectProps;
|
|
45
|
-
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
46
|
-
checked: [string[], React.Dispatch<React.SetStateAction<string[]>>];
|
|
47
|
-
search: [string, React.Dispatch<React.SetStateAction<string>>];
|
|
48
|
-
loading: boolean;
|
|
49
|
-
options: Option[];
|
|
50
|
-
}
|
|
51
|
-
export {};
|
|
1
|
+
export type { Option as SelectOption, Loader as SelectLoader, } from './hooks/Select/interfaces';
|
|
2
|
+
export type { Option as SelectMultipleOption, Loader as SelectMultipleLoader, } from './hooks/SelectMultiple/interfaces';
|
|
@@ -1,3 +1 @@
|
|
|
1
1
|
export declare const RelativeContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
-
export declare const HeaderContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
-
export declare const SelectAllContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -3,13 +3,14 @@ import { InputProps as DefaultInputProps } from './components/Input/interfaces';
|
|
|
3
3
|
import { CheckboxProps } from './components/Checkbox/interfaces';
|
|
4
4
|
import { DateProps } from './components/Date/interfaces';
|
|
5
5
|
import { TimeProps } from './components/Time/interfaces';
|
|
6
|
-
import {
|
|
6
|
+
import { SelectProps } from './components/Select';
|
|
7
7
|
import { PasswordProps } from './components/Password/interfaces';
|
|
8
8
|
import { PhoneProps } from './components/Phone/interfaces';
|
|
9
9
|
import { DatePickerProps } from './components/DatePicker/interfaces';
|
|
10
10
|
import { SwitchProps } from './components/Switch/interfaces';
|
|
11
11
|
import { RangeProps } from './components/Range/interfaces';
|
|
12
12
|
import { RadioButtonProps } from './components/RadioButton/interfaces';
|
|
13
|
-
|
|
14
|
-
declare
|
|
13
|
+
import { DateIntervalPickerProps } from './components/DateIntervalPicker/interfaces';
|
|
14
|
+
export declare type Props = DateProps | TimeProps | CheckboxProps | SelectProps | PasswordProps | PhoneProps | DatePickerProps | RangeProps | DefaultInputProps | SwitchProps | RadioButtonProps | DateIntervalPickerProps;
|
|
15
|
+
declare const Input: React.ForwardRefExoticComponent<(TimeProps & React.RefAttributes<HTMLInputElement>) | (DefaultInputProps & React.RefAttributes<HTMLInputElement>) | (DateProps & React.RefAttributes<HTMLInputElement>) | (CheckboxProps & React.RefAttributes<HTMLInputElement>) | (import("./components/Select/hooks/Select/interfaces").SelectProps & React.RefAttributes<HTMLInputElement>) | (import("./components/Select/hooks/SelectMultiple/interfaces").SelectProps & React.RefAttributes<HTMLInputElement>) | (PasswordProps & React.RefAttributes<HTMLInputElement>) | (PhoneProps & React.RefAttributes<HTMLInputElement>) | (DatePickerProps & React.RefAttributes<HTMLInputElement>) | (RangeProps & React.RefAttributes<HTMLInputElement>) | (SwitchProps & React.RefAttributes<HTMLInputElement>) | (RadioButtonProps & React.RefAttributes<HTMLInputElement>) | (DateIntervalPickerProps & React.RefAttributes<HTMLInputElement>)>;
|
|
15
16
|
export default Input;
|
|
@@ -1,58 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { ElementOrString, SpacingOrZero, Spacings } from '../../interfaces';
|
|
3
3
|
import { AbsoluteContainerProps } from '../AbsoluteContainer/interfaces';
|
|
4
|
-
interface
|
|
4
|
+
interface Rule {
|
|
5
|
+
/** string de mensagem que sera exibida caso a validacao falhe */
|
|
6
|
+
message: ElementOrString;
|
|
7
|
+
/** funcao que fara a validacao da regra, deve retornar true caso passe na validacao, e false caso contrario */
|
|
8
|
+
rule: (index: number) => boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface Option {
|
|
5
11
|
label: string | {
|
|
6
12
|
text: string;
|
|
7
13
|
element: ElementOrString;
|
|
8
14
|
};
|
|
9
15
|
delimiter?: boolean;
|
|
10
16
|
keepOpen?: boolean;
|
|
11
|
-
submenu?: Omit<MenuProps, 'open' | 'close'>;
|
|
12
17
|
caret?: boolean;
|
|
18
|
+
onClick?: (index: number) => void;
|
|
19
|
+
rules?: Rule[];
|
|
13
20
|
}
|
|
14
|
-
interface CommonRule {
|
|
15
|
-
/** string de mensagem que sera exibida caso a validacao falhe */
|
|
16
|
-
message: ElementOrString;
|
|
17
|
-
}
|
|
18
|
-
interface Rule1<T> extends CommonRule {
|
|
19
|
-
/** funcao que fara a validacao da regra, deve retornar true caso passe na validacao, e false caso contrario */
|
|
20
|
-
rule: (index: number, data: T) => boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface Option1<T> extends CommonOption {
|
|
23
|
-
onClick: (index: number, data: T) => void;
|
|
24
|
-
data: T;
|
|
25
|
-
rules?: Rule1<T>[];
|
|
26
|
-
}
|
|
27
|
-
interface Rule2 extends CommonRule {
|
|
28
|
-
/** funcao que fara a validacao da regra, deve retornar true caso passe na validacao, e false caso contrario */
|
|
29
|
-
rule: (index: number) => boolean;
|
|
30
|
-
}
|
|
31
|
-
interface Option2 extends CommonOption {
|
|
32
|
-
onClick: (index: number) => void;
|
|
33
|
-
rules?: Rule2[];
|
|
34
|
-
}
|
|
35
|
-
export declare type Option<T = undefined> = Option1<T> | Option2;
|
|
36
21
|
export interface CommonProps extends Omit<AbsoluteContainerProps, 'children'> {
|
|
37
22
|
bordered?: boolean;
|
|
38
23
|
containerSpacing?: SpacingOrZero | Omit<Spacings, 'right'>;
|
|
39
24
|
itemSpacing?: SpacingOrZero | Spacings;
|
|
40
25
|
children?: JSX.Element | (string & (string | JSX.Element | undefined)) | null;
|
|
41
26
|
}
|
|
42
|
-
export interface MenuProps
|
|
27
|
+
export interface MenuProps extends CommonProps {
|
|
43
28
|
open: boolean;
|
|
44
29
|
close: () => void;
|
|
45
|
-
options: Option
|
|
30
|
+
options: Option[];
|
|
46
31
|
loading?: boolean;
|
|
47
32
|
innerContent?: ElementOrString;
|
|
48
33
|
scrollSpacing?: SpacingOrZero | Spacings;
|
|
49
34
|
onScrollEnd?: () => void;
|
|
50
35
|
before?: ElementOrString;
|
|
51
36
|
after?: ElementOrString;
|
|
52
|
-
scrollHeight?: string;
|
|
53
37
|
}
|
|
54
38
|
export declare type ContainerProps = CommonProps;
|
|
55
|
-
export declare type MenuInterface =
|
|
39
|
+
export declare type MenuInterface = (props: MenuProps, ref?: React.ForwardedRef<HTMLDivElement>) => JSX.Element;
|
|
56
40
|
export interface StyledOptionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
57
41
|
disabled?: boolean;
|
|
58
42
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { StyledOptionProps } from './interfaces';
|
|
3
3
|
export declare const Option: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledOptionProps, never>;
|
|
4
|
-
export declare const Container: import("styled-components").StyledComponent<(
|
|
4
|
+
export declare const Container: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("../AbsoluteContainer/interfaces").AbsoluteContainerProps, "children" | "dir" | "slot" | "style" | "title" | "id" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "width" | "open" | "position" | "axis" | "center" | "transition" | "height" | "maxWidth" | "maxHeight" | "references" | "zIndex"> & import("react").RefAttributes<HTMLDivElement>>, import("styled-components").DefaultTheme, import("./interfaces").CommonProps, never>;
|
|
5
5
|
export declare const Delimiter: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
(props:
|
|
6
|
-
|
|
7
|
-
ConfirmEdit: typeof ConfirmEdit;
|
|
8
|
-
Audit: typeof Audit;
|
|
9
|
-
}
|
|
10
|
-
declare const Modal: ModalInteface;
|
|
2
|
+
declare const Modal: ((props: import("./interfaces").ModalProps) => JSX.Element) & {
|
|
3
|
+
ConfirmDelete: (props: import("./templates/ConfirmDelete/interfaces").ConfirmDeleteProps) => JSX.Element;
|
|
4
|
+
ConfirmEdit: (props: import("./templates/ConfirmEdit/interfaces").ConfirmSuccessProps) => JSX.Element;
|
|
5
|
+
Audit: (props: import("./templates/Audit/interfaces").AuditProps) => JSX.Element;
|
|
6
|
+
};
|
|
11
7
|
export default Modal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { Transition } from './hooks/useTransition/interfaces';
|
|
@@ -17,4 +17,8 @@ export { default as MwCalendarInterval } from './CalendarInterval';
|
|
|
17
17
|
export { default as MwPlaceholder } from './Placeholder';
|
|
18
18
|
export { default as MwZoom } from './Zoom';
|
|
19
19
|
export { default as MwEllipsisContainer } from './EllipsisContainer';
|
|
20
|
-
export { default as
|
|
20
|
+
export { default as MwFilters } from './Filters/Filters';
|
|
21
|
+
export { default as MwAppliedFilters } from './Filters/AppliedFilters';
|
|
22
|
+
export { default as MwGrid } from './Grid';
|
|
23
|
+
export { default as MwTransition } from './Transition';
|
|
24
|
+
export { useTransition as useMwTransition } from './Transition';
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare const stripAccents: (value: string) => string;
|
|
2
2
|
export declare const isKeyOf: <T>(object: T, key: string | number | symbol) => key is keyof T;
|
|
3
|
+
export declare const isObject: <T = unknown>(value: unknown) => value is T;
|
|
4
|
+
export declare const dateToIsoString: (date: Date, time?: boolean, fullYear?: boolean, pattern?: 'us' | 'br') => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SpacingOrZero, Spacings } from '../interfaces';
|
|
2
|
-
export declare const filterObject: <T = unknown, R = unknown>(object: T, keys: (keyof T)[], inital?: R) => R;
|
|
2
|
+
export declare const filterObject: <T = unknown, R = unknown>(object: T, keys: (keyof T)[], inital?: Partial<R>) => R;
|
|
3
3
|
export declare const phone: (value: string) => string;
|
|
4
4
|
export declare const cnpj: (value: string) => string;
|
|
5
5
|
export declare const cpf: (value: string) => string;
|
|
@@ -18,7 +18,13 @@ export declare const numberOrDefault: <T = unknown>(value: unknown, defaultValue
|
|
|
18
18
|
export declare const booleanOrDefault: <T = unknown>(value: unknown, defaultValue: T) => boolean | T;
|
|
19
19
|
export declare const notEmptyStringOrDefault: <T = unknown>(value: unknown, defaultValue: T) => string | T;
|
|
20
20
|
export declare const capitalize: (value: string) => string;
|
|
21
|
-
export declare const dateToIsoString: (date: Date) => string;
|
|
22
21
|
export declare const isoStringToDate: (value: string) => Date | null;
|
|
23
|
-
export
|
|
22
|
+
export declare const getWeekNumber: (value: Date) => [number, number];
|
|
23
|
+
export declare const getMonthName: (value: Date) => string;
|
|
24
|
+
export declare const getFirstWeek: (year?: number | undefined) => Date;
|
|
25
|
+
export declare const getLastWeek: (year?: number | undefined) => Date;
|
|
26
|
+
export { stripAccents, dateToIsoString } from './common';
|
|
24
27
|
export declare const getSpacings: (value: SpacingOrZero | Spacings, defaults?: "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "0" | Spacings | undefined) => string;
|
|
28
|
+
export declare const clone: <T>(value: T) => T;
|
|
29
|
+
export declare const unique: <T>(value: T[], callback?: (item: T, arr: T[]) => boolean) => T[];
|
|
30
|
+
export declare const keys: <T extends Record<string | number | symbol, any>>(value: T) => (keyof T)[];
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
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
|
-
export declare const isObject: <T = unknown>(value: unknown) => value is T;
|
|
6
5
|
export declare const isBoolean: (value: unknown) => value is boolean;
|
|
7
6
|
export declare const isNumericString: (value: unknown) => value is string;
|
|
8
7
|
export declare const isString: (value: unknown) => value is string;
|
|
9
8
|
export declare const isDateInstance: (value: unknown) => value is Date;
|
|
10
9
|
export declare const isDate: (value: unknown) => boolean;
|
|
10
|
+
export declare const isDateEquals: (x: Date, y: Date, time?: boolean) => boolean;
|
|
11
11
|
export declare const strCmp: (x: string, y: string, options?: {
|
|
12
12
|
ignoreAccents?: boolean;
|
|
13
13
|
ignoreCase?: boolean;
|
|
@@ -15,4 +15,4 @@ export declare const strCmp: (x: string, y: string, options?: {
|
|
|
15
15
|
contain?: boolean;
|
|
16
16
|
}) => boolean;
|
|
17
17
|
export declare const isValidEmail: (value: string) => boolean;
|
|
18
|
-
export { isKeyOf } from './common';
|
|
18
|
+
export { isObject, isKeyOf } from './common';
|