@adoptaunabuelo/react-components 0.3.142 → 0.3.144
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/LICENSE +1 -1
- package/README.md +26 -3
- 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/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/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 +212 -212
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +41 -39
- package/package.json +55 -19
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default, { ComponentPropsWithoutRef, ReactNode, ComponentPropsWithRef, ReactElement, CSSProperties } from 'react';
|
|
3
|
+
import react__default, { ComponentPropsWithoutRef, ReactNode, ComponentPropsWithRef, ReactElement, CSSProperties, ChangeEvent } from 'react';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import { ButtonProps as ButtonProps$2 } from '@components/Button/Button';
|
|
6
|
+
import { CheckboxOption as CheckboxOption$1 } from '@components/Checkbox/CheckboxList';
|
|
6
7
|
import { PaymentMethod } from '@stripe/stripe-js';
|
|
7
8
|
import { LocationProps as LocationProps$1 } from '@components/Input/Location/InputLocation';
|
|
8
9
|
|
|
@@ -114,7 +115,9 @@ type InputProps = (InputPrimaryProps | InputSecondaryProps | InputThirdProps) &
|
|
|
114
115
|
|
|
115
116
|
declare const InputBirthday: ({ error, onChange, containerStyle, ...restProps }: InputBirthdayProps) => react_jsx_runtime.JSX.Element;
|
|
116
117
|
|
|
117
|
-
type InputBirthdayProps =
|
|
118
|
+
type InputBirthdayProps = Omit<InputProps, 'onChange'> & {
|
|
119
|
+
onChange?: (date: Date | ChangeEvent<HTMLInputElement>) => void;
|
|
120
|
+
};
|
|
118
121
|
|
|
119
122
|
declare const InputChat: (props: InputChatProps) => react_jsx_runtime.JSX.Element;
|
|
120
123
|
|
|
@@ -174,7 +177,7 @@ interface InputImageProps {
|
|
|
174
177
|
maxHeight?: number;
|
|
175
178
|
maxWidth?: number;
|
|
176
179
|
hideCrop?: boolean;
|
|
177
|
-
onChange?: (image:
|
|
180
|
+
onChange?: (image: string | ArrayBuffer | null) => void;
|
|
178
181
|
}
|
|
179
182
|
|
|
180
183
|
declare const InputLocation: ({ isLoaded, isForm, searchTypes, searchFields, onLocationChange, ...restProps }: InputLocationProps) => react_jsx_runtime.JSX.Element;
|
|
@@ -201,21 +204,22 @@ interface LocationProps {
|
|
|
201
204
|
timeZone?: string;
|
|
202
205
|
}
|
|
203
206
|
|
|
207
|
+
interface CountryProps {
|
|
208
|
+
id?: string;
|
|
209
|
+
countryCode: string;
|
|
210
|
+
prefix: string;
|
|
211
|
+
esCountry: string;
|
|
212
|
+
enCountry: string;
|
|
213
|
+
}
|
|
214
|
+
|
|
204
215
|
declare const InputPhone: (props: InputPhoneProps) => react_jsx_runtime.JSX.Element;
|
|
205
216
|
|
|
206
217
|
type InputPhoneProps = InputProps & {
|
|
207
218
|
country?: string;
|
|
208
|
-
countryOptions?:
|
|
209
|
-
id: string;
|
|
210
|
-
esCountry: string;
|
|
211
|
-
enCountry: string;
|
|
212
|
-
prefix: string;
|
|
213
|
-
countryCode: string;
|
|
214
|
-
[key: string]: any;
|
|
215
|
-
}[];
|
|
219
|
+
countryOptions?: CountryProps[];
|
|
216
220
|
onPhoneChange?: (item: {
|
|
217
221
|
country: string;
|
|
218
|
-
value?:
|
|
222
|
+
value?: string | number;
|
|
219
223
|
isValid: boolean;
|
|
220
224
|
}) => void;
|
|
221
225
|
};
|
|
@@ -233,7 +237,11 @@ interface InputRangeProps extends ComponentPropsWithoutRef<"input"> {
|
|
|
233
237
|
hideLabels?: boolean;
|
|
234
238
|
presents?: {
|
|
235
239
|
value: number;
|
|
236
|
-
icon:
|
|
240
|
+
icon: React.ComponentType<{
|
|
241
|
+
height?: number;
|
|
242
|
+
width?: number;
|
|
243
|
+
color?: string;
|
|
244
|
+
}>;
|
|
237
245
|
color: string;
|
|
238
246
|
colorSuccess: string;
|
|
239
247
|
onClick?: () => void;
|
|
@@ -263,13 +271,13 @@ type InputPriceProps = {
|
|
|
263
271
|
|
|
264
272
|
declare const Select: (props: Props$e) => react_jsx_runtime.JSX.Element;
|
|
265
273
|
|
|
266
|
-
interface Props$e extends ComponentPropsWithoutRef<"div"> {
|
|
274
|
+
interface Props$e extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
267
275
|
id: string;
|
|
268
276
|
optionStyle?: CSSProperties;
|
|
269
277
|
hideTitle?: boolean;
|
|
270
278
|
options: Array<OptionProps$5>;
|
|
271
279
|
selectedItem?: OptionProps$5;
|
|
272
|
-
onChange?: (option:
|
|
280
|
+
onChange?: (option: OptionProps$5) => void;
|
|
273
281
|
}
|
|
274
282
|
interface OptionProps$5 {
|
|
275
283
|
icon?: React.ReactElement;
|
|
@@ -335,7 +343,7 @@ interface OptionsProps {
|
|
|
335
343
|
id: string;
|
|
336
344
|
label: string;
|
|
337
345
|
labelColor?: string;
|
|
338
|
-
icon?:
|
|
346
|
+
icon?: React.ReactElement;
|
|
339
347
|
}
|
|
340
348
|
interface MenuRef {
|
|
341
349
|
close: () => void;
|
|
@@ -355,12 +363,12 @@ interface Props$c extends ComponentPropsWithoutRef<"div"> {
|
|
|
355
363
|
|
|
356
364
|
declare const Avatar: (props: Props$b) => react_jsx_runtime.JSX.Element;
|
|
357
365
|
|
|
358
|
-
interface Props$b extends ComponentPropsWithoutRef<"div"> {
|
|
366
|
+
interface Props$b extends Omit<ComponentPropsWithoutRef<"div">, "onChange"> {
|
|
359
367
|
icon?: string;
|
|
360
368
|
name?: string;
|
|
361
369
|
editable?: boolean;
|
|
362
370
|
clickable?: boolean;
|
|
363
|
-
onChange?: (file:
|
|
371
|
+
onChange?: (file: string | ArrayBuffer | null) => void;
|
|
364
372
|
}
|
|
365
373
|
|
|
366
374
|
interface FilterDefaultProps {
|
|
@@ -380,6 +388,7 @@ interface FilterDefaultProps {
|
|
|
380
388
|
onSave?: () => void;
|
|
381
389
|
}
|
|
382
390
|
|
|
391
|
+
type OptionWithDynamicProps = CheckboxOption$1;
|
|
383
392
|
interface FilterCheckboxProps extends FilterDefaultProps {
|
|
384
393
|
type: "single" | "multiple";
|
|
385
394
|
shape?: "circle" | "square";
|
|
@@ -388,14 +397,8 @@ interface FilterCheckboxProps extends FilterDefaultProps {
|
|
|
388
397
|
label: string;
|
|
389
398
|
sublabel?: string;
|
|
390
399
|
}>;
|
|
391
|
-
selectedOptions?:
|
|
392
|
-
|
|
393
|
-
[key: string]: any;
|
|
394
|
-
}>;
|
|
395
|
-
onChange?: (r: Array<{
|
|
396
|
-
id: string;
|
|
397
|
-
[key: string]: any;
|
|
398
|
-
}>) => void;
|
|
400
|
+
selectedOptions?: OptionWithDynamicProps[];
|
|
401
|
+
onChange?: (r: OptionWithDynamicProps[]) => void;
|
|
399
402
|
}
|
|
400
403
|
interface FilterCheckboxRef {
|
|
401
404
|
clean: () => void;
|
|
@@ -444,26 +447,25 @@ declare const Filter: react.ForwardRefExoticComponent<(FilterCheckboxProps | Fil
|
|
|
444
447
|
|
|
445
448
|
declare const CheckboxList: (props: Props$a) => react_jsx_runtime.JSX.Element;
|
|
446
449
|
|
|
450
|
+
type CheckboxOption = {
|
|
451
|
+
id: string;
|
|
452
|
+
label?: string;
|
|
453
|
+
sublabel?: string;
|
|
454
|
+
Element?: React.ReactElement;
|
|
455
|
+
error?: boolean;
|
|
456
|
+
[key: string]: string | React.ReactElement | boolean | undefined;
|
|
457
|
+
};
|
|
447
458
|
interface Props$a {
|
|
448
459
|
style?: CSSProperties;
|
|
449
460
|
elementStyle?: CSSProperties;
|
|
450
|
-
options: Array<
|
|
451
|
-
id: string;
|
|
452
|
-
label?: string;
|
|
453
|
-
sublabel?: string;
|
|
454
|
-
Element?: React.ReactElement;
|
|
455
|
-
error?: boolean;
|
|
456
|
-
}>;
|
|
461
|
+
options: Array<CheckboxOption>;
|
|
457
462
|
selectedOptions?: Array<{
|
|
458
463
|
id: string;
|
|
459
464
|
}>;
|
|
460
465
|
height?: number;
|
|
461
466
|
width?: number;
|
|
462
467
|
type: "single" | "multiple";
|
|
463
|
-
onChange?: (result: Array<
|
|
464
|
-
id: string;
|
|
465
|
-
[key: string]: any;
|
|
466
|
-
}>) => void;
|
|
468
|
+
onChange?: (result: Array<CheckboxOption>) => void;
|
|
467
469
|
position?: "left" | "right";
|
|
468
470
|
avatarEnabled?: boolean;
|
|
469
471
|
shape?: "circle" | "square";
|
|
@@ -598,7 +600,7 @@ interface Props$5 {
|
|
|
598
600
|
}>;
|
|
599
601
|
onChange?: (option: {
|
|
600
602
|
id: string;
|
|
601
|
-
icon:
|
|
603
|
+
icon: react__default.ReactElement;
|
|
602
604
|
}) => void;
|
|
603
605
|
}
|
|
604
606
|
|
|
@@ -624,7 +626,7 @@ declare const TagSelector: (props: Props$2) => react_jsx_runtime.JSX.Element;
|
|
|
624
626
|
|
|
625
627
|
interface Props$2 {
|
|
626
628
|
type?: "multiple" | "single";
|
|
627
|
-
style?:
|
|
629
|
+
style?: CSSProperties;
|
|
628
630
|
options: Array<OptionProps>;
|
|
629
631
|
optionsSelected?: Array<OptionProps>;
|
|
630
632
|
onChange?: (selection: Array<OptionProps>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adoptaunabuelo/react-components",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.144",
|
|
4
4
|
"homepage": "https://github.com/Adopta-Un-Abuelo/react-components",
|
|
5
5
|
"author": "Guillermo Angeles <guilleangeles94@gmail.com>",
|
|
6
6
|
"private": false,
|
|
@@ -21,26 +21,14 @@
|
|
|
21
21
|
"release": "auto shipit --base-branch=main",
|
|
22
22
|
"prepare": "npm run build",
|
|
23
23
|
"clean": "rm -rf package-lock.json && rm -rf node_modules && rm -rf dist && npm cache clean --force && npm install",
|
|
24
|
-
"chromatic": "npx chromatic --project-token
|
|
24
|
+
"chromatic": "npx chromatic --project-token=$CHROMATIC_PROJECT_TOKEN",
|
|
25
25
|
"storybook": "BROWSER='google chrome' storybook dev -p 6006",
|
|
26
26
|
"build-storybook": "storybook build"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@emotion/is-prop-valid": "^1.4.0",
|
|
30
|
-
"@lottiefiles/react-lottie-player": "^3.6.0",
|
|
31
|
-
"@react-google-maps/api": "^2.20.7",
|
|
32
|
-
"@stripe/react-stripe-js": "^5.4.1",
|
|
33
|
-
"@stripe/stripe-js": "^8.5.3",
|
|
34
|
-
"@tiptap/extension-text-align": "^3.13.0",
|
|
35
|
-
"@tiptap/extension-text-style": "^3.13.0",
|
|
36
|
-
"@tiptap/extensions": "^3.13.0",
|
|
37
|
-
"@tiptap/react": "^3.13.0",
|
|
38
|
-
"@tiptap/starter-kit": "^3.13.0",
|
|
39
|
-
"auto": "^11.3.6",
|
|
40
29
|
"clsx": "^2.1.1",
|
|
41
30
|
"compressorjs": "^1.2.1",
|
|
42
31
|
"country-flag-icons": "^1.6.4",
|
|
43
|
-
"date-fns": "^4.1.0",
|
|
44
32
|
"draft-js": "^0.11.7",
|
|
45
33
|
"draftjs-to-html": "^0.9.1",
|
|
46
34
|
"fuse.js": "^7.1.0",
|
|
@@ -48,18 +36,64 @@
|
|
|
48
36
|
"lodash.debounce": "^4.0.8",
|
|
49
37
|
"lucide-react": "^0.556.0",
|
|
50
38
|
"moment": "^2.30.1",
|
|
51
|
-
"next": "16.0.8",
|
|
52
|
-
"react": "19.2.3",
|
|
53
39
|
"react-dates": "^21.8.0",
|
|
54
|
-
"react-dom": "19.2.3",
|
|
55
40
|
"react-image-crop": "^11.0.10",
|
|
56
41
|
"react-modal": "^3.16.3",
|
|
57
|
-
"react-webcam": "^7.2.0",
|
|
58
|
-
"styled-components": "^6.1.19",
|
|
59
42
|
"styled-media-query": "^2.1.2"
|
|
60
43
|
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
46
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
47
|
+
"styled-components": "^5.0.0 || ^6.0.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependenciesMeta": {
|
|
50
|
+
"@emotion/is-prop-valid": {
|
|
51
|
+
"optional": true
|
|
52
|
+
},
|
|
53
|
+
"@lottiefiles/react-lottie-player": {
|
|
54
|
+
"optional": true
|
|
55
|
+
},
|
|
56
|
+
"@react-google-maps/api": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
59
|
+
"@stripe/react-stripe-js": {
|
|
60
|
+
"optional": true
|
|
61
|
+
},
|
|
62
|
+
"@stripe/stripe-js": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
65
|
+
"@tiptap/extension-text-align": {
|
|
66
|
+
"optional": true
|
|
67
|
+
},
|
|
68
|
+
"@tiptap/extension-text-style": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"@tiptap/extensions": {
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
"@tiptap/react": {
|
|
75
|
+
"optional": true
|
|
76
|
+
},
|
|
77
|
+
"@tiptap/starter-kit": {
|
|
78
|
+
"optional": true
|
|
79
|
+
},
|
|
80
|
+
"react-webcam": {
|
|
81
|
+
"optional": true
|
|
82
|
+
}
|
|
83
|
+
},
|
|
61
84
|
"devDependencies": {
|
|
62
85
|
"@chromatic-com/storybook": "^5.0.0",
|
|
86
|
+
"@emotion/is-prop-valid": "^1.4.0",
|
|
87
|
+
"@lottiefiles/react-lottie-player": "^3.6.0",
|
|
88
|
+
"@react-google-maps/api": "^2.20.7",
|
|
89
|
+
"@stripe/react-stripe-js": "^5.4.1",
|
|
90
|
+
"@stripe/stripe-js": "^8.5.3",
|
|
91
|
+
"@tiptap/extension-text-align": "^3.13.0",
|
|
92
|
+
"@tiptap/extension-text-style": "^3.13.0",
|
|
93
|
+
"@tiptap/extensions": "^3.13.0",
|
|
94
|
+
"@tiptap/react": "^3.13.0",
|
|
95
|
+
"@tiptap/starter-kit": "^3.13.0",
|
|
96
|
+
"auto": "^11.3.6",
|
|
63
97
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
64
98
|
"@rollup/plugin-json": "^6.1.0",
|
|
65
99
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
@@ -81,7 +115,9 @@
|
|
|
81
115
|
"@types/react-draft-wysiwyg": "^1.13.9",
|
|
82
116
|
"@types/react-modal": "^3.16.3",
|
|
83
117
|
"@types/react-places-autocomplete": "^7.2.14",
|
|
118
|
+
"@types/react-webcam": "^3.0.0",
|
|
84
119
|
"ajv": "^8.17.1",
|
|
120
|
+
"react-webcam": "^7.2.0",
|
|
85
121
|
"eslint": "^9.39.1",
|
|
86
122
|
"eslint-config-next": "^16.0.8",
|
|
87
123
|
"eslint-plugin-storybook": "^10.2.0",
|