@adoptaunabuelo/react-components 0.1.10 → 0.1.12

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 (33) hide show
  1. package/README.md +8 -0
  2. package/dist/cjs/components/Button/Button.d.ts +2 -2
  3. package/dist/cjs/components/Input/Input.d.ts +18 -0
  4. package/dist/cjs/components/Input/InputLocation.d.ts +10 -0
  5. package/dist/cjs/components/Input/InputPrimary.d.ts +15 -0
  6. package/dist/cjs/components/Input/InputRange.d.ts +11 -0
  7. package/dist/cjs/components/Input/InputSecondary.d.ts +15 -0
  8. package/dist/cjs/components/Input/InputStyled.d.ts +7 -0
  9. package/dist/cjs/components/Modal/Modal.d.ts +22 -0
  10. package/dist/cjs/components/SearchBar/SearchBar.d.ts +7 -0
  11. package/dist/cjs/components/Select/Select.d.ts +16 -0
  12. package/dist/cjs/components/Select/SelectPhone.d.ts +17 -0
  13. package/dist/cjs/components/index.d.ts +3 -0
  14. package/dist/cjs/constants/Country.d.ts +8 -0
  15. package/dist/cjs/index.js +324 -41
  16. package/dist/cjs/index.js.map +1 -1
  17. package/dist/esm/components/Button/Button.d.ts +2 -2
  18. package/dist/esm/components/Input/Input.d.ts +18 -0
  19. package/dist/esm/components/Input/InputLocation.d.ts +10 -0
  20. package/dist/esm/components/Input/InputPrimary.d.ts +15 -0
  21. package/dist/esm/components/Input/InputRange.d.ts +11 -0
  22. package/dist/esm/components/Input/InputSecondary.d.ts +15 -0
  23. package/dist/esm/components/Input/InputStyled.d.ts +7 -0
  24. package/dist/esm/components/Modal/Modal.d.ts +22 -0
  25. package/dist/esm/components/SearchBar/SearchBar.d.ts +7 -0
  26. package/dist/esm/components/Select/Select.d.ts +16 -0
  27. package/dist/esm/components/Select/SelectPhone.d.ts +17 -0
  28. package/dist/esm/components/index.d.ts +3 -0
  29. package/dist/esm/constants/Country.d.ts +8 -0
  30. package/dist/esm/index.js +324 -41
  31. package/dist/esm/index.js.map +1 -1
  32. package/dist/index.d.ts +58 -13
  33. package/package.json +48 -17
@@ -1,7 +1,7 @@
1
1
  import React, { ComponentPropsWithoutRef } from 'react';
2
- declare const Button: (props: Props) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Button;
4
- export interface Props extends ComponentPropsWithoutRef<"button"> {
4
+ export interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
5
5
  design?: 'primary' | 'secondary' | 'text' | 'image' | 'call-to-action';
6
6
  size?: 'small' | 'normal';
7
7
  icon?: React.ReactElement;
@@ -0,0 +1,18 @@
1
+ import { ReactElement, CSSProperties } from 'react';
2
+ import { InputStyledProps } from './InputStyled';
3
+ declare const Input: (props: Props) => import("react/jsx-runtime").JSX.Element;
4
+ export default Input;
5
+ export interface Props extends InputStyledProps {
6
+ containerStyle?: CSSProperties;
7
+ icon?: ReactElement;
8
+ error?: string | undefined;
9
+ lineColor?: string;
10
+ thumbColor?: string;
11
+ min?: number;
12
+ max?: number;
13
+ unit?: string;
14
+ hideRange?: boolean;
15
+ country?: string;
16
+ design?: 'primary' | 'secondary';
17
+ onPhoneChange?: (item: any) => void;
18
+ }
@@ -0,0 +1,10 @@
1
+ /// <reference types="google.maps" />
2
+ import { InputSecondaryProps } from './InputSecondary';
3
+ declare const InputLocation: (props: Props) => import("react/jsx-runtime").JSX.Element;
4
+ export default InputLocation;
5
+ export interface Props extends InputSecondaryProps {
6
+ onLocationChange?: (result: {
7
+ geocoder: google.maps.GeocoderResult;
8
+ location: google.maps.LatLngLiteral;
9
+ }) => void;
10
+ }
@@ -0,0 +1,15 @@
1
+ import { ReactElement, CSSProperties } from 'react';
2
+ import { InputStyledProps } from './InputStyled';
3
+ declare const InputPrimary: (props: Props) => import("react/jsx-runtime").JSX.Element;
4
+ export default InputPrimary;
5
+ export interface Props extends InputStyledProps {
6
+ containerStyle?: CSSProperties;
7
+ icon?: ReactElement;
8
+ error?: string | undefined;
9
+ country?: string;
10
+ onPhoneChange?: (item: {
11
+ country: string;
12
+ value?: any;
13
+ isValid: boolean;
14
+ }) => void;
15
+ }
@@ -0,0 +1,11 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ declare const InputRange: (props: Props) => import("react/jsx-runtime").JSX.Element;
3
+ export default InputRange;
4
+ export interface Props extends ComponentPropsWithoutRef<"input"> {
5
+ lineColor?: string;
6
+ thumbColor?: string;
7
+ min?: number;
8
+ max?: number;
9
+ unit?: string;
10
+ hideRange?: boolean;
11
+ }
@@ -0,0 +1,15 @@
1
+ import { ReactElement, CSSProperties } from 'react';
2
+ import { InputStyledProps } from './InputStyled';
3
+ declare const InputSecondary: (props: InputSecondaryProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default InputSecondary;
5
+ export interface InputSecondaryProps extends InputStyledProps {
6
+ containerStyle?: CSSProperties;
7
+ icon?: ReactElement;
8
+ error?: string | undefined;
9
+ country?: string;
10
+ onPhoneChange?: (item: {
11
+ country: string;
12
+ value?: any;
13
+ isValid: boolean;
14
+ }) => void;
15
+ }
@@ -0,0 +1,7 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+ declare const InputStyled: import("react").ForwardRefExoticComponent<Omit<InputStyledProps, "ref"> & import("react").RefAttributes<unknown>>;
3
+ export default InputStyled;
4
+ export interface InputStyledProps extends ComponentPropsWithRef<"input"> {
5
+ type?: 'text' | 'tel' | 'email' | 'date' | 'password' | 'range' | 'time' | 'number' | 'location';
6
+ hideCalendar?: boolean;
7
+ }
@@ -0,0 +1,22 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { CSSProperties } from 'styled-components';
3
+ import { ButtonProps } from '../Button/Button';
4
+ declare const ModalComponent: import("react").ForwardRefExoticComponent<ModalProps & import("react").RefAttributes<ModalRef>>;
5
+ export default ModalComponent;
6
+ export interface ModalProps extends ComponentPropsWithoutRef<"div"> {
7
+ isVisible: boolean;
8
+ design?: 'default' | 'full-screen';
9
+ title?: string;
10
+ subtitle?: string;
11
+ error?: string;
12
+ hideClose?: boolean;
13
+ hideHeader?: boolean;
14
+ contentStyle?: CSSProperties;
15
+ Header?: JSX.Element;
16
+ Bottom?: JSX.Element;
17
+ buttonProps?: ButtonProps;
18
+ onClose: () => void;
19
+ }
20
+ export interface ModalRef {
21
+ close: () => void;
22
+ }
@@ -0,0 +1,7 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ declare const SearchBar: (props: Props) => import("react/jsx-runtime").JSX.Element;
3
+ export default SearchBar;
4
+ export interface Props extends ComponentPropsWithoutRef<"input"> {
5
+ type?: "big" | "small";
6
+ design?: 'primary' | 'secondary';
7
+ }
@@ -0,0 +1,16 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { CSSProperties } from 'styled-components';
3
+ declare const Select: (props: Props) => import("react/jsx-runtime").JSX.Element;
4
+ export default Select;
5
+ export interface Props extends ComponentPropsWithoutRef<"div"> {
6
+ id: string;
7
+ optionStyle?: CSSProperties;
8
+ hideTitle?: boolean;
9
+ options: Array<OptionProps>;
10
+ selectedItem?: OptionProps;
11
+ onChange?: (option: any) => void;
12
+ }
13
+ interface OptionProps {
14
+ icon?: React.ReactElement;
15
+ label: string;
16
+ }
@@ -0,0 +1,17 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ declare const Select: (props: Props) => import("react/jsx-runtime").JSX.Element;
3
+ export default Select;
4
+ export interface Props extends ComponentPropsWithoutRef<"div"> {
5
+ id: string;
6
+ optionStyle?: any;
7
+ options: Array<CountryProps>;
8
+ selectedItem?: CountryProps;
9
+ focus: boolean;
10
+ onChange?: (a: any) => void;
11
+ }
12
+ export interface CountryProps {
13
+ countryCode: string;
14
+ prefix: string;
15
+ esCountry: string;
16
+ enCountry: string;
17
+ }
@@ -3,3 +3,6 @@ export { default as Text } from './Text/Text';
3
3
  export { default as ProgressBar } from './ProgressBar/ProgressBar';
4
4
  export { default as Feedback } from './Feedback/Feedback';
5
5
  export { default as Button } from './Button/Button';
6
+ export { default as Input } from './Input/Input';
7
+ export { default as Select } from './Select/Select';
8
+ export { default as SearchBar } from './SearchBar/SearchBar';
@@ -0,0 +1,8 @@
1
+ declare const Country: {
2
+ id: string;
3
+ esCountry: string;
4
+ enCountry: string;
5
+ prefix: string;
6
+ countryCode: string;
7
+ }[];
8
+ export default Country;