@producteca/producteca-ui-kit 1.3.0 → 1.3.2

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 (31) hide show
  1. package/dist/components/button/button.d.ts +11 -0
  2. package/dist/components/emptyState/emptyState.d.ts +11 -0
  3. package/dist/components/icons/customIcon/customIcon.d.ts +12 -0
  4. package/dist/components/icons/fileIcon/fileIcon.d.ts +5 -0
  5. package/dist/components/icons/index.d.ts +6 -0
  6. package/dist/components/icons/mailIcon/mailIcon.d.ts +5 -0
  7. package/dist/components/icons/parameters.d.ts +51 -0
  8. package/dist/components/icons/priceCloseIcon/priceCloseIcon.d.ts +5 -0
  9. package/dist/components/icons/priceDownIcon/priceDownIcon.d.ts +5 -0
  10. package/dist/components/icons/searchPublication/searchPublication.d.ts +5 -0
  11. package/dist/components/index.d.ts +18 -0
  12. package/dist/components/input/textInput/errorMessage.d.ts +5 -0
  13. package/dist/components/input/textInput/formField.d.ts +10 -0
  14. package/dist/components/input/textInput/passwordInput.d.ts +4 -0
  15. package/dist/components/input/textInput/textInput.d.ts +25 -0
  16. package/dist/components/input/toggleInput/toggleInput.d.ts +18 -0
  17. package/dist/components/selectField/selectField.d.ts +29 -0
  18. package/dist/components/spinner/spinner.d.ts +6 -0
  19. package/dist/index.d.ts +4 -0
  20. package/dist/locales/description.d.ts +3 -0
  21. package/dist/locales/es.d.ts +31 -0
  22. package/dist/locales/index.d.ts +2 -0
  23. package/dist/locales/translator.d.ts +3 -0
  24. package/dist/producteca-ui-kit.es.js +13709 -0
  25. package/dist/producteca-ui-kit.umd.js +141 -0
  26. package/dist/style.css +1 -0
  27. package/dist/styles/colors.d.ts +25 -0
  28. package/dist/styles/theme.d.ts +2 -0
  29. package/dist/validators/index.d.ts +1 -0
  30. package/dist/validators/validation.d.ts +21 -0
  31. package/package.json +9 -1
