@producteca/producteca-ui-kit 1.2.2 → 1.2.4
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/button/button.d.ts +11 -0
- package/dist/components/emptyState/emptyState.d.ts +11 -0
- package/dist/components/icons/closeIcon/closeIcon.d.ts +5 -0
- package/dist/components/icons/fileIcon/fileIcon.d.ts +5 -0
- package/dist/components/icons/index.d.ts +5 -0
- package/dist/components/icons/mailIcon/mailIcon.d.ts +5 -0
- package/dist/components/icons/parameters.d.ts +35 -0
- package/dist/components/icons/searchIcon/searchIcon.d.ts +5 -0
- package/dist/components/icons/searchPublication/searchPublication.d.ts +5 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/input/toggleInput.d.ts +18 -0
- package/dist/components/selectField/selectField.d.ts +28 -0
- package/dist/components/spinner/spinner.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/locales/description.d.ts +2 -0
- package/dist/locales/es.d.ts +20 -0
- package/dist/locales/index.d.ts +2 -0
- package/dist/locales/translator.d.ts +3 -0
- package/dist/producteca-ui-kit.es.js +9862 -0
- package/dist/producteca-ui-kit.umd.js +68 -0
- package/dist/style.css +1 -0
- package/dist/styles/colors.d.ts +26 -0
- package/package.json +1 -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,5 @@
|
|
|
1
|
+
export { SearchPublication } from './searchPublication/searchPublication';
|
|
2
|
+
export { CloseIcon } from './closeIcon/closeIcon';
|
|
3
|
+
export { SearchIcon } from './searchIcon/searchIcon';
|
|
4
|
+
export { MailIcon } from './mailIcon/mailIcon';
|
|
5
|
+
export { FileIcon } from './fileIcon/fileIcon';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export interface IconInterface {
|
|
2
|
+
size?: number;
|
|
3
|
+
color?: string;
|
|
4
|
+
}
|
|
5
|
+
interface ArgTypes {
|
|
6
|
+
[key: string]: {
|
|
7
|
+
control: {
|
|
8
|
+
type: string;
|
|
9
|
+
presetColors?: {
|
|
10
|
+
title: string;
|
|
11
|
+
color: string;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export declare const argTypes: ArgTypes;
|
|
18
|
+
export declare const parameters: {
|
|
19
|
+
layout: string;
|
|
20
|
+
design: {
|
|
21
|
+
type: string;
|
|
22
|
+
url: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const defaultParameters: {
|
|
26
|
+
parameters: {
|
|
27
|
+
layout: string;
|
|
28
|
+
design: {
|
|
29
|
+
type: string;
|
|
30
|
+
url: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
argTypes: ArgTypes;
|
|
34
|
+
};
|
|
35
|
+
export default defaultParameters;
|
|
@@ -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
|
+
title?: string;
|
|
11
|
+
name: string;
|
|
12
|
+
type: 'checkbox' | 'radio';
|
|
13
|
+
items: ToggleItem[];
|
|
14
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
15
|
+
size: 'sm' | 'md' | 'lg';
|
|
16
|
+
}
|
|
17
|
+
export declare const ToggleInputList: React.FC<ToggleInputProps>;
|
|
18
|
+
export default ToggleInputList;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
options: SelectOption[];
|
|
12
|
+
onChange: (name: string, value: SelectOptionType) => void;
|
|
13
|
+
label?: string;
|
|
14
|
+
onBlur?: () => void;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
isMultiple?: boolean;
|
|
18
|
+
isRequired?: boolean;
|
|
19
|
+
isClearable?: boolean;
|
|
20
|
+
isSearchable?: boolean;
|
|
21
|
+
noOptionsMessage?: string;
|
|
22
|
+
hideSelectedOptions?: boolean;
|
|
23
|
+
rightModifier?: React.ReactNode;
|
|
24
|
+
isOptionDisabled?: (option: SelectOption) => boolean;
|
|
25
|
+
defaultValue?: (string | number)[] | null | undefined;
|
|
26
|
+
}
|
|
27
|
+
export declare const SelectField: React.FC<SelectFieldProps>;
|
|
28
|
+
export default SelectField;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components';
|
|
@@ -0,0 +1,2 @@
|
|
|
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 ";
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
selectRequiredText: string;
|
|
11
|
+
hideSelectedOptionsExplainText: string;
|
|
12
|
+
description: {
|
|
13
|
+
onChangeSelectField: string;
|
|
14
|
+
onChangeToggleInput: string;
|
|
15
|
+
selectField: {
|
|
16
|
+
defaultValue: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|