@producteca/producteca-ui-kit 1.100.0 → 1.101.0
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/selectField/selectField.types.d.ts +1 -0
- package/dist/components/inputs/selectField/useSelectAll.d.js +1 -0
- package/dist/components/inputs/selectField/useSelectAll.d.ts +18 -0
- package/dist/locales/en.d.ts +1 -0
- package/dist/locales/es.d.ts +2 -0
- package/dist/locales/pt-BR.d.ts +1 -0
- package/dist/producteca-ui-kit.es.js +7 -7
- package/dist/producteca-ui-kit.umd.js +6 -6
- package/package.json +1 -1
|
@@ -37,6 +37,7 @@ export interface BaseSelectProps {
|
|
|
37
37
|
export interface SelectFieldProps extends BaseSelectProps {
|
|
38
38
|
onBlur?: () => void;
|
|
39
39
|
isMultiple?: boolean;
|
|
40
|
+
canSelectAll?: boolean;
|
|
40
41
|
hideSelectedOptions?: boolean;
|
|
41
42
|
value?: (string | number)[] | null | undefined;
|
|
42
43
|
defaultValue?: (string | number) | (string | number)[] | null | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ActionMeta, Props } from 'react-select';
|
|
2
|
+
import { SelectOption, SelectOptionType } from './selectField.types';
|
|
3
|
+
|
|
4
|
+
type SelectAllProps = Partial<Pick<Props<SelectOption, boolean>, 'options' | 'isOptionDisabled' | 'isOptionSelected' | 'getOptionValue' | 'filterOption'>>;
|
|
5
|
+
interface UseSelectAllParams {
|
|
6
|
+
canSelectAll: boolean;
|
|
7
|
+
options: SelectOption[];
|
|
8
|
+
optionSelected?: SelectOptionType;
|
|
9
|
+
isOptionDisabled?: (option: SelectOption) => boolean;
|
|
10
|
+
getOptionValue?: (option: SelectOption) => string;
|
|
11
|
+
}
|
|
12
|
+
interface UseSelectAllResult {
|
|
13
|
+
selectAllProps: SelectAllProps;
|
|
14
|
+
resolveChange: (selected: SelectOptionType, actionMeta?: ActionMeta<SelectOption>) => SelectOptionType;
|
|
15
|
+
}
|
|
16
|
+
export declare const isSelectAllOption: (option?: SelectOption | null) => boolean;
|
|
17
|
+
export declare const useSelectAll: ({ canSelectAll, options, optionSelected, isOptionDisabled, getOptionValue, }: UseSelectAllParams) => UseSelectAllResult;
|
|
18
|
+
export {};
|
package/dist/locales/en.d.ts
CHANGED
package/dist/locales/es.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ declare const _default: {
|
|
|
22
22
|
selectOption: string;
|
|
23
23
|
noOptionsMessage: string;
|
|
24
24
|
noFoundOptions: string;
|
|
25
|
+
selectAll: string;
|
|
25
26
|
selectedPlural: string;
|
|
26
27
|
selected: string;
|
|
27
28
|
title: string;
|
|
@@ -90,6 +91,7 @@ declare const _default: {
|
|
|
90
91
|
labelFullWidth: string;
|
|
91
92
|
getOptionLabel: string;
|
|
92
93
|
getOptionValue: string;
|
|
94
|
+
canSelectAll: string;
|
|
93
95
|
tooltipProps: string;
|
|
94
96
|
};
|
|
95
97
|
actionBar: {
|