@equisoft/design-elements-react 9.9.7-snapshot.20251130214838 → 9.9.7-snapshot.20251206191221

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.
@@ -6,4 +6,4 @@ export declare function isOptionEnabled(option: DropdownListOption): boolean;
6
6
  export declare function disableNonSelectedOptions(options: DropdownListOption[], selectedOptions: DropdownListOption[]): DropdownListOption[];
7
7
  export declare function getDefaultOptions(value: string | string[] | undefined, options: DropdownListOption[], multiselect?: boolean): DropdownListOption[] | undefined;
8
8
  export declare function getOptionLabel(option: DropdownListOption): string;
9
- export declare function isOptionSelected(option: DropdownListOption, selectedOptions?: DropdownListOption[]): boolean;
9
+ export declare function isOptionSelected(option: DropdownListOption, selectedOptions: DropdownListOption[] | undefined): boolean;
@@ -30,8 +30,8 @@ export interface DropdownMenuButtonProps {
30
30
  * Sets chevron icon
31
31
  * @default true
32
32
  * */
33
- firstItemRef?: RefObject<HTMLAnchorElement>;
34
33
  hasCaret?: boolean;
34
+ firstItemRef?: RefObject<HTMLElement>;
35
35
  icon?: ReactElement<IconProps | AvatarProps>;
36
36
  id?: string;
37
37
  inverted?: boolean;
@@ -0,0 +1,17 @@
1
+ import { type FC } from 'react';
2
+ import type { FilterOption } from './filter-option';
3
+ export declare const Footer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
+ type Value = string[];
5
+ export interface FilterMultiProps {
6
+ async?: boolean;
7
+ label: string;
8
+ maxSelectableOptions?: number;
9
+ options: FilterOption[];
10
+ value?: Value;
11
+ onChange?(value: Value): void;
12
+ }
13
+ /**
14
+ * @alpha This component is experimental and may change without a major version bump.
15
+ */
16
+ export declare const FilterMulti: FC<FilterMultiProps>;
17
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface FilterOption {
2
+ disabled?: boolean;
3
+ label: string;
4
+ value: string;
5
+ }
@@ -0,0 +1,14 @@
1
+ import { type FC } from 'react';
2
+ import type { FilterOption } from './filter-option';
3
+ type Value = string | null;
4
+ export interface FilterSingleProps {
5
+ label: string;
6
+ options: FilterOption[];
7
+ value?: Value;
8
+ onChange?(value: Value): void;
9
+ }
10
+ /**
11
+ * @alpha This component is experimental and may change without a major version bump.
12
+ */
13
+ export declare const FilterSingle: FC<FilterSingleProps>;
14
+ export {};
@@ -0,0 +1,5 @@
1
+ export { FilterSingle } from './filter-single';
2
+ export type { FilterSingleProps } from './filter-single';
3
+ export { FilterMulti } from './filter-multi';
4
+ export type { FilterMultiProps } from './filter-multi';
5
+ export type { FilterOption } from './filter-option';
@@ -0,0 +1,6 @@
1
+ import { type FC } from 'react';
2
+ export interface ClearFiltersProps {
3
+ selectedFiltersCount: number;
4
+ onClearFilters(): void;
5
+ }
6
+ export declare const ClearFilters: FC<ClearFiltersProps>;
@@ -0,0 +1,12 @@
1
+ import { type ThemeProps } from 'styled-components';
2
+ import { ResolvedTheme } from '../../../themes';
3
+ interface FilterDropdownButtonProps extends ThemeProps<ResolvedTheme> {
4
+ $label: string;
5
+ $hasFilters: boolean;
6
+ }
7
+ interface PortalDropdownMenuProps {
8
+ $dropdownMenuId: string;
9
+ }
10
+ export declare const PortalFilterDropdownMenuStyle: import("styled-components").GlobalStyleComponent<PortalDropdownMenuProps, import("styled-components").DefaultTheme>;
11
+ export declare const FilterDropdownButton: import("styled-components").StyledComponent<import("react").FC<import("../../dropdown-menu-button").DropdownMenuButtonProps>, import("styled-components").DefaultTheme, FilterDropdownButtonProps, never>;
12
+ export {};
@@ -0,0 +1,17 @@
1
+ import { type Ref } from 'react';
2
+ import type { ListboxRef } from '../../listbox/listbox';
3
+ import type { FilterOption } from '../filter-option';
4
+ export declare const Divider: import("styled-components").StyledComponent<"span", import("styled-components").DefaultTheme, {}, never>;
5
+ export interface ListContainerProps {
6
+ listboxRef: Ref<ListboxRef>;
7
+ multiselect?: boolean;
8
+ options: FilterOption[];
9
+ searchRef: Ref<HTMLInputElement>;
10
+ selectedFiltersCount: number;
11
+ value: string | string[] | null | undefined;
12
+ onChange?(options: FilterOption[]): void;
13
+ onClearFilters(): void;
14
+ onOptionClick?(option: FilterOption): void;
15
+ onSearchChange?(search: string): void;
16
+ }
17
+ export declare const ListContainer: import("react").ForwardRefExoticComponent<ListContainerProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,15 @@
1
+ import type { FilterOption } from '../filter-option';
2
+ type Nullable<T> = T | null | undefined;
3
+ type Value = string | string[];
4
+ export interface UseListFilterResponse {
5
+ displayValue: string;
6
+ filteredOptions: FilterOption[];
7
+ hasFiltersApplied: boolean;
8
+ }
9
+ export interface UseListFilterOptions<T extends Value> {
10
+ options: FilterOption[];
11
+ searchValue: string;
12
+ value: Nullable<T>;
13
+ }
14
+ export declare function useListFilter<T extends Value>({ searchValue, options, value, }: UseListFilterOptions<T>): UseListFilterResponse;
15
+ export {};
@@ -0,0 +1,11 @@
1
+ export interface UseSearchOptions {
2
+ initialSearchValue?: string;
3
+ optionsCount: number;
4
+ }
5
+ export interface UseSearchResponse {
6
+ searchEnabled: boolean;
7
+ searchValue: string;
8
+ handleSearchChange?(newValue: string): void;
9
+ setSearchValue(value: string): void;
10
+ }
11
+ export declare function useSearch({ initialSearchValue, optionsCount, }: UseSearchOptions): UseSearchResponse;
@@ -24,6 +24,7 @@ export * from './external-link';
24
24
  export * from './feedbacks';
25
25
  export * from './field-container';
26
26
  export * from './fieldset';
27
+ export * from './filters';
27
28
  export * from './global-banner';
28
29
  export * from './global-header';
29
30
  export * from './heading';
@@ -1,4 +1,4 @@
1
- import { ForwardRefExoticComponent, KeyboardEvent, RefAttributes, RefObject } from 'react';
1
+ import { ForwardRefExoticComponent, KeyboardEvent, RefAttributes, type RefObject } from 'react';
2
2
  type Value = string | string[];
3
3
  export interface ListboxOption {
4
4
  disabled?: boolean;
@@ -21,6 +21,11 @@ export interface ListboxProps {
21
21
  * @default true
22
22
  */
23
23
  focusable?: boolean;
24
+ /**
25
+ * Set to true to enable keyboard navigation managed by the listbox
26
+ * @default Same value as focusable
27
+ */
28
+ keyboardNav?: boolean;
24
29
  /**
25
30
  * Activates multiple selection feature
26
31
  * @default false
@@ -51,5 +56,7 @@ export interface ListboxProps {
51
56
  */
52
57
  onOptionClick?(option?: ListboxOption): void;
53
58
  }
54
- export declare const Listbox: ForwardRefExoticComponent<ListboxProps & RefAttributes<HTMLDivElement>>;
59
+ export interface ListboxRef extends HTMLDivElement {
60
+ }
61
+ export declare const Listbox: ForwardRefExoticComponent<ListboxProps & RefAttributes<ListboxRef>>;
55
62
  export {};
@@ -1,4 +1,3 @@
1
- import { type FC } from 'react';
2
1
  import { CommonSearchProps } from './search-input';
3
2
  export type SearchContextualProps = CommonSearchProps;
4
- export declare const SearchContextual: FC<SearchContextualProps>;
3
+ export declare const SearchContextual: import("react").ForwardRefExoticComponent<CommonSearchProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -1,4 +1,4 @@
1
- import { ChangeEvent, type FC, FocusEvent } from 'react';
1
+ import { type ChangeEvent, type FocusEvent } from 'react';
2
2
  export interface CommonSearchProps {
3
3
  id?: string;
4
4
  disabled?: boolean;
@@ -16,4 +16,4 @@ export interface SearchInputProps extends CommonSearchProps {
16
16
  hasButton?: boolean;
17
17
  hasIcon?: boolean;
18
18
  }
19
- export declare const SearchInput: FC<SearchInputProps>;
19
+ export declare const SearchInput: import("react").ForwardRefExoticComponent<SearchInputProps & import("react").RefAttributes<HTMLInputElement>>;
@@ -43,6 +43,19 @@ export declare const Translations: {
43
43
  title: string;
44
44
  message: string;
45
45
  };
46
+ filter: {
47
+ cancel: string;
48
+ apply_zero: string;
49
+ apply_one: string;
50
+ apply_other: string;
51
+ clearFilter_zero: string;
52
+ clearFilter_one: string;
53
+ clearFilter_other: string;
54
+ displayValue_zero: string;
55
+ displayValue_one: string;
56
+ displayValue_other: string;
57
+ searchNoResults: string;
58
+ };
46
59
  'global-banner': {
47
60
  ignore: string;
48
61
  };
@@ -183,6 +196,19 @@ export declare const Translations: {
183
196
  title: string;
184
197
  message: string;
185
198
  };
199
+ filter: {
200
+ cancel: string;
201
+ apply_zero: string;
202
+ apply_one: string;
203
+ apply_other: string;
204
+ clearFilter_zero: string;
205
+ clearFilter_one: string;
206
+ clearFilter_other: string;
207
+ displayValue_zero: string;
208
+ displayValue_one: string;
209
+ displayValue_other: string;
210
+ searchNoResults: string;
211
+ };
186
212
  'global-banner': {
187
213
  ignore: string;
188
214
  };