@@ -0,0 +1,11 @@
1
+ interface ButtonProps {
2
+ label: string;
3
+ variant?: 'primary' | 'secondary' | 'success' | 'error';
4
+ outline?: boolean;
5
+ size?: 'sm' | 'lg';
6
+ type?: 'submit' | 'button' | 'reset';
7
+ onClick?: () => void;
8
+ }
9
+ export declare const Button: ({ type, variant, size, label, outline, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
10
+ export type { ButtonProps };
11
+ export default Button;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface EmptyStateProps {
4
+ onActionClick?: () => void;
5
+ actionText?: string;
6
+ text?: string;
7
+ icon?: React.ReactNode;
8
+ }
9
+ export declare const EmptyState: ({ onActionClick, icon, actionText, text, }: EmptyStateProps) => import("react/jsx-runtime").JSX.Element;
10
+ export type { EmptyStateProps };
11
+ export default EmptyState;
@@ -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;
@@ -0,0 +1,5 @@
1
+ import { IconInterface } from '../parameters';
2
+
3
+ export declare const FileIcon: ({ size, color }: IconInterface) => import("react/jsx-runtime").JSX.Element;
4
+ export type { IconInterface };
5
+ export default FileIcon;
@@ -0,0 +1,6 @@
1
+ export { SearchPublication } from './searchPublication/searchPublication';
2
+ export { MailIcon } from './mailIcon/mailIcon';
3
+ export { FileIcon } from './fileIcon/fileIcon';
4
+ export { PriceDownIcon } from './priceDownIcon/priceDownIcon';
5
+ export { PriceCloseIcon } from './priceCloseIcon/priceCloseIcon';
6
+ export { CustomIcon } from './customIcon/customIcon';
@@ -0,0 +1,5 @@
1
+ import { IconInterface } from '../parameters';
2
+
3
+ export declare const MailIcon: ({ size, color }: IconInterface) => import("react/jsx-runtime").JSX.Element;
4
+ export type { IconInterface };
5
+ export default MailIcon;
@@ -0,0 +1,51 @@
1
+ export interface IconInterface {
2
+ size?: number;
3
+ color?: string;
4
+ }
5
+ export declare const argTypes: {
6
+ color: {
7
+ control: {
8
+ type: string;
9
+ presetColors: boolean[];
10
+ };
11
+ description: string;
12
+ };
13
+ size: {
14
+ control: {
15
+ type: string;
16
+ };
17
+ description: string;
18
+ };
19
+ };
20
+ export declare const parameters: {
21
+ layout: string;
22
+ design: {
23
+ type: string;
24
+ url: string;
25
+ };
26
+ };
27
+ export declare const defaultParameters: {
28
+ parameters: {
29
+ layout: string;
30
+ design: {
31
+ type: string;
32
+ url: string;
33
+ };
34
+ };
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
+ };
50
+ };
51
+ export default defaultParameters;
@@ -0,0 +1,5 @@
1
+ import { IconInterface } from '../parameters';
2
+
3
+ export declare const PriceCloseIcon: ({ size, color }: IconInterface) => import("react/jsx-runtime").JSX.Element;
4
+ export type { IconInterface };
5
+ export default PriceCloseIcon;
@@ -0,0 +1,5 @@
1
+ import { IconInterface } from '../parameters';
2
+
3
+ export declare const PriceDownIcon: ({ size, color }: IconInterface) => import("react/jsx-runtime").JSX.Element;
4
+ export type { IconInterface };
5
+ export default PriceDownIcon;
@@ -0,0 +1,5 @@
1
+ import { IconInterface } from '../parameters';
2
+
3
+ export declare const SearchPublication: ({ size, color }: IconInterface) => import("react/jsx-runtime").JSX.Element;
4
+ export type { IconInterface };
5
+ export default SearchPublication;
@@ -0,0 +1,18 @@
1
+ import * as Button from './button/button';
2
+ import * as EmptyState from './emptyState/emptyState';
3
+ import * as SelectField from './selectField/selectField';
4
+ import * as FormField from './input/textInput/formField';
5
+ import * as ToggleInput from './input/toggleInput/toggleInput';
6
+ import * as Spinner from './spinner/spinner';
7
+ import * as Icons from './icons';
8
+ declare const Components: {
9
+ Button: typeof Button;
10
+ Spinner: typeof Spinner;
11
+ FormField: typeof FormField;
12
+ SelectField: typeof SelectField;
13
+ ToggleInput: typeof ToggleInput;
14
+ };
15
+ declare const Patterns: {
16
+ EmptyState: typeof EmptyState;
17
+ };
18
+ export { Icons, Components, Patterns };
@@ -0,0 +1,5 @@
1
+ import { ValidationProps } from '../../../validators';
2
+
3
+ export declare const ErrorMessage: ({ validationProps }: {
4
+ validationProps: ValidationProps;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -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,4 @@
1
+ import { default as React } from 'react';
2
+ import { FormFieldProps } from './formField';
3
+
4
+ export declare const PasswordInput: React.FC<FormFieldProps>;
@@ -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,18 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface ToggleItem {
4
+ id: string;
5
+ label: string;
6
+ isChecked?: boolean;
7
+ isDisabled?: boolean;
8
+ }
9
+ export interface ToggleInputProps {
10
+ name: string;
11
+ items: ToggleItem[];
12
+ onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
13
+ title?: string;
14
+ type?: 'checkbox' | 'radio';
15
+ size?: 'sm' | 'md' | 'lg';
16
+ }
17
+ export declare const ToggleInput: React.FC<ToggleInputProps>;
18
+ export default ToggleInput;
@@ -0,0 +1,29 @@
1
+ import { default as React } from 'react';
2
+
3
+ export interface SelectOption {
4
+ label: string;
5
+ value: string | number;
6
+ [key: string]: any;
7
+ }
8
+ export type SelectOptionType = SelectOption[] | SelectOption | null;
9
+ export interface SelectFieldProps {
10
+ name: string;
11
+ label?: string;
12
+ size?: 'md' | 'lg';
13
+ onBlur?: () => void;
14
+ placeholder?: string;
15
+ isDisabled?: boolean;
16
+ isMultiple?: boolean;
17
+ isRequired?: boolean;
18
+ isClearable?: boolean;
19
+ isSearchable?: boolean;
20
+ options: SelectOption[];
21
+ noOptionsMessage?: string;
22
+ hideSelectedOptions?: boolean;
23
+ rightModifier?: React.ReactNode;
24
+ isOptionDisabled?: (option: SelectOption) => boolean;
25
+ defaultValue?: (string | number)[] | null | undefined;
26
+ onChange: (name: string, value: SelectOptionType) => void;
27
+ }
28
+ export declare const SelectField: React.FC<SelectFieldProps>;
29
+ export default SelectField;
@@ -0,0 +1,6 @@
1
+ interface SpinnerProps {
2
+ size?: number;
3
+ }
4
+ export declare const Spinner: ({ size }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
5
+ export type { SpinnerProps };
6
+ export default Spinner;
@@ -0,0 +1,4 @@
1
+ import { Components, Icons, Patterns } from './components';
2
+
3
+ import * as Colors from './styles/colors';
4
+ export { Components, Icons, Patterns, Colors };
@@ -0,0 +1,3 @@
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
+ 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 ";
@@ -0,0 +1,31 @@
1
+ declare const _default: {
2
+ noResultsFound: string;
3
+ reloadPage: string;
4
+ selectPlaceholder: string;
5
+ selectOption: string;
6
+ noOptionsMessage: string;
7
+ noFoundOptions: string;
8
+ selectedPlural: string;
9
+ selected: string;
10
+ title: string;
11
+ password: string;
12
+ selectRequiredText: string;
13
+ exportedIcon: string;
14
+ hideSelectedOptionsExplainText: string;
15
+ description: {
16
+ onChangeSelectField: string;
17
+ onChangeToggleInput: string;
18
+ onChangeInput: string;
19
+ selectField: {
20
+ defaultValue: string;
21
+ };
22
+ icons: {
23
+ size: string;
24
+ };
25
+ };
26
+ error: {
27
+ required: string;
28
+ notValid: string;
29
+ };
30
+ };
31
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('i18next').TFunction<["translation", ...string[]], undefined>;
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { default as i18next } from 'i18next';
2
+
3
+ export default i18next;