@producteca/producteca-ui-kit 1.3.1 → 1.3.3
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/components/icons/customIcon/customIcon.d.ts +12 -0
- package/dist/components/icons/index.d.ts +1 -2
- package/dist/components/icons/parameters.d.ts +25 -9
- package/dist/components/index.d.ts +2 -6
- package/dist/components/inputs/index.d.ts +3 -0
- package/dist/components/{selectField → inputs/selectField}/selectField.d.ts +3 -2
- package/dist/components/inputs/textInput/errorMessage.d.ts +5 -0
- package/dist/components/inputs/textInput/formField.d.ts +10 -0
- package/dist/components/inputs/textInput/passwordInput.d.ts +4 -0
- package/dist/components/inputs/textInput/textInput.d.ts +25 -0
- package/dist/components/patterns/index.d.ts +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/locales/description.d.ts +1 -0
- package/dist/locales/es.d.ts +11 -0
- package/dist/producteca-ui-kit.es.js +3294 -9426
- package/dist/producteca-ui-kit.umd.js +17 -58
- package/dist/style.css +1 -1
- package/dist/styles/colors.d.ts +5 -6
- package/dist/styles/theme.d.ts +2 -0
- package/dist/validators/index.d.ts +1 -0
- package/dist/validators/validation.d.ts +21 -0
- package/package.json +16 -1
- package/dist/components/icons/closeIcon/closeIcon.d.ts +0 -5
- package/dist/components/icons/searchIcon/searchIcon.d.ts +0 -5
- /package/dist/components/{input → inputs/toggleInput}/toggleInput.d.ts +0 -0
- /package/dist/components/{emptyState → patterns/emptyState}/emptyState.d.ts +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { SvgIconProps } from '@mui/material';
|
|
3
|
+
import { ColorCategory, ColorShade } from '../../../styles/colors';
|
|
4
|
+
|
|
5
|
+
export type iconSize = '24' | '20' | '16' | '12' | '8';
|
|
6
|
+
interface CustomIconProps extends SvgIconProps {
|
|
7
|
+
category?: ColorCategory;
|
|
8
|
+
shade?: ColorShade;
|
|
9
|
+
size?: iconSize;
|
|
10
|
+
}
|
|
11
|
+
export declare const CustomIcon: React.FC<CustomIconProps>;
|
|
12
|
+
export default CustomIcon;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { SearchPublication } from './searchPublication/searchPublication';
|
|
2
|
-
export { CloseIcon } from './closeIcon/closeIcon';
|
|
3
|
-
export { SearchIcon } from './searchIcon/searchIcon';
|
|
4
2
|
export { MailIcon } from './mailIcon/mailIcon';
|
|
5
3
|
export { FileIcon } from './fileIcon/fileIcon';
|
|
6
4
|
export { PriceDownIcon } from './priceDownIcon/priceDownIcon';
|
|
7
5
|
export { PriceCloseIcon } from './priceCloseIcon/priceCloseIcon';
|
|
6
|
+
export { CustomIcon } from './customIcon/customIcon';
|
|
@@ -2,19 +2,21 @@ export interface IconInterface {
|
|
|
2
2
|
size?: number;
|
|
3
3
|
color?: string;
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
export declare const argTypes: {
|
|
6
|
+
color: {
|
|
7
7
|
control: {
|
|
8
8
|
type: string;
|
|
9
|
-
presetColors
|
|
10
|
-
title: string;
|
|
11
|
-
color: string;
|
|
12
|
-
}[];
|
|
9
|
+
presetColors: boolean[];
|
|
13
10
|
};
|
|
14
11
|
description: string;
|
|
15
12
|
};
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
size: {
|
|
14
|
+
control: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
18
20
|
export declare const parameters: {
|
|
19
21
|
layout: string;
|
|
20
22
|
design: {
|
|
@@ -30,6 +32,20 @@ export declare const defaultParameters: {
|
|
|
30
32
|
url: string;
|
|
31
33
|
};
|
|
32
34
|
};
|
|
33
|
-
argTypes:
|
|
35
|
+
argTypes: {
|
|
36
|
+
color: {
|
|
37
|
+
control: {
|
|
38
|
+
type: string;
|
|
39
|
+
presetColors: boolean[];
|
|
40
|
+
};
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
size: {
|
|
44
|
+
control: {
|
|
45
|
+
type: string;
|
|
46
|
+
};
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
34
50
|
};
|
|
35
51
|
export default defaultParameters;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export * from './button/button';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './selectField/selectField';
|
|
4
|
-
export * from './input/toggleInput';
|
|
5
|
-
export * from './icons';
|
|
6
|
-
export * from './spinner/spinner';
|
|
1
|
+
export * as Button from './button/button';
|
|
2
|
+
export * as Spinner from './spinner/spinner';
|
|
@@ -8,9 +8,8 @@ export interface SelectOption {
|
|
|
8
8
|
export type SelectOptionType = SelectOption[] | SelectOption | null;
|
|
9
9
|
export interface SelectFieldProps {
|
|
10
10
|
name: string;
|
|
11
|
-
options: SelectOption[];
|
|
12
|
-
onChange: (name: string, value: SelectOptionType) => void;
|
|
13
11
|
label?: string;
|
|
12
|
+
size?: 'md' | 'lg';
|
|
14
13
|
onBlur?: () => void;
|
|
15
14
|
placeholder?: string;
|
|
16
15
|
isDisabled?: boolean;
|
|
@@ -18,11 +17,13 @@ export interface SelectFieldProps {
|
|
|
18
17
|
isRequired?: boolean;
|
|
19
18
|
isClearable?: boolean;
|
|
20
19
|
isSearchable?: boolean;
|
|
20
|
+
options: SelectOption[];
|
|
21
21
|
noOptionsMessage?: string;
|
|
22
22
|
hideSelectedOptions?: boolean;
|
|
23
23
|
rightModifier?: React.ReactNode;
|
|
24
24
|
isOptionDisabled?: (option: SelectOption) => boolean;
|
|
25
25
|
defaultValue?: (string | number)[] | null | undefined;
|
|
26
|
+
onChange: (name: string, value: SelectOptionType) => void;
|
|
26
27
|
}
|
|
27
28
|
export declare const SelectField: React.FC<SelectFieldProps>;
|
|
28
29
|
export default SelectField;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextInputProps } from './textInput';
|
|
3
|
+
|
|
4
|
+
export interface FormFieldProps extends TextInputProps {
|
|
5
|
+
label?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
rightAdornment?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const FormField: React.FC<FormFieldProps>;
|
|
10
|
+
export default FormField;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Meta, inputValue } from '../../../validators';
|
|
3
|
+
|
|
4
|
+
export interface TextInputProps {
|
|
5
|
+
meta?: Meta;
|
|
6
|
+
max?: number;
|
|
7
|
+
min?: number;
|
|
8
|
+
name: string;
|
|
9
|
+
noErrors?: boolean;
|
|
10
|
+
value?: inputValue;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
isRequired?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
isClearable?: boolean;
|
|
15
|
+
size?: 'sm' | 'md' | 'lg';
|
|
16
|
+
leftIcon?: React.ReactNode;
|
|
17
|
+
rightIcon?: React.ReactNode;
|
|
18
|
+
isValid?: (value: inputValue) => boolean;
|
|
19
|
+
type?: 'text' | 'number' | 'password' | undefined;
|
|
20
|
+
onChange: ({ name, value }: {
|
|
21
|
+
name: string;
|
|
22
|
+
value: inputValue;
|
|
23
|
+
}) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare const TextInput: React.FC<TextInputProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as EmptyState from './emptyState/emptyState';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare const onChangeSelectField = "\n Callback que se dispara cuando cambia el valor del input.\n \n #### Par\u00E1metros\n event: `React.ChangeEvent<HTMLInputElement>`\n - `event.target.name`: El nombre del input.\n - `event.target.value`: El valor actual del input, que debe cumplir con la siguiente interfaz:\n \n ```typescript\n interface SelectOption {\n label: string;\n value: string | number;\n [key: string]: any;\n }\n ```\n ";
|
|
2
2
|
export declare const onChangeToggleInput = "\n Callback que se dispara cuando cambia el valor del input.\n \n #### Par\u00E1metros\n event: `React.ChangeEvent<HTMLInputElement>`\n - `event.target.name`: El nombre del input.\n - `event.target.value`: Siempre es \"on\"\n ";
|
|
3
|
+
export declare const onChangeInput = "\n Callback que se dispara cuando cambia el valor del input.\n \n #### Par\u00E1metros\n event: `React.ChangeEvent<HTMLInputElement>`\n - `event.target.name`: El nombre del input.\n - `event.target.value`: El valor actual del input, que debe cumplir con la siguiente interfaz:\n \n ```typescript\n value: string | number; \n ```\n ";
|
package/dist/locales/es.d.ts
CHANGED
|
@@ -7,14 +7,25 @@ declare const _default: {
|
|
|
7
7
|
noFoundOptions: string;
|
|
8
8
|
selectedPlural: string;
|
|
9
9
|
selected: string;
|
|
10
|
+
title: string;
|
|
11
|
+
password: string;
|
|
10
12
|
selectRequiredText: string;
|
|
13
|
+
exportedIcon: string;
|
|
11
14
|
hideSelectedOptionsExplainText: string;
|
|
12
15
|
description: {
|
|
13
16
|
onChangeSelectField: string;
|
|
14
17
|
onChangeToggleInput: string;
|
|
18
|
+
onChangeInput: string;
|
|
15
19
|
selectField: {
|
|
16
20
|
defaultValue: string;
|
|
17
21
|
};
|
|
22
|
+
icons: {
|
|
23
|
+
size: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
error: {
|
|
27
|
+
required: string;
|
|
28
|
+
notValid: string;
|
|
18
29
|
};
|
|
19
30
|
};
|
|
20
31
|
export default _default;
|