carbon-react 118.0.0 → 118.1.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/esm/__internal__/filter-object-properties/filter-object-properties.d.ts +1 -1
- package/esm/components/button-minor/button-minor.style.js +8 -0
- package/esm/components/pager/pager.component.js +5 -5
- package/esm/components/pill/pill.component.d.ts +3 -1
- package/esm/components/pill/pill.component.js +1 -0
- package/esm/components/select/__internal__/select-list-context.d.ts +7 -0
- package/esm/components/select/__internal__/select-text/index.d.ts +2 -0
- package/esm/components/select/__internal__/select-text/index.js +1 -0
- package/esm/components/select/__internal__/select-text/select-text.component.d.ts +33 -0
- package/esm/components/select/__internal__/select-text/select-text.component.js +16 -36
- package/esm/components/select/__internal__/select-text/select-text.style.d.ts +6 -1
- package/esm/components/select/filterable-select/filterable-select.component.d.ts +65 -0
- package/esm/components/select/filterable-select/filterable-select.component.js +568 -102
- package/esm/components/select/filterable-select/index.d.ts +2 -1
- package/esm/components/select/filterable-select/index.js +1 -0
- package/esm/components/select/index.d.ts +6 -0
- package/esm/components/select/index.js +6 -6
- package/esm/components/select/list-action-button/index.d.ts +2 -0
- package/esm/components/select/list-action-button/index.js +1 -0
- package/esm/components/select/list-action-button/list-action-button.component.d.ts +7 -0
- package/esm/components/select/list-action-button/list-action-button.component.js +9 -6
- package/esm/components/select/list-action-button/list-action-button.style.d.ts +2 -0
- package/esm/components/select/multi-select/index.d.ts +2 -1
- package/esm/components/select/multi-select/index.js +1 -0
- package/esm/components/select/multi-select/multi-select.component.d.ts +62 -0
- package/esm/components/select/multi-select/multi-select.component.js +575 -104
- package/esm/components/select/multi-select/multi-select.style.d.ts +4 -0
- package/esm/components/select/multi-select/multi-select.style.js +1 -0
- package/esm/components/select/option/index.d.ts +2 -25
- package/esm/components/select/option/index.js +1 -0
- package/esm/components/select/option/option.component.d.ts +34 -0
- package/esm/components/select/option/option.component.js +399 -62
- package/esm/components/select/option/option.style.d.ts +6 -0
- package/esm/components/select/option/option.style.js +0 -5
- package/esm/components/select/option-group-header/index.d.ts +2 -10
- package/esm/components/select/option-group-header/index.js +1 -0
- package/esm/components/select/option-group-header/option-group-header.component.d.ts +16 -0
- package/esm/components/select/option-group-header/option-group-header.component.js +4 -15
- package/esm/components/select/option-group-header/option-group-header.style.d.ts +2 -0
- package/esm/components/select/option-row/index.d.ts +2 -16
- package/esm/components/select/option-row/index.js +1 -0
- package/esm/components/select/option-row/option-row.component.d.ts +42 -0
- package/esm/components/select/option-row/option-row.component.js +10 -40
- package/esm/components/select/option-row/option-row.style.d.ts +6 -0
- package/esm/components/select/select-list/index.d.ts +2 -0
- package/esm/components/select/select-list/index.js +1 -0
- package/esm/components/select/select-list/select-list-container.style.d.ts +6 -0
- package/esm/components/select/select-list/select-list.component.d.ts +64 -0
- package/esm/components/select/select-list/select-list.component.js +69 -100
- package/esm/components/select/select-list/select-list.style.d.ts +12 -0
- package/esm/components/select/select-list/select-list.style.js +2 -2
- package/esm/components/select/select-textbox/index.d.ts +2 -1
- package/esm/components/select/select-textbox/index.js +1 -0
- package/esm/components/select/select-textbox/select-textbox.component.d.ts +81 -0
- package/esm/components/select/select-textbox/select-textbox.component.js +567 -142
- package/esm/components/select/select.style.d.ts +8 -0
- package/esm/components/select/simple-select/index.d.ts +2 -1
- package/esm/components/select/simple-select/index.js +1 -0
- package/esm/components/select/simple-select/simple-select.component.d.ts +58 -0
- package/esm/components/select/simple-select/simple-select.component.js +578 -111
- package/esm/components/select/utils/get-next-child-by-text.d.ts +5 -0
- package/esm/components/select/utils/get-next-child-by-text.js +20 -17
- package/esm/components/select/utils/get-next-index-by-key.d.ts +2 -0
- package/esm/components/select/utils/highlight-part-of-text.d.ts +2 -0
- package/esm/components/select/utils/highlight-part-of-text.js +10 -3
- package/esm/components/select/utils/is-expected-option.d.ts +2 -0
- package/esm/components/select/utils/is-expected-option.js +1 -1
- package/esm/components/select/utils/is-expected-value.d.ts +1 -0
- package/esm/components/select/utils/is-expected-value.js +1 -1
- package/esm/components/select/utils/is-navigation-key.d.ts +1 -0
- package/esm/components/select/utils/matching-text.style.d.ts +2 -0
- package/esm/components/select/utils/with-filter.hoc.d.ts +14 -0
- package/esm/components/select/utils/with-filter.hoc.js +59 -41
- package/esm/components/tabs/__internal__/tab-title/tab-title.component.js +1 -0
- package/lib/__internal__/filter-object-properties/filter-object-properties.d.ts +1 -1
- package/lib/components/button-minor/button-minor.style.js +8 -0
- package/lib/components/pager/pager.component.js +5 -5
- package/lib/components/pill/pill.component.d.ts +3 -1
- package/lib/components/pill/pill.component.js +1 -0
- package/lib/components/select/__internal__/select-list-context.d.ts +7 -0
- package/lib/components/select/__internal__/select-text/index.d.ts +2 -0
- package/lib/components/select/__internal__/select-text/index.js +15 -0
- package/lib/components/select/__internal__/select-text/package.json +6 -0
- package/lib/components/select/__internal__/select-text/select-text.component.d.ts +33 -0
- package/lib/components/select/__internal__/select-text/select-text.component.js +16 -36
- package/lib/components/select/__internal__/select-text/select-text.style.d.ts +6 -1
- package/lib/components/select/filterable-select/filterable-select.component.d.ts +65 -0
- package/lib/components/select/filterable-select/filterable-select.component.js +569 -103
- package/lib/components/select/filterable-select/index.d.ts +2 -1
- package/lib/components/select/filterable-select/index.js +15 -0
- package/lib/components/select/filterable-select/package.json +6 -0
- package/lib/components/select/index.d.ts +6 -0
- package/lib/components/select/index.js +6 -6
- package/lib/components/select/list-action-button/index.d.ts +2 -0
- package/lib/components/select/list-action-button/index.js +15 -0
- package/lib/components/select/list-action-button/list-action-button.component.d.ts +7 -0
- package/lib/components/select/list-action-button/list-action-button.component.js +9 -6
- package/lib/components/select/list-action-button/list-action-button.style.d.ts +2 -0
- package/lib/components/select/list-action-button/package.json +6 -0
- package/lib/components/select/multi-select/index.d.ts +2 -1
- package/lib/components/select/multi-select/index.js +15 -0
- package/lib/components/select/multi-select/multi-select.component.d.ts +62 -0
- package/lib/components/select/multi-select/multi-select.component.js +576 -105
- package/lib/components/select/multi-select/multi-select.style.d.ts +4 -0
- package/lib/components/select/multi-select/multi-select.style.js +1 -0
- package/lib/components/select/multi-select/package.json +6 -0
- package/lib/components/select/option/index.d.ts +2 -25
- package/lib/components/select/option/index.js +15 -0
- package/lib/components/select/option/option.component.d.ts +34 -0
- package/lib/components/select/option/option.component.js +399 -62
- package/lib/components/select/option/option.style.d.ts +6 -0
- package/lib/components/select/option/option.style.js +0 -8
- package/lib/components/select/option/package.json +6 -0
- package/lib/components/select/option-group-header/index.d.ts +2 -10
- package/lib/components/select/option-group-header/index.js +15 -0
- package/lib/components/select/option-group-header/option-group-header.component.d.ts +16 -0
- package/lib/components/select/option-group-header/option-group-header.component.js +4 -15
- package/lib/components/select/option-group-header/option-group-header.style.d.ts +2 -0
- package/lib/components/select/option-group-header/package.json +6 -0
- package/lib/components/select/option-row/index.d.ts +2 -16
- package/lib/components/select/option-row/index.js +15 -0
- package/lib/components/select/option-row/option-row.component.d.ts +42 -0
- package/lib/components/select/option-row/option-row.component.js +10 -40
- package/lib/components/select/option-row/option-row.style.d.ts +6 -0
- package/lib/components/select/option-row/package.json +6 -0
- package/lib/components/select/select-list/index.d.ts +2 -0
- package/lib/components/select/select-list/index.js +15 -0
- package/lib/components/select/select-list/package.json +6 -0
- package/lib/components/select/select-list/select-list-container.style.d.ts +6 -0
- package/lib/components/select/select-list/select-list.component.d.ts +64 -0
- package/lib/components/select/select-list/select-list.component.js +69 -100
- package/lib/components/select/select-list/select-list.style.d.ts +12 -0
- package/lib/components/select/select-list/select-list.style.js +2 -2
- package/lib/components/select/select-textbox/index.d.ts +2 -1
- package/lib/components/select/select-textbox/index.js +15 -0
- package/lib/components/select/select-textbox/package.json +6 -0
- package/lib/components/select/select-textbox/select-textbox.component.d.ts +81 -0
- package/lib/components/select/select-textbox/select-textbox.component.js +567 -142
- package/lib/components/select/select.style.d.ts +8 -0
- package/lib/components/select/simple-select/index.d.ts +2 -1
- package/lib/components/select/simple-select/index.js +15 -0
- package/lib/components/select/simple-select/package.json +6 -0
- package/lib/components/select/simple-select/simple-select.component.d.ts +58 -0
- package/lib/components/select/simple-select/simple-select.component.js +579 -113
- package/lib/components/select/utils/get-next-child-by-text.d.ts +5 -0
- package/lib/components/select/utils/get-next-child-by-text.js +20 -17
- package/lib/components/select/utils/get-next-index-by-key.d.ts +2 -0
- package/lib/components/select/utils/highlight-part-of-text.d.ts +2 -0
- package/lib/components/select/utils/highlight-part-of-text.js +10 -3
- package/lib/components/select/utils/is-expected-option.d.ts +2 -0
- package/lib/components/select/utils/is-expected-option.js +1 -1
- package/lib/components/select/utils/is-expected-value.d.ts +1 -0
- package/lib/components/select/utils/is-expected-value.js +1 -1
- package/lib/components/select/utils/is-navigation-key.d.ts +1 -0
- package/lib/components/select/utils/matching-text.style.d.ts +2 -0
- package/lib/components/select/utils/with-filter.hoc.d.ts +14 -0
- package/lib/components/select/utils/with-filter.hoc.js +59 -42
- package/lib/components/tabs/__internal__/tab-title/tab-title.component.js +1 -0
- package/package.json +1 -1
- package/esm/components/select/__internal__/select-text/select-text.d.ts +0 -36
- package/esm/components/select/filterable-select/filterable-select.d.ts +0 -71
- package/esm/components/select/multi-select/multi-select.d.ts +0 -68
- package/esm/components/select/select-textbox/select-textbox.d.ts +0 -72
- package/esm/components/select/simple-select/simple-select.d.ts +0 -64
- package/lib/components/select/__internal__/select-text/select-text.d.ts +0 -36
- package/lib/components/select/filterable-select/filterable-select.d.ts +0 -71
- package/lib/components/select/multi-select/multi-select.d.ts +0 -68
- package/lib/components/select/select-textbox/select-textbox.d.ts +0 -72
- package/lib/components/select/simple-select/simple-select.d.ts +0 -64
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./filterable-select";
|
|
1
|
+
export { default } from "./filterable-select.component";
|
|
2
|
+
export type { FilterableSelectProps } from "./filterable-select.component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./filterable-select.component";
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export { default as Option } from "./option";
|
|
2
|
+
export type { OptionProps } from "./option";
|
|
2
3
|
export { default as OptionRow } from "./option-row";
|
|
4
|
+
export type { OptionRowProps } from "./option-row";
|
|
3
5
|
export { default as OptionGroupHeader } from "./option-group-header";
|
|
6
|
+
export type { OptionGroupHeaderProps } from "./option-group-header";
|
|
4
7
|
export { default as Select } from "./simple-select";
|
|
8
|
+
export type { SimpleSelectProps } from "./simple-select";
|
|
5
9
|
export { default as FilterableSelect } from "./filterable-select";
|
|
10
|
+
export type { FilterableSelectProps } from "./filterable-select";
|
|
6
11
|
export { default as MultiSelect } from "./multi-select";
|
|
12
|
+
export type { MultiSelectProps } from "./multi-select";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as Option } from "./option
|
|
2
|
-
export { default as OptionRow } from "./option-row
|
|
3
|
-
export { default as OptionGroupHeader } from "./option-group-header
|
|
4
|
-
export { default as Select } from "./simple-select
|
|
5
|
-
export { default as FilterableSelect } from "./filterable-select
|
|
6
|
-
export { default as MultiSelect } from "./multi-select
|
|
1
|
+
export { default as Option } from "./option";
|
|
2
|
+
export { default as OptionRow } from "./option-row";
|
|
3
|
+
export { default as OptionGroupHeader } from "./option-group-header";
|
|
4
|
+
export { default as Select } from "./simple-select";
|
|
5
|
+
export { default as FilterableSelect } from "./filterable-select";
|
|
6
|
+
export { default as MultiSelect } from "./multi-select";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./list-action-button.component";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface ListActionButtonProps {
|
|
3
|
+
listActionButton?: boolean | React.ReactNode;
|
|
4
|
+
onListAction?: (ev: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const ListActionButton: React.ForwardRefExoticComponent<ListActionButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export default ListActionButton;
|
|
@@ -12,11 +12,16 @@ const ListActionButton = /*#__PURE__*/React.forwardRef(({
|
|
|
12
12
|
function renderListActionButton() {
|
|
13
13
|
if (!listActionButton || listActionButton === true) {
|
|
14
14
|
return /*#__PURE__*/React.createElement(Button, {
|
|
15
|
-
|
|
15
|
+
ref: ref,
|
|
16
16
|
onClick: onListAction,
|
|
17
17
|
iconType: "add",
|
|
18
18
|
iconPosition: "after"
|
|
19
19
|
}, l.select.actionButtonText());
|
|
20
|
+
} // istanbul ignore if
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
if (! /*#__PURE__*/React.isValidElement(listActionButton)) {
|
|
24
|
+
return listActionButton;
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
return /*#__PURE__*/React.cloneElement(listActionButton, {
|
|
@@ -28,10 +33,8 @@ const ListActionButton = /*#__PURE__*/React.forwardRef(({
|
|
|
28
33
|
return /*#__PURE__*/React.createElement(StyledListActionButtonWrapper, null, renderListActionButton());
|
|
29
34
|
});
|
|
30
35
|
ListActionButton.propTypes = {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/** A callback for when the Action Button is triggered */
|
|
35
|
-
onListAction: PropTypes.func.isRequired
|
|
36
|
+
"listActionButton": PropTypes.node,
|
|
37
|
+
"onListAction": PropTypes.func
|
|
36
38
|
};
|
|
39
|
+
ListActionButton.displayName = "ListActionButton";
|
|
37
40
|
export default ListActionButton;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./multi-select";
|
|
1
|
+
export { default } from "./multi-select.component";
|
|
2
|
+
export type { MultiSelectProps } from "./multi-select.component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./multi-select.component";
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Side } from "@floating-ui/dom";
|
|
3
|
+
import { FormInputPropTypes } from "../select-textbox";
|
|
4
|
+
export interface MultiSelectProps extends Omit<FormInputPropTypes, "defaultValue" | "value"> {
|
|
5
|
+
/** Prop to specify the aria-label attribute of the component input */
|
|
6
|
+
"aria-label"?: string;
|
|
7
|
+
/** Prop to specify the aria-labeledby property of the component input */
|
|
8
|
+
"aria-labelledby"?: string;
|
|
9
|
+
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
10
|
+
"data-component"?: string;
|
|
11
|
+
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
12
|
+
"data-element"?: string;
|
|
13
|
+
/** Identifier used for testing purposes, applied to the root element of the component. */
|
|
14
|
+
"data-role"?: string;
|
|
15
|
+
/** Size of an input */
|
|
16
|
+
size?: "small" | "medium" | "large";
|
|
17
|
+
/** Child components (such as Option or OptionRow) for the SelectList */
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
/** The default selected value(s), when the component is operating in uncontrolled mode */
|
|
20
|
+
defaultValue?: string[] | Record<string, unknown>[];
|
|
21
|
+
/** Boolean to toggle where SelectList is rendered in relation to the Select Input */
|
|
22
|
+
disablePortal?: boolean;
|
|
23
|
+
/** If true the loader animation is displayed in the option list */
|
|
24
|
+
isLoading?: boolean;
|
|
25
|
+
/** When true component will work in multi column mode.
|
|
26
|
+
* Children should consist of OptionRow components in this mode
|
|
27
|
+
*/
|
|
28
|
+
multiColumn?: boolean;
|
|
29
|
+
/** A custom message to be displayed when any option does not match the filter text */
|
|
30
|
+
noResultsMessage?: string;
|
|
31
|
+
/** A custom callback for when the input text changes */
|
|
32
|
+
onFilterChange?: (filterText: string) => void;
|
|
33
|
+
/** A custom callback for when the dropdown menu opens */
|
|
34
|
+
onOpen?: () => void;
|
|
35
|
+
/** If true the Component opens on focus */
|
|
36
|
+
openOnFocus?: boolean;
|
|
37
|
+
/** SelectList table header, should consist of multiple th elements.
|
|
38
|
+
* Works only in multiColumn mode
|
|
39
|
+
*/
|
|
40
|
+
tableHeader?: React.ReactNode;
|
|
41
|
+
/** The selected value(s), when the component is operating in controlled mode */
|
|
42
|
+
value?: string[] | Record<string, unknown>[];
|
|
43
|
+
/** Overrides the default tooltip position */
|
|
44
|
+
tooltipPosition?: "top" | "bottom" | "left" | "right";
|
|
45
|
+
/** Maximum list height - defaults to 180 */
|
|
46
|
+
listMaxHeight?: number;
|
|
47
|
+
/** Placement of the select list in relation to the input element */
|
|
48
|
+
listPlacement?: Side;
|
|
49
|
+
/** Use the opposite list placement if the set placement does not fit */
|
|
50
|
+
flipEnabled?: boolean;
|
|
51
|
+
/** Wraps the pill text when it would overflow the input width */
|
|
52
|
+
wrapPillText?: boolean;
|
|
53
|
+
/** Set this prop to enable a virtualised list of options. If it is not used then all options will be in the
|
|
54
|
+
* DOM at all times, which may cause performance problems on very large lists */
|
|
55
|
+
enableVirtualScroll?: boolean;
|
|
56
|
+
/** The number of options to render into the DOM at once, either side of the currently-visible ones.
|
|
57
|
+
* Higher values make for smoother scrolling but may impact performance.
|
|
58
|
+
* Only used if the `enableVirtualScroll` prop is set. */
|
|
59
|
+
virtualScrollOverscan?: number;
|
|
60
|
+
}
|
|
61
|
+
export declare const MultiSelect: React.ForwardRefExoticComponent<MultiSelectProps & React.RefAttributes<unknown>>;
|
|
62
|
+
export default MultiSelect;
|