@producteca/producteca-ui-kit 1.99.1 → 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.
@@ -27,6 +27,7 @@ export interface FormFieldProps extends TextInputProps {
27
27
  label?: string;
28
28
  children?: React.ReactNode;
29
29
  rightAdornment?: React.ReactNode;
30
+ canViewPassword?: boolean;
30
31
  }
31
32
  export interface VisibilityIconProps {
32
33
  showPassword: boolean;
@@ -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,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 {};
@@ -71,6 +71,7 @@ declare const _default: {
71
71
  previous: string;
72
72
  reloadPage: string;
73
73
  save: string;
74
+ selectAll: string;
74
75
  selectPlaceholder: string;
75
76
  selected: string;
76
77
  selectedPlural: string;
@@ -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: {
@@ -71,6 +71,7 @@ declare const _default: {
71
71
  previous: string;
72
72
  reloadPage: string;
73
73
  save: string;
74
+ selectAll: string;
74
75
  selectPlaceholder: string;
75
76
  selected: string;
76
77
  selectedPlural: string;