@producteca/producteca-ui-kit 1.30.0 → 1.31.1
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/inputs/searcher/searcher.d.ts +2 -15
- package/dist/components/inputs/selectField/selectField.d.ts +7 -34
- package/dist/components/inputs/selectField/selectField.types.d.js +1 -0
- package/dist/components/inputs/selectField/selectField.types.d.ts +37 -0
- package/dist/locales/es.d.ts +2 -0
- package/dist/producteca-ui-kit.es.js +3 -3
- package/dist/producteca-ui-kit.umd.js +9 -9
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { BaseSelectProps } from '../selectField/selectField.types';
|
|
3
3
|
|
|
4
|
-
export interface SearcherProps {
|
|
5
|
-
name: string;
|
|
6
|
-
label?: string;
|
|
7
|
-
size?: 'md' | 'lg';
|
|
8
|
-
placeholder?: string;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
required?: boolean;
|
|
11
|
-
isClearable?: boolean;
|
|
12
|
-
isSearchable?: boolean;
|
|
4
|
+
export interface SearcherProps extends BaseSelectProps {
|
|
13
5
|
clearOnSelect?: boolean;
|
|
14
|
-
options: SelectOption[];
|
|
15
|
-
noOptionsMessage?: string | React.ReactNode;
|
|
16
|
-
rightModifier?: React.ReactNode;
|
|
17
|
-
isOptionDisabled?: (option: SelectOption) => boolean;
|
|
18
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
19
6
|
onInputChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
7
|
isLoading?: boolean;
|
|
21
8
|
input?: {
|
|
@@ -1,40 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { OptionProps, SingleValueProps } from 'react-select';
|
|
3
|
-
import {
|
|
4
|
-
import { InputValue, Meta } from '../../../validators';
|
|
3
|
+
import { SelectOption, SelectOptionType, BaseSelectProps, SelectFieldProps } from './selectField.types';
|
|
5
4
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export type SelectOptionType = SelectOption[] | SelectOption | null;
|
|
13
|
-
export interface SelectFieldProps {
|
|
14
|
-
name: string;
|
|
15
|
-
label?: string;
|
|
16
|
-
size?: 'md' | 'lg';
|
|
17
|
-
onBlur?: () => void;
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
isMultiple?: boolean;
|
|
21
|
-
required?: boolean;
|
|
22
|
-
isClearable?: boolean;
|
|
23
|
-
isSearchable?: boolean;
|
|
24
|
-
options: SelectOption[];
|
|
25
|
-
noOptionsMessage?: string;
|
|
26
|
-
hideSelectedOptions?: boolean;
|
|
27
|
-
rightModifier?: React.ReactNode;
|
|
28
|
-
isOptionDisabled?: (option: SelectOption) => boolean;
|
|
29
|
-
value?: (string | number)[] | null | undefined;
|
|
30
|
-
defaultValue?: (string | number) | (string | number)[] | null | undefined;
|
|
31
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
32
|
-
input?: ReduxFormInput;
|
|
33
|
-
meta?: Meta;
|
|
34
|
-
isValid?: (value: InputValue) => boolean;
|
|
35
|
-
noErrors?: boolean;
|
|
36
|
-
}
|
|
37
|
-
export declare const Option: (props: OptionProps<SelectOption>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const BaseOption: (props: OptionProps<SelectOption>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const Option: (props: OptionProps<SelectOption> & {
|
|
7
|
+
formatOption?: (option: SelectOption) => React.ReactNode;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const BaseSingleValue: (props: SingleValueProps<SelectOption>) => import("react/jsx-runtime").JSX.Element;
|
|
38
10
|
export declare const SingleValue: (props: SingleValueProps<SelectOption>) => import("react/jsx-runtime").JSX.Element;
|
|
39
11
|
export declare const SearchComponent: () => import("react/jsx-runtime").JSX.Element;
|
|
40
12
|
export declare const ClearComponent: ({ optionSelected, isClearable, handleChange, }: {
|
|
@@ -44,3 +16,4 @@ export declare const ClearComponent: ({ optionSelected, isClearable, handleChang
|
|
|
44
16
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
45
17
|
export declare const SelectField: React.FC<SelectFieldProps>;
|
|
46
18
|
export default SelectField;
|
|
19
|
+
export type { BaseSelectProps, SelectOption, SelectOptionType, SelectFieldProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReduxFormInput } from '../../../hooks/useReduxFormField';
|
|
2
|
+
import { InputValue, Meta } from '../../../validators';
|
|
3
|
+
|
|
4
|
+
export interface SelectOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string | number;
|
|
7
|
+
tooltipMessage?: string;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
export type SelectOptionType = SelectOption[] | SelectOption | null;
|
|
11
|
+
export interface BaseSelectProps {
|
|
12
|
+
name: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
size?: 'md' | 'lg' | 'fullwidth';
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
isClearable?: boolean;
|
|
19
|
+
isSearchable?: boolean;
|
|
20
|
+
options: SelectOption[];
|
|
21
|
+
noOptionsMessage?: string;
|
|
22
|
+
rightModifier?: React.ReactNode;
|
|
23
|
+
isOptionDisabled?: (option: SelectOption) => boolean;
|
|
24
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
25
|
+
formatOption?: (option: SelectOption) => React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
export interface SelectFieldProps extends BaseSelectProps {
|
|
28
|
+
onBlur?: () => void;
|
|
29
|
+
isMultiple?: boolean;
|
|
30
|
+
hideSelectedOptions?: boolean;
|
|
31
|
+
value?: (string | number)[] | null | undefined;
|
|
32
|
+
defaultValue?: (string | number) | (string | number)[] | null | undefined;
|
|
33
|
+
input?: ReduxFormInput;
|
|
34
|
+
meta?: Meta;
|
|
35
|
+
isValid?: (value: InputValue) => boolean;
|
|
36
|
+
noErrors?: boolean;
|
|
37
|
+
}
|