@adoptaunabuelo/react-components 0.1.11 → 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.
- package/README.md +8 -0
- package/dist/cjs/components/Button/Button.d.ts +2 -2
- package/dist/cjs/components/Input/InputLocation.d.ts +10 -0
- package/dist/cjs/components/Input/InputSecondary.d.ts +2 -2
- package/dist/cjs/components/Input/InputStyled.d.ts +1 -1
- package/dist/cjs/components/Modal/Modal.d.ts +22 -0
- package/dist/cjs/index.js +34 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Button/Button.d.ts +2 -2
- package/dist/esm/components/Input/InputLocation.d.ts +10 -0
- package/dist/esm/components/Input/InputSecondary.d.ts +2 -2
- package/dist/esm/components/Input/InputStyled.d.ts +1 -1
- package/dist/esm/components/Modal/Modal.d.ts +22 -0
- package/dist/esm/index.js +29 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +11 -11
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -42,6 +42,14 @@ function App() {
|
|
|
42
42
|
}
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
+
### Watch out!
|
|
46
|
+
To be able to use Input location, you will need to add this line to your project header:
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places&language=es"/>
|
|
50
|
+
```
|
|
51
|
+
Please, replace ``YOUR_API_KEY`` with your Google Maps API Key.
|
|
52
|
+
|
|
45
53
|
## Storybook
|
|
46
54
|
|
|
47
55
|
You can checkout all the library Components and its docs in our storybook
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
declare const Button: (props:
|
|
2
|
+
declare const Button: (props: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Button;
|
|
4
|
-
export interface
|
|
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,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
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactElement, CSSProperties } from 'react';
|
|
2
2
|
import { InputStyledProps } from './InputStyled';
|
|
3
|
-
declare const InputSecondary: (props:
|
|
3
|
+
declare const InputSecondary: (props: InputSecondaryProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default InputSecondary;
|
|
5
|
-
export interface
|
|
5
|
+
export interface InputSecondaryProps extends InputStyledProps {
|
|
6
6
|
containerStyle?: CSSProperties;
|
|
7
7
|
icon?: ReactElement;
|
|
8
8
|
error?: string | undefined;
|
|
@@ -2,6 +2,6 @@ import { ComponentPropsWithRef } from 'react';
|
|
|
2
2
|
declare const InputStyled: import("react").ForwardRefExoticComponent<Omit<InputStyledProps, "ref"> & import("react").RefAttributes<unknown>>;
|
|
3
3
|
export default InputStyled;
|
|
4
4
|
export interface InputStyledProps extends ComponentPropsWithRef<"input"> {
|
|
5
|
-
type?: 'text' | 'tel' | 'email' | 'date' | 'password' | 'range' | 'time' | 'number';
|
|
5
|
+
type?: 'text' | 'tel' | 'email' | 'date' | 'password' | 'range' | 'time' | 'number' | 'location';
|
|
6
6
|
hideCalendar?: boolean;
|
|
7
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
|
+
}
|