@adoptaunabuelo/react-components 0.1.9 → 0.1.11

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/index.d.ts CHANGED
@@ -1,23 +1,24 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React, { ComponentPropsWithoutRef } from 'react';
2
+ import react, { ComponentPropsWithoutRef, ComponentPropsWithRef, CSSProperties, ReactElement } from 'react';
3
+ import { CSSProperties as CSSProperties$1 } from 'styled-components';
3
4
 
4
- declare const BreadCrumb: ({ steps, ...props }: Props$4) => react_jsx_runtime.JSX.Element;
5
+ declare const BreadCrumb: ({ steps, ...props }: Props$7) => react_jsx_runtime.JSX.Element;
5
6
 
6
- interface Props$4 extends ComponentPropsWithoutRef<"div"> {
7
+ interface Props$7 extends ComponentPropsWithoutRef<"div"> {
7
8
  selectedStep?: number;
8
9
  steps: number;
9
10
  }
10
11
 
11
- declare const Text: (props: Props$3) => react_jsx_runtime.JSX.Element;
12
+ declare const Text: (props: Props$6) => react_jsx_runtime.JSX.Element;
12
13
 
13
- interface Props$3 extends ComponentPropsWithoutRef<"p"> {
14
+ interface Props$6 extends ComponentPropsWithoutRef<"p"> {
14
15
  type: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'p2' | 'c1' | 'c2';
15
16
  weight?: 'semibold' | 'medium' | 'regular';
16
17
  }
17
18
 
18
- declare const ProgressBar: (props: Props$2) => react_jsx_runtime.JSX.Element;
19
+ declare const ProgressBar: (props: Props$5) => react_jsx_runtime.JSX.Element;
19
20
 
20
- interface Props$2 extends ComponentPropsWithoutRef<"div"> {
21
+ interface Props$5 extends ComponentPropsWithoutRef<"div"> {
21
22
  progress: number | Array<{
22
23
  value: number;
23
24
  color?: string;
@@ -29,21 +30,21 @@ interface Props$2 extends ComponentPropsWithoutRef<"div"> {
29
30
  animationDelay?: number;
30
31
  }
31
32
 
32
- declare const FeedBack: ({ type, isVisible, ...props }: Props$1) => react_jsx_runtime.JSX.Element | null;
33
+ declare const FeedBack: ({ type, isVisible, ...props }: Props$4) => react_jsx_runtime.JSX.Element | null;
33
34
 
34
- interface Props$1 extends ComponentPropsWithoutRef<"div"> {
35
+ interface Props$4 extends ComponentPropsWithoutRef<"div"> {
35
36
  isVisible: boolean;
36
37
  type: 'success' | 'error';
37
38
  text: string;
38
39
  onClose?: () => void;
39
40
  }
40
41
 
41
- declare const Button: (props: Props) => react_jsx_runtime.JSX.Element;
42
+ declare const Button: (props: Props$3) => react_jsx_runtime.JSX.Element;
42
43
 
43
- interface Props extends ComponentPropsWithoutRef<"button"> {
44
+ interface Props$3 extends ComponentPropsWithoutRef<"button"> {
44
45
  design?: 'primary' | 'secondary' | 'text' | 'image' | 'call-to-action';
45
46
  size?: 'small' | 'normal';
46
- icon?: React.ReactElement;
47
+ icon?: react.ReactElement;
47
48
  iconPosition?: 'left' | 'right';
48
49
  loading?: boolean;
49
50
  disabled?: boolean;
@@ -54,6 +55,50 @@ interface Props extends ComponentPropsWithoutRef<"button"> {
54
55
  onSuccess?: (success: boolean) => void;
55
56
  }
56
57
 
58
+ interface InputStyledProps extends ComponentPropsWithRef<"input"> {
59
+ type?: 'text' | 'tel' | 'email' | 'date' | 'password' | 'range' | 'time' | 'number';
60
+ hideCalendar?: boolean;
61
+ }
62
+
63
+ declare const Input: (props: Props$2) => react_jsx_runtime.JSX.Element;
64
+
65
+ interface Props$2 extends InputStyledProps {
66
+ containerStyle?: CSSProperties;
67
+ icon?: ReactElement;
68
+ error?: string | undefined;
69
+ lineColor?: string;
70
+ thumbColor?: string;
71
+ min?: number;
72
+ max?: number;
73
+ unit?: string;
74
+ hideRange?: boolean;
75
+ country?: string;
76
+ design?: 'primary' | 'secondary';
77
+ onPhoneChange?: (item: any) => void;
78
+ }
79
+
80
+ declare const Select: (props: Props$1) => react_jsx_runtime.JSX.Element;
81
+
82
+ interface Props$1 extends ComponentPropsWithoutRef<"div"> {
83
+ id: string;
84
+ optionStyle?: CSSProperties$1;
85
+ hideTitle?: boolean;
86
+ options: Array<OptionProps>;
87
+ selectedItem?: OptionProps;
88
+ onChange?: (option: any) => void;
89
+ }
90
+ interface OptionProps {
91
+ icon?: React.ReactElement;
92
+ label: string;
93
+ }
94
+
95
+ declare const SearchBar: (props: Props) => react_jsx_runtime.JSX.Element;
96
+
97
+ interface Props extends ComponentPropsWithoutRef<"input"> {
98
+ type?: "big" | "small";
99
+ design?: 'primary' | 'secondary';
100
+ }
101
+
57
102
  declare const Color: {
58
103
  background: {
59
104
  primary: string;
@@ -147,4 +192,4 @@ declare const Color: {
147
192
  };
148
193
  };
149
194
 
150
- export { BreadCrumb, Button, Color, FeedBack as Feedback, ProgressBar, Text };
195
+ export { BreadCrumb, Button, Color, FeedBack as Feedback, Input, ProgressBar, SearchBar, Select, Text };
package/package.json CHANGED
@@ -1,41 +1,44 @@
1
1
  {
2
2
  "name": "@adoptaunabuelo/react-components",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
+ "homepage": "https://github.com/Adopta-Un-Abuelo/react-components",
4
5
  "author": "Guillermo Angeles <guilleangeles94@gmail.com>",
5
6
  "private": false,
7
+ "description": "A simple, customizable, and accessible library of React components",
8
+ "keywords": [
9
+ "react",
10
+ "components"
11
+ ],
6
12
  "main": "dist/cjs/index.js",
7
13
  "module": "dist/esm/index.js",
8
14
  "files": [
9
15
  "dist"
10
16
  ],
11
17
  "types": "dist/index.d.ts",
12
- "type": "module",
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/chromaui/intro-storybook-react-template.git"
16
- },
17
- "bugs": {
18
- "url": "https://github.com/chromaui/intro-storybook-react-template/issues"
19
- },
20
18
  "license": "MIT",
21
19
  "dependencies": {
22
20
  "@lottiefiles/react-lottie-player": "^3.5.3",
21
+ "country-flag-icons": "^1.5.7",
22
+ "fuse.js": "^6.6.2",
23
+ "google-libphonenumber": "^3.2.32",
23
24
  "lucide-react": "^0.219.0",
24
25
  "styled-components": "^5.3.10",
25
- "styled-media-query": "^2.1.2",
26
- "typescript": "^5.0.4"
26
+ "styled-media-query": "^2.1.2"
27
27
  },
28
28
  "scripts": {
29
29
  "dev": "vite",
30
30
  "build": "rollup -c",
31
31
  "release": "auto shipit --base-branch=main",
32
- "preview": "vite preview",
33
32
  "storybook": "storybook dev -p 6006",
33
+ "prepare": "npm run build",
34
34
  "build-storybook": "storybook build",
35
35
  "test-storybook": "test-storybook",
36
36
  "init-msw": "msw init public/",
37
37
  "chromatic": "npx chromatic --project-token=chpt_0dcfdd1e76a01ba"
38
38
  },
39
+ "peerDependencies": {
40
+ "react": "^18.2.0"
41
+ },
39
42
  "devDependencies": {
40
43
  "@rollup/plugin-commonjs": "^22.0.1",
41
44
  "@rollup/plugin-json": "^4.1.0",
@@ -43,7 +46,7 @@
43
46
  "@rollup/plugin-replace": "^4.0.0",
44
47
  "@rollup/plugin-typescript": "^8.3.4",
45
48
  "@storybook/addon-essentials": "^7.0.12",
46
- "@storybook/addon-interactions": "^7.0.12",
49
+ "@storybook/addon-interactions": "^7.0.15",
47
50
  "@storybook/addon-links": "^7.0.12",
48
51
  "@storybook/blocks": "^7.0.12",
49
52
  "@storybook/jest": "^0.1.0",
@@ -52,6 +55,7 @@
52
55
  "@storybook/test-runner": "^0.10.0",
53
56
  "@storybook/testing-library": "^0.1.0",
54
57
  "@svgr/rollup": "^6.3.1",
58
+ "@types/google-libphonenumber": "^7.4.23",
55
59
  "@types/react": "^18.0.28",
56
60
  "@types/react-dom": "^18.0.11",
57
61
  "@types/styled-components": "^5.1.26",
@@ -72,15 +76,38 @@
72
76
  "rollup-plugin-svg": "^2.0.0",
73
77
  "rollup-plugin-terser": "^7.0.2",
74
78
  "storybook": "^7.0.12",
79
+ "typescript": "^5.0.4",
75
80
  "vite": "^4.2.0"
76
81
  },
77
- "homepage": "https://github.com/Adopta-Un-Abuelo/react-components",
78
- "description": "A simple, customizable, and accessible library of React components",
79
- "keywords": [
80
- "react",
81
- "components"
82
- ],
83
82
  "engines": {
84
83
  "node": "16"
84
+ },
85
+ "eslintConfig": {
86
+ "extends": [
87
+ "react-app",
88
+ "react-app/jest"
89
+ ],
90
+ "overrides": [
91
+ {
92
+ "files": [
93
+ "**/*.stories.*"
94
+ ],
95
+ "rules": {
96
+ "import/no-anonymous-default-export": "off"
97
+ }
98
+ }
99
+ ]
100
+ },
101
+ "browserslist": {
102
+ "production": [
103
+ ">0.2%",
104
+ "not dead",
105
+ "not op_mini all"
106
+ ],
107
+ "development": [
108
+ "last 1 chrome version",
109
+ "last 1 firefox version",
110
+ "last 1 safari version"
111
+ ]
85
112
  }
86
113
  }