@connectif/ui-components 4.0.4 → 5.0.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/CHANGELOG.md +23 -0
- package/dist/components/input/Select.d.ts +2 -2
- package/dist/components/input/autocomplete/AutocompleteList.d.ts +2 -2
- package/dist/components/list/BaseListItem.d.ts +9 -2
- package/dist/components/list/ListItemButton.d.ts +17 -4
- package/dist/components/list/ListItemText.d.ts +9 -2
- package/dist/index.js +275 -246
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/AutocompleteUtils.d.ts +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [5.0.1] - 2026-01-23
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Fixed a bug in the `Select` component when multiple options are selected.
|
|
8
|
+
|
|
9
|
+
## [5.0.0] - 2026-01-23
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Fixed a bug in the `Autocomplete` component where options were hidden when the list contained few items.
|
|
14
|
+
- Fixed an issue in the `Select` component where the `sx` property applied to options did not affect the option text.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- `BaseListItem`, `ListItemButton`, `ListItemText` now support a `slotProps` property to customize text-related options inside list items.
|
|
19
|
+
- Added audit tooling to the library.
|
|
20
|
+
|
|
21
|
+
### Deprecated
|
|
22
|
+
|
|
23
|
+
- Deprecated `data-test` prop in `BaseListItem`, `ListItemButton`, and `ListItemText` components in favor of `data-testid`.
|
|
24
|
+
- Deprecated `dataTest` prop in `Select` component in favor of `data-testid`.
|
|
25
|
+
|
|
3
26
|
## [4.0.4] - 2026-01-21
|
|
4
27
|
|
|
5
28
|
### Changed
|
|
@@ -80,7 +80,7 @@ export type SelectProps<T extends string | number | undefined, Multiple extends
|
|
|
80
80
|
size?: 'S' | 'M';
|
|
81
81
|
className?: string;
|
|
82
82
|
paperClassName?: string;
|
|
83
|
-
|
|
83
|
+
'data-testid'?: string;
|
|
84
84
|
open?: boolean;
|
|
85
85
|
onOpen?: () => void;
|
|
86
86
|
};
|
|
@@ -90,6 +90,6 @@ export declare const BootstrapInput: import("@emotion/styled").StyledComponent<i
|
|
|
90
90
|
* If `multiple=true`, then value and onChange parameter are an array of values.
|
|
91
91
|
* The Select component value type can be restricted to any type that extends `string | number | undefined`.
|
|
92
92
|
*/
|
|
93
|
-
declare const Select: <T extends string | number | undefined = string | number | undefined, Multiple extends boolean | undefined = undefined, Value = SelectValue<T, Multiple>>({ variant, placeholder, children, onChange, onClose, options, multiple, value, virtualized, virtualizedProps, className, paperClassName, size, sx, renderValue, menuZIndex, menuColors, menuMaxHeight,
|
|
93
|
+
declare const Select: <T extends string | number | undefined = string | number | undefined, Multiple extends boolean | undefined = undefined, Value = SelectValue<T, Multiple>>({ variant, placeholder, children, onChange, onClose, options, multiple, value, virtualized, virtualizedProps, className, paperClassName, size, sx, renderValue, menuZIndex, menuColors, menuMaxHeight, "data-testid": dataTestId, open, onOpen, ...rest }: SelectProps<T, Multiple, Value>, ref: React.Ref<HTMLSelectElement>) => import("react/jsx-runtime").JSX.Element;
|
|
94
94
|
declare const _default: typeof Select;
|
|
95
95
|
export default _default;
|
|
@@ -25,15 +25,15 @@ type AutocompleteListProps<T extends string, Multiple extends boolean | undefine
|
|
|
25
25
|
addNewValueText?: string;
|
|
26
26
|
inputContainerRef: React.RefObject<HTMLDivElement>;
|
|
27
27
|
virtualListRef: React.RefObject<FixedSizeList<unknown>>;
|
|
28
|
-
listRef: React.RefObject<HTMLDivElement>;
|
|
29
28
|
isOpen: boolean;
|
|
30
29
|
selectedIndex: SelectedIndex<Multiple>;
|
|
31
30
|
highlightedIndex: number;
|
|
32
31
|
onAddSelectedValue: (event: React.MouseEvent<HTMLElement, MouseEvent>, option: AutocompleteLabeledOption<T>) => void;
|
|
33
32
|
onClickAwayPopover: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
34
33
|
};
|
|
34
|
+
export declare const AUTOCOMPLETE_ITEM_HEIGHT = 44;
|
|
35
35
|
/**
|
|
36
36
|
* Powered autocomplete list.
|
|
37
37
|
*/
|
|
38
|
-
declare const AutocompleteList: <T extends string, Multiple extends boolean | undefined = undefined>({ options, isLoading, loadingText, noOptionsText, addNewValueText, inputContainerRef, isOpen, selectedIndex, highlightedIndex, virtualListRef,
|
|
38
|
+
declare const AutocompleteList: <T extends string, Multiple extends boolean | undefined = undefined>({ options, isLoading, loadingText, noOptionsText, addNewValueText, inputContainerRef, isOpen, selectedIndex, highlightedIndex, virtualListRef, filteredOptions, onAddSelectedValue, onClickAwayPopover }: AutocompleteListProps<T, Multiple>) => import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
export default AutocompleteList;
|
|
@@ -2,6 +2,7 @@ import { SxProps } from '@mui/material';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { TypographyVariant } from '../../theme/Typography';
|
|
4
4
|
import { IconId } from '../icon/Icon';
|
|
5
|
+
import { TypographyProps } from '../typography/Typography';
|
|
5
6
|
export type BaseListItemProps = {
|
|
6
7
|
/**
|
|
7
8
|
* The color variant of the list item.
|
|
@@ -61,10 +62,16 @@ export type BaseListItemProps = {
|
|
|
61
62
|
* Class to override .MuiTooltip-popper styles
|
|
62
63
|
*/
|
|
63
64
|
tooltipClass?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Overrides properties.
|
|
67
|
+
*/
|
|
68
|
+
slotProps?: {
|
|
69
|
+
typography?: Partial<Omit<TypographyProps, 'ref' | 'children' | 'variant'>>;
|
|
70
|
+
};
|
|
64
71
|
/**
|
|
65
72
|
* Settled directly in DOM element, for testing easy location purposes.
|
|
66
73
|
*/
|
|
67
|
-
'data-
|
|
74
|
+
'data-testid'?: string;
|
|
68
75
|
};
|
|
69
|
-
declare const BaseListItem: ({ baseSx, color, typographyVariant, variant, startAdornment, endAdornment, children, startIconId, endIconId, selected, text, subText, tooltipClass, "data-
|
|
76
|
+
declare const BaseListItem: ({ baseSx, color, typographyVariant, variant, startAdornment, endAdornment, children, startIconId, endIconId, selected, text, subText, tooltipClass, slotProps, "data-testid": dataTestId }: BaseListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
70
77
|
export default BaseListItem;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ListItemButtonProps as MuiListItemButtonProps, SxProps } from '@mui/material';
|
|
3
3
|
import { BaseListItemProps } from './BaseListItem';
|
|
4
|
+
import { TypographyProps } from '../typography/Typography';
|
|
4
5
|
export type ListItemButtonProps = Pick<MuiListItemButtonProps, 'onClick' | 'tabIndex' | 'role' | 'onMouseDown' | 'onMouseUp' | 'onMouseEnter' | 'onMouseLeave' | 'className'> & {
|
|
5
6
|
/**
|
|
6
7
|
* If `true`, the onClick callback will also be triggered on aux click. Default is `false`.
|
|
@@ -14,11 +15,17 @@ export type ListItemButtonProps = Pick<MuiListItemButtonProps, 'onClick' | 'tabI
|
|
|
14
15
|
* Whether this list item button is disabled
|
|
15
16
|
*/
|
|
16
17
|
disabled?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Overrides properties.
|
|
20
|
+
*/
|
|
21
|
+
slotProps?: {
|
|
22
|
+
typography?: Partial<Omit<TypographyProps, 'ref' | 'children' | 'variant'>>;
|
|
23
|
+
};
|
|
17
24
|
/**
|
|
18
25
|
* Settled directly in DOM element, for testing easy location purposes.
|
|
19
26
|
*/
|
|
20
|
-
'data-
|
|
21
|
-
|
|
27
|
+
'data-testid'?: string;
|
|
28
|
+
buttonDataTestId?: string;
|
|
22
29
|
} & BaseListItemProps;
|
|
23
30
|
declare const ListItemButton: React.ForwardRefExoticComponent<Pick<MuiListItemButtonProps, "className" | "role" | "tabIndex" | "onClick" | "onMouseDown" | "onMouseEnter" | "onMouseLeave" | "onMouseUp"> & {
|
|
24
31
|
/**
|
|
@@ -33,10 +40,16 @@ declare const ListItemButton: React.ForwardRefExoticComponent<Pick<MuiListItemBu
|
|
|
33
40
|
* Whether this list item button is disabled
|
|
34
41
|
*/
|
|
35
42
|
disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Overrides properties.
|
|
45
|
+
*/
|
|
46
|
+
slotProps?: {
|
|
47
|
+
typography?: Partial<Omit<TypographyProps, "ref" | "children" | "variant">>;
|
|
48
|
+
};
|
|
36
49
|
/**
|
|
37
50
|
* Settled directly in DOM element, for testing easy location purposes.
|
|
38
51
|
*/
|
|
39
|
-
'data-
|
|
40
|
-
|
|
52
|
+
'data-testid'?: string;
|
|
53
|
+
buttonDataTestId?: string;
|
|
41
54
|
} & BaseListItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
42
55
|
export default ListItemButton;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TypographyVariant } from '../../theme/Typography';
|
|
2
|
+
import { TypographyProps } from '../typography/Typography';
|
|
2
3
|
export type ListItemTextProps = {
|
|
3
4
|
text?: string;
|
|
4
5
|
typographyVariant: TypographyVariant;
|
|
@@ -7,10 +8,16 @@ export type ListItemTextProps = {
|
|
|
7
8
|
* Class to override .MuiTooltip-popper styles
|
|
8
9
|
*/
|
|
9
10
|
tooltipClass?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Overrides properties.
|
|
13
|
+
*/
|
|
14
|
+
slotProps?: {
|
|
15
|
+
typography?: Partial<Omit<TypographyProps, 'ref' | 'children' | 'variant'>>;
|
|
16
|
+
};
|
|
10
17
|
/**
|
|
11
18
|
* Settled directly in DOM element, for testing easy location purposes.
|
|
12
19
|
*/
|
|
13
|
-
'data-
|
|
20
|
+
'data-testid'?: string;
|
|
14
21
|
};
|
|
15
|
-
declare const ListItemText: ({ text, typographyVariant, color, tooltipClass, "data-
|
|
22
|
+
declare const ListItemText: ({ text, typographyVariant, color, tooltipClass, slotProps, "data-testid": dataTestId }: ListItemTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
23
|
export default ListItemText;
|