@adoptaunabuelo/react-components 0.3.141 → 0.3.143
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/esm/components/Avatar/Avatar.d.ts +2 -2
- package/dist/esm/components/Button/ButtonEditor.d.ts +6 -4
- package/dist/esm/components/Checkbox/CheckboxList.d.ts +10 -11
- package/dist/esm/components/Filter/FilterCheckbox.d.ts +4 -8
- package/dist/esm/components/Form/LocationForm.d.ts +1 -1
- package/dist/esm/components/Input/Basic/InputStyled.d.ts +1 -1
- package/dist/esm/components/Input/Birthday/InputBirthday.d.ts +4 -1
- package/dist/esm/components/Input/Image/InputImage.d.ts +1 -1
- package/dist/esm/components/Input/Phone/InputPhone.d.ts +3 -9
- package/dist/esm/components/Input/Phone/SelectPhone.d.ts +5 -4
- package/dist/esm/components/Input/Range/InputRange.d.ts +5 -1
- package/dist/esm/components/Menu/Menu.d.ts +1 -1
- package/dist/esm/components/Modal/ModalPrimary.d.ts +1 -1
- package/dist/esm/components/Select/Select.d.ts +2 -2
- package/dist/esm/components/SwitchTag/SwitchTag.d.ts +1 -1
- package/dist/esm/components/TagSelector/TagSelector.d.ts +2 -2
- package/dist/esm/index.js +441 -441
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +46 -42
- package/package.json +10 -9
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
declare const Avatar: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Avatar;
|
|
4
|
-
export interface Props extends ComponentPropsWithoutRef<"div"> {
|
|
4
|
+
export interface Props extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
5
5
|
icon?: string;
|
|
6
6
|
name?: string;
|
|
7
7
|
editable?: boolean;
|
|
8
8
|
clickable?: boolean;
|
|
9
|
-
onChange?: (file:
|
|
9
|
+
onChange?: (file: string | ArrayBuffer | null) => void;
|
|
10
10
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { EditorState } from "draft-js";
|
|
2
|
+
import { CSSProperties } from "react";
|
|
1
3
|
export declare const ButtonEditor: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
2
4
|
export default ButtonEditor;
|
|
3
5
|
export interface Props {
|
|
4
|
-
style?:
|
|
6
|
+
style?: CSSProperties;
|
|
5
7
|
text: string;
|
|
6
8
|
design?: "primary" | "secondary";
|
|
7
9
|
type: {
|
|
8
10
|
control: string;
|
|
9
|
-
value:
|
|
11
|
+
value: string;
|
|
10
12
|
};
|
|
11
|
-
editorState
|
|
12
|
-
onChange?:
|
|
13
|
+
editorState: EditorState;
|
|
14
|
+
onChange?: (editorState: EditorState) => void;
|
|
13
15
|
}
|
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
declare const CheckboxList: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default CheckboxList;
|
|
4
|
+
export type CheckboxOption = {
|
|
5
|
+
id: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
sublabel?: string;
|
|
8
|
+
Element?: React.ReactElement;
|
|
9
|
+
error?: boolean;
|
|
10
|
+
[key: string]: string | React.ReactElement | boolean | undefined;
|
|
11
|
+
};
|
|
4
12
|
export interface Props {
|
|
5
13
|
style?: CSSProperties;
|
|
6
14
|
elementStyle?: CSSProperties;
|
|
7
|
-
options: Array<
|
|
8
|
-
id: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
sublabel?: string;
|
|
11
|
-
Element?: React.ReactElement;
|
|
12
|
-
error?: boolean;
|
|
13
|
-
}>;
|
|
15
|
+
options: Array<CheckboxOption>;
|
|
14
16
|
selectedOptions?: Array<{
|
|
15
17
|
id: string;
|
|
16
18
|
}>;
|
|
17
19
|
height?: number;
|
|
18
20
|
width?: number;
|
|
19
21
|
type: "single" | "multiple";
|
|
20
|
-
onChange?: (result: Array<
|
|
21
|
-
id: string;
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
}>) => void;
|
|
22
|
+
onChange?: (result: Array<CheckboxOption>) => void;
|
|
24
23
|
position?: "left" | "right";
|
|
25
24
|
avatarEnabled?: boolean;
|
|
26
25
|
shape?: "circle" | "square";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { FilterDefaultProps } from "./FilterDefault";
|
|
2
|
+
import { CheckboxOption } from "@components/Checkbox/CheckboxList";
|
|
3
|
+
type OptionWithDynamicProps = CheckboxOption;
|
|
2
4
|
declare const FilterCheckbox: import("react").ForwardRefExoticComponent<FilterCheckboxProps & import("react").RefAttributes<FilterCheckboxRef>>;
|
|
3
5
|
export default FilterCheckbox;
|
|
4
6
|
export interface FilterCheckboxProps extends FilterDefaultProps {
|
|
@@ -9,14 +11,8 @@ export interface FilterCheckboxProps extends FilterDefaultProps {
|
|
|
9
11
|
label: string;
|
|
10
12
|
sublabel?: string;
|
|
11
13
|
}>;
|
|
12
|
-
selectedOptions?:
|
|
13
|
-
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}>;
|
|
16
|
-
onChange?: (r: Array<{
|
|
17
|
-
id: string;
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}>) => void;
|
|
14
|
+
selectedOptions?: OptionWithDynamicProps[];
|
|
15
|
+
onChange?: (r: OptionWithDynamicProps[]) => void;
|
|
20
16
|
}
|
|
21
17
|
export interface FilterCheckboxRef {
|
|
22
18
|
clean: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
|
-
import { LocationProps } from "
|
|
2
|
+
import { LocationProps } from "@components/Input/Location/InputLocation";
|
|
3
3
|
declare const LocationForm: (props: LocationFormProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default LocationForm;
|
|
5
5
|
export interface LocationFormProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from "react";
|
|
2
|
-
declare const InputStyled: import("react").ForwardRefExoticComponent<Omit<InputStyledProps, "ref"> & import("react").RefAttributes<
|
|
2
|
+
declare const InputStyled: import("react").ForwardRefExoticComponent<Omit<InputStyledProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
3
3
|
export default InputStyled;
|
|
4
4
|
export interface InputStyledProps extends ComponentPropsWithRef<"input"> {
|
|
5
5
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { ChangeEvent } from "react";
|
|
1
2
|
import { InputProps } from "../Basic/Input";
|
|
2
3
|
declare const InputBirthday: ({ error, onChange, containerStyle, ...restProps }: InputBirthdayProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default InputBirthday;
|
|
4
|
-
export type InputBirthdayProps =
|
|
5
|
+
export type InputBirthdayProps = Omit<InputProps, 'onChange'> & {
|
|
6
|
+
onChange?: (date: Date | ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
};
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
+
import { CountryProps } from "./SelectPhone";
|
|
1
2
|
import { InputProps } from "../Basic/Input";
|
|
2
3
|
declare const InputPhone: (props: InputPhoneProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
export default InputPhone;
|
|
4
5
|
export type InputPhoneProps = InputProps & {
|
|
5
6
|
country?: string;
|
|
6
|
-
countryOptions?:
|
|
7
|
-
id: string;
|
|
8
|
-
esCountry: string;
|
|
9
|
-
enCountry: string;
|
|
10
|
-
prefix: string;
|
|
11
|
-
countryCode: string;
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
}[];
|
|
7
|
+
countryOptions?: CountryProps[];
|
|
14
8
|
onPhoneChange?: (item: {
|
|
15
9
|
country: string;
|
|
16
|
-
value?:
|
|
10
|
+
value?: string | number;
|
|
17
11
|
isValid: boolean;
|
|
18
12
|
}) => void;
|
|
19
13
|
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from "react";
|
|
1
|
+
import { ComponentPropsWithoutRef, CSSProperties } from "react";
|
|
2
2
|
declare const Select: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Select;
|
|
4
|
-
export interface Props extends ComponentPropsWithoutRef<"div"> {
|
|
4
|
+
export interface Props extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
5
5
|
id: string;
|
|
6
|
-
optionStyle?:
|
|
6
|
+
optionStyle?: CSSProperties;
|
|
7
7
|
showMenu?: boolean;
|
|
8
8
|
options: Array<CountryProps>;
|
|
9
9
|
selectedItem?: CountryProps;
|
|
10
10
|
focus: boolean;
|
|
11
|
-
onChange?: (
|
|
11
|
+
onChange?: (country: CountryProps) => void;
|
|
12
12
|
}
|
|
13
13
|
export interface CountryProps {
|
|
14
|
+
id?: string;
|
|
14
15
|
countryCode: string;
|
|
15
16
|
prefix: string;
|
|
16
17
|
esCountry: string;
|
|
@@ -12,7 +12,11 @@ export interface InputRangeProps extends ComponentPropsWithoutRef<"input"> {
|
|
|
12
12
|
hideLabels?: boolean;
|
|
13
13
|
presents?: {
|
|
14
14
|
value: number;
|
|
15
|
-
icon:
|
|
15
|
+
icon: React.ComponentType<{
|
|
16
|
+
height?: number;
|
|
17
|
+
width?: number;
|
|
18
|
+
color?: string;
|
|
19
|
+
}>;
|
|
16
20
|
color: string;
|
|
17
21
|
colorSuccess: string;
|
|
18
22
|
onClick?: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, CSSProperties, ReactElement } from "react";
|
|
2
|
-
import { ButtonProps } from "
|
|
2
|
+
import { ButtonProps } from "@components/Button/Button";
|
|
3
3
|
declare const ModalComponent: import("react").ForwardRefExoticComponent<ModalPrimaryProps & import("react").RefAttributes<ModalRef>>;
|
|
4
4
|
export default ModalComponent;
|
|
5
5
|
export interface ModalPrimaryProps extends ComponentPropsWithoutRef<"div"> {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, CSSProperties } from "react";
|
|
2
2
|
declare const Select: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Select;
|
|
4
|
-
export interface Props extends ComponentPropsWithoutRef<"div"> {
|
|
4
|
+
export interface Props extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
5
5
|
id: string;
|
|
6
6
|
optionStyle?: CSSProperties;
|
|
7
7
|
hideTitle?: boolean;
|
|
8
8
|
options: Array<OptionProps>;
|
|
9
9
|
selectedItem?: OptionProps;
|
|
10
|
-
onChange?: (option:
|
|
10
|
+
onChange?: (option: OptionProps) => void;
|
|
11
11
|
}
|
|
12
12
|
interface OptionProps {
|
|
13
13
|
icon?: React.ReactElement;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { CSSProperties } from "react";
|
|
2
2
|
declare const TagSelector: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TagSelector;
|
|
4
4
|
export interface Props {
|
|
5
5
|
type?: "multiple" | "single";
|
|
6
|
-
style?:
|
|
6
|
+
style?: CSSProperties;
|
|
7
7
|
options: Array<OptionProps>;
|
|
8
8
|
optionsSelected?: Array<OptionProps>;
|
|
9
9
|
onChange?: (selection: Array<OptionProps>) => void;
